From abd8b70b668d590ae30ed02cbe92a28cee064fdb Mon Sep 17 00:00:00 2001 From: Henrik Johansson Date: Mon, 16 Mar 2020 09:07:33 +0100 Subject: [PATCH 1/8] member_controller: now using scylla manager agent There is Scylla Client implementation mostly borrowed and adapted from the Scylla Manager code itself. The controller uses this client for status checks and decommission. The previous implementation that used the eminent Jolokia library is removed and direct interaction with the JMX server does no longer occur. There is still nodetool invocation as part of the scylla container lifecycle to ensure that proper shutdowns are performed by executing "drain" before terminating the instance. --- Dockerfile | 2 - Gopkg.lock | 202 +- config/manager_patch.yaml | 1 + examples/generic/operator.yaml | 1 + examples/gke/operator.yaml | 1 + examples/minikube/operator.yaml | 1 + pkg/auth/auth.go | 75 + pkg/auth/auth_test.go | 160 + pkg/controller/cluster/resource/resource.go | 11 +- pkg/naming/constants.go | 4 - pkg/scyllaclient/agent.json | 1174 ++ pkg/scyllaclient/client.go | 249 + pkg/scyllaclient/config.go | 86 + pkg/scyllaclient/context.go | 55 + pkg/scyllaclient/hostpool.go | 66 + .../internal/agent/client/agent_client.go | 117 + .../operations/core_bwlimit_parameters.go | 139 + .../operations/core_bwlimit_responses.go | 134 + .../core_stats_delete_parameters.go | 139 + .../operations/core_stats_delete_responses.go | 132 + .../operations/core_stats_reset_parameters.go | 139 + .../operations/core_stats_reset_responses.go | 132 + .../operations/free_o_s_memory_parameters.go | 113 + .../operations/free_o_s_memory_responses.go | 132 + .../client/operations/job_info_parameters.go | 139 + .../client/operations/job_info_responses.go | 134 + .../client/operations/job_stop_parameters.go | 139 + .../client/operations/job_stop_responses.go | 132 + .../client/operations/node_info_parameters.go | 113 + .../client/operations/node_info_responses.go | 134 + .../operations/operations_about_parameters.go | 139 + .../operations/operations_about_responses.go | 134 + .../operations/operations_cat_parameters.go | 139 + .../operations/operations_cat_responses.go | 134 + ...operations_check_permissions_parameters.go | 139 + .../operations_check_permissions_responses.go | 132 + .../client/operations/operations_client.go | 590 + .../operations_copyfile_parameters.go | 202 + .../operations_copyfile_responses.go | 134 + .../operations_deletefile_parameters.go | 202 + .../operations_deletefile_responses.go | 134 + .../operations/operations_list_parameters.go | 139 + .../operations/operations_list_responses.go | 202 + .../operations_movefile_parameters.go | 164 + .../operations_movefile_responses.go | 122 + .../operations/operations_purge_parameters.go | 202 + .../operations/operations_purge_responses.go | 134 + .../client/operations/sync_copy_parameters.go | 198 + .../client/operations/sync_copy_responses.go | 170 + .../internal/agent/models/bandwidth.go | 45 + .../internal/agent/models/content.go | 65 + .../internal/agent/models/error_response.go | 54 + .../agent/models/file_system_details.go | 49 + .../internal/agent/models/group_list.go | 43 + pkg/scyllaclient/internal/agent/models/job.go | 109 + .../internal/agent/models/job_info.go | 130 + .../internal/agent/models/job_info_params.go | 46 + .../internal/agent/models/jobid.go | 43 + .../internal/agent/models/list_item.go | 95 + .../internal/agent/models/list_options.go | 155 + .../agent/models/move_or_copy_file_options.go | 52 + .../internal/agent/models/node_info.go | 72 + .../internal/agent/models/remote.go | 49 + .../internal/agent/models/remote_path.go | 46 + .../internal/agent/models/stats.go | 162 + .../internal/agent/models/stats_params.go | 43 + .../internal/agent/models/transfer.go | 104 + .../agent/templates/client/client.gotmpl | 111 + .../agent/templates/client/response.gotmpl | 175 + ..._counter_cache_capacity_post_parameters.go | 140 + ...e_counter_cache_capacity_post_responses.go | 103 + ...unter_cache_keys_to_save_get_parameters.go | 113 + ...ounter_cache_keys_to_save_get_responses.go | 113 + ...nter_cache_keys_to_save_post_parameters.go | 141 + ...unter_cache_keys_to_save_post_responses.go | 103 + ...ounter_cache_save_period_get_parameters.go | 113 + ...counter_cache_save_period_get_responses.go | 113 + ...unter_cache_save_period_post_parameters.go | 141 + ...ounter_cache_save_period_post_responses.go | 103 + ...nvalidate_counter_cache_post_parameters.go | 113 + ...invalidate_counter_cache_post_responses.go | 103 + ...ce_invalidate_key_cache_post_parameters.go | 113 + ...ice_invalidate_key_cache_post_responses.go | 103 + ...vice_key_cache_capacity_post_parameters.go | 140 + ...rvice_key_cache_capacity_post_responses.go | 103 + ...e_key_cache_keys_to_save_get_parameters.go | 113 + ...ce_key_cache_keys_to_save_get_responses.go | 113 + ..._key_cache_keys_to_save_post_parameters.go | 141 + ...e_key_cache_keys_to_save_post_responses.go | 103 + ...ce_key_cache_save_period_get_parameters.go | 113 + ...ice_key_cache_save_period_get_responses.go | 113 + ...e_key_cache_save_period_post_parameters.go | 141 + ...ce_key_cache_save_period_post_responses.go | 103 + ...metrics_counter_capacity_get_parameters.go | 113 + ..._metrics_counter_capacity_get_responses.go | 113 + ..._metrics_counter_entries_get_parameters.go | 113 + ...e_metrics_counter_entries_get_responses.go | 113 + ...metrics_counter_hit_rate_get_parameters.go | 113 + ..._metrics_counter_hit_rate_get_responses.go | 113 + ...ice_metrics_counter_hits_get_parameters.go | 113 + ...vice_metrics_counter_hits_get_responses.go | 113 + ...unter_hits_moving_avrage_get_parameters.go | 113 + ...ounter_hits_moving_avrage_get_responses.go | 115 + ...metrics_counter_requests_get_parameters.go | 113 + ..._metrics_counter_requests_get_responses.go | 113 + ...r_requests_moving_avrage_get_parameters.go | 113 + ...er_requests_moving_avrage_get_responses.go | 115 + ...ice_metrics_counter_size_get_parameters.go | 113 + ...vice_metrics_counter_size_get_responses.go | 113 + ...ice_metrics_key_capacity_get_parameters.go | 113 + ...vice_metrics_key_capacity_get_responses.go | 113 + ...vice_metrics_key_entries_get_parameters.go | 113 + ...rvice_metrics_key_entries_get_responses.go | 113 + ...ice_metrics_key_hit_rate_get_parameters.go | 113 + ...vice_metrics_key_hit_rate_get_responses.go | 113 + ...service_metrics_key_hits_get_parameters.go | 113 + ..._service_metrics_key_hits_get_responses.go | 113 + ...s_key_hits_moving_avrage_get_parameters.go | 113 + ...cs_key_hits_moving_avrage_get_responses.go | 115 + ...ice_metrics_key_requests_get_parameters.go | 113 + ...vice_metrics_key_requests_get_responses.go | 113 + ...y_requests_moving_avrage_get_parameters.go | 113 + ...ey_requests_moving_avrage_get_responses.go | 115 + ...service_metrics_key_size_get_parameters.go | 113 + ..._service_metrics_key_size_get_responses.go | 113 + ...ice_metrics_row_capacity_get_parameters.go | 113 + ...vice_metrics_row_capacity_get_responses.go | 113 + ...vice_metrics_row_entries_get_parameters.go | 113 + ...rvice_metrics_row_entries_get_responses.go | 113 + ...ice_metrics_row_hit_rate_get_parameters.go | 113 + ...vice_metrics_row_hit_rate_get_responses.go | 113 + ...service_metrics_row_hits_get_parameters.go | 113 + ..._service_metrics_row_hits_get_responses.go | 113 + ...s_row_hits_moving_avrage_get_parameters.go | 113 + ...cs_row_hits_moving_avrage_get_responses.go | 115 + ...ice_metrics_row_requests_get_parameters.go | 113 + ...vice_metrics_row_requests_get_responses.go | 113 + ...w_requests_moving_avrage_get_parameters.go | 113 + ...ow_requests_moving_avrage_get_responses.go | 115 + ...service_metrics_row_size_get_parameters.go | 113 + ..._service_metrics_row_size_get_responses.go | 113 + ...vice_row_cache_capacity_post_parameters.go | 140 + ...rvice_row_cache_capacity_post_responses.go | 103 + ...e_row_cache_keys_to_save_get_parameters.go | 113 + ...ce_row_cache_keys_to_save_get_responses.go | 113 + ..._row_cache_keys_to_save_post_parameters.go | 141 + ...e_row_cache_keys_to_save_post_responses.go | 103 + ...ce_row_cache_save_period_get_parameters.go | 113 + ...ice_row_cache_save_period_get_responses.go | 113 + ...e_row_cache_save_period_post_parameters.go | 141 + ...ce_row_cache_save_period_post_responses.go | 103 + ...che_service_save_caches_post_parameters.go | 113 + ...ache_service_save_caches_post_responses.go | 103 + .../collectd_by_pluginid_get_parameters.go | 225 + .../collectd_by_pluginid_get_responses.go | 113 + .../collectd_by_pluginid_post_parameters.go | 265 + .../collectd_by_pluginid_post_responses.go | 103 + .../operations/collectd_get_parameters.go | 113 + .../operations/collectd_get_responses.go | 113 + .../operations/collectd_post_parameters.go | 148 + .../operations/collectd_post_responses.go | 103 + ...y_autocompaction_by_name_get_parameters.go | 136 + ...ly_autocompaction_by_name_get_responses.go | 113 + ...ly_built_indexes_by_name_get_parameters.go | 136 + ...ily_built_indexes_by_name_get_responses.go | 113 + ...mily_compaction_by_name_post_parameters.go | 187 + ...amily_compaction_by_name_post_responses.go | 113 + ...paction_strategy_by_name_get_parameters.go | 136 + ...mpaction_strategy_by_name_get_responses.go | 113 + ...action_strategy_by_name_post_parameters.go | 161 + ...paction_strategy_by_name_post_responses.go | 103 + ...ssion_parameters_by_name_get_parameters.go | 136 + ...ession_parameters_by_name_get_responses.go | 113 + ...sion_parameters_by_name_post_parameters.go | 161 + ...ssion_parameters_by_name_post_responses.go | 103 + ...rc_check_chance_by_name_post_parameters.go | 161 + ...crc_check_chance_by_name_post_responses.go | 103 + ..._droppable_ratio_by_name_get_parameters.go | 136 + ...y_droppable_ratio_by_name_get_responses.go | 113 + ...ly_estimate_keys_by_name_get_parameters.go | 136 + ...ily_estimate_keys_by_name_get_responses.go | 113 + .../column_family_get_parameters.go | 113 + .../operations/column_family_get_responses.go | 113 + ...ly_load_sstable_by_name_post_parameters.go | 136 + ...ily_load_sstable_by_name_post_responses.go | 113 + ...ajor_compaction_by_name_post_parameters.go | 169 + ...major_compaction_by_name_post_responses.go | 113 + ...ximum_compaction_by_name_get_parameters.go | 136 + ...aximum_compaction_by_name_get_responses.go | 113 + ...imum_compaction_by_name_post_parameters.go | 162 + ...ximum_compaction_by_name_post_responses.go | 113 + ...s_live_data_size_by_name_get_parameters.go | 136 + ...es_live_data_size_by_name_get_responses.go | 113 + ...memtables_live_data_size_get_parameters.go | 113 + ..._memtables_live_data_size_get_responses.go | 113 + ...es_off_heap_size_by_name_get_parameters.go | 136 + ...les_off_heap_size_by_name_get_responses.go | 113 + ..._memtables_off_heap_size_get_parameters.go | 113 + ...l_memtables_off_heap_size_get_responses.go | 113 + ...les_on_heap_size_by_name_get_parameters.go | 136 + ...bles_on_heap_size_by_name_get_responses.go | 113 + ...l_memtables_on_heap_size_get_parameters.go | 113 + ...ll_memtables_on_heap_size_get_responses.go | 113 + ..._disk_space_used_by_name_get_parameters.go | 136 + ...r_disk_space_used_by_name_get_responses.go | 113 + ...m_filter_disk_space_used_get_parameters.go | 113 + ...om_filter_disk_space_used_get_responses.go | 113 + ..._false_positives_by_name_get_parameters.go | 136 + ...r_false_positives_by_name_get_responses.go | 113 + ...m_filter_false_positives_get_parameters.go | 113 + ...om_filter_false_positives_get_responses.go | 113 + ...lter_false_ratio_by_name_get_parameters.go | 136 + ...ilter_false_ratio_by_name_get_responses.go | 113 + ...bloom_filter_false_ratio_get_parameters.go | 113 + ..._bloom_filter_false_ratio_get_responses.go | 113 + ...heap_memory_used_by_name_get_parameters.go | 136 + ..._heap_memory_used_by_name_get_responses.go | 113 + ...ter_off_heap_memory_used_get_parameters.go | 113 + ...lter_off_heap_memory_used_get_responses.go | 113 + ...trics_cas_commit_by_name_get_parameters.go | 136 + ...etrics_cas_commit_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ...rics_cas_prepare_by_name_get_parameters.go | 136 + ...trics_cas_prepare_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ...rics_cas_propose_by_name_get_parameters.go | 136 + ...trics_cas_propose_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ..._delta_histogram_by_name_get_parameters.go | 136 + ...e_delta_histogram_by_name_get_responses.go | 113 + ...heap_memory_used_by_name_get_parameters.go | 136 + ..._heap_memory_used_by_name_get_responses.go | 113 + ...ata_off_heap_memory_used_get_parameters.go | 113 + ...data_off_heap_memory_used_get_responses.go | 113 + ...ompression_ratio_by_name_get_parameters.go | 136 + ...compression_ratio_by_name_get_responses.go | 113 + ...etrics_compression_ratio_get_parameters.go | 113 + ...metrics_compression_ratio_get_responses.go | 113 + ...metrics_coordinator_read_get_parameters.go | 113 + ..._metrics_coordinator_read_get_responses.go | 103 + ...metrics_coordinator_scan_get_parameters.go | 113 + ..._metrics_coordinator_scan_get_responses.go | 103 + ..._count_histogram_by_name_get_parameters.go | 136 + ...n_count_histogram_by_name_get_responses.go | 113 + ...imated_row_count_by_name_get_parameters.go | 136 + ...timated_row_count_by_name_get_responses.go | 113 + ...w_size_histogram_by_name_get_parameters.go | 136 + ...ow_size_histogram_by_name_get_responses.go | 113 + ...heap_memory_used_by_name_get_parameters.go | 136 + ..._heap_memory_used_by_name_get_responses.go | 113 + ...ary_off_heap_memory_used_get_parameters.go | 113 + ...mary_off_heap_memory_used_get_responses.go | 113 + ...y_cache_hit_rate_by_name_get_parameters.go | 136 + ...ey_cache_hit_rate_by_name_get_responses.go | 113 + ..._disk_space_used_by_name_get_parameters.go | 136 + ...e_disk_space_used_by_name_get_responses.go | 113 + ...ics_live_disk_space_used_get_parameters.go | 113 + ...rics_live_disk_space_used_get_responses.go | 113 + ...canned_histogram_by_name_get_parameters.go | 136 + ...scanned_histogram_by_name_get_responses.go | 113 + ...e_ss_table_count_by_name_get_parameters.go | 136 + ...ve_ss_table_count_by_name_get_responses.go | 113 + ...rics_live_ss_table_count_get_parameters.go | 113 + ...trics_live_ss_table_count_get_responses.go | 113 + ...ics_max_row_size_by_name_get_parameters.go | 136 + ...rics_max_row_size_by_name_get_responses.go | 113 + ...ily_metrics_max_row_size_get_parameters.go | 113 + ...mily_metrics_max_row_size_get_responses.go | 113 + ...cs_mean_row_size_by_name_get_parameters.go | 136 + ...ics_mean_row_size_by_name_get_responses.go | 113 + ...ly_metrics_mean_row_size_get_parameters.go | 113 + ...ily_metrics_mean_row_size_get_responses.go | 113 + ...le_columns_count_by_name_get_parameters.go | 136 + ...ble_columns_count_by_name_get_responses.go | 113 + ...s_memtable_columns_count_get_parameters.go | 113 + ...cs_memtable_columns_count_get_responses.go | 113 + ...e_live_data_size_by_name_get_parameters.go | 136 + ...le_live_data_size_by_name_get_responses.go | 113 + ..._memtable_live_data_size_get_parameters.go | 113 + ...s_memtable_live_data_size_get_responses.go | 113 + ...le_off_heap_size_by_name_get_parameters.go | 136 + ...ble_off_heap_size_by_name_get_responses.go | 113 + ...s_memtable_off_heap_size_get_parameters.go | 113 + ...cs_memtable_off_heap_size_get_responses.go | 113 + ...ble_on_heap_size_by_name_get_parameters.go | 136 + ...able_on_heap_size_by_name_get_responses.go | 113 + ...cs_memtable_on_heap_size_get_parameters.go | 113 + ...ics_memtable_on_heap_size_get_responses.go | 113 + ...ble_switch_count_by_name_get_parameters.go | 136 + ...able_switch_count_by_name_get_responses.go | 113 + ...cs_memtable_switch_count_get_parameters.go | 113 + ...ics_memtable_switch_count_get_responses.go | 113 + ...ics_min_row_size_by_name_get_parameters.go | 136 + ...rics_min_row_size_by_name_get_responses.go | 113 + ...ily_metrics_min_row_size_get_parameters.go | 113 + ...mily_metrics_min_row_size_get_responses.go | 113 + ...ding_compactions_by_name_get_parameters.go | 136 + ...nding_compactions_by_name_get_responses.go | 113 + ...rics_pending_compactions_get_parameters.go | 113 + ...trics_pending_compactions_get_responses.go | 113 + ..._pending_flushes_by_name_get_parameters.go | 136 + ...s_pending_flushes_by_name_get_responses.go | 113 + ..._metrics_pending_flushes_get_parameters.go | 113 + ...y_metrics_pending_flushes_get_responses.go | 113 + ...cs_range_latency_by_name_get_parameters.go | 136 + ...ics_range_latency_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ...ly_metrics_range_latency_get_parameters.go | 113 + ...ily_metrics_range_latency_get_responses.go | 113 + ...ily_metrics_read_by_name_get_parameters.go | 136 + ...mily_metrics_read_by_name_get_responses.go | 113 + ...lumn_family_metrics_read_get_parameters.go | 113 + ...olumn_family_metrics_read_get_responses.go | 113 + ...ics_read_latency_by_name_get_parameters.go | 136 + ...rics_read_latency_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ...ily_metrics_read_latency_get_parameters.go | 113 + ...mily_metrics_read_latency_get_responses.go | 113 + ...atency_histogram_by_name_get_parameters.go | 136 + ...latency_histogram_by_name_get_responses.go | 103 + ...s_read_latency_histogram_get_parameters.go | 113 + ...cs_read_latency_histogram_get_responses.go | 113 + ...verage_histogram_by_name_get_parameters.go | 136 + ...average_histogram_by_name_get_responses.go | 103 + ...moving_average_histogram_get_parameters.go | 113 + ..._moving_average_histogram_get_responses.go | 113 + ..._false_positives_by_name_get_parameters.go | 136 + ...r_false_positives_by_name_get_responses.go | 113 + ...m_filter_false_positives_get_parameters.go | 113 + ...om_filter_false_positives_get_responses.go | 113 + ...lter_false_ratio_by_name_get_parameters.go | 136 + ...ilter_false_ratio_by_name_get_responses.go | 113 + ...bloom_filter_false_ratio_get_parameters.go | 113 + ..._bloom_filter_false_ratio_get_responses.go | 113 + ...cs_row_cache_hit_by_name_get_parameters.go | 136 + ...ics_row_cache_hit_by_name_get_responses.go | 113 + ...ly_metrics_row_cache_hit_get_parameters.go | 113 + ...ily_metrics_row_cache_hit_get_responses.go | 113 + ...hit_out_of_range_by_name_get_parameters.go | 136 + ..._hit_out_of_range_by_name_get_responses.go | 113 + ...w_cache_hit_out_of_range_get_parameters.go | 113 + ...ow_cache_hit_out_of_range_get_responses.go | 113 + ...s_row_cache_miss_by_name_get_parameters.go | 136 + ...cs_row_cache_miss_by_name_get_responses.go | 113 + ...y_metrics_row_cache_miss_get_parameters.go | 113 + ...ly_metrics_row_cache_miss_get_responses.go | 113 + ...s_snapshots_size_by_name_get_parameters.go | 136 + ...cs_snapshots_size_by_name_get_responses.go | 113 + ...culative_retries_by_name_get_parameters.go | 136 + ...eculative_retries_by_name_get_responses.go | 113 + ...rics_speculative_retries_get_parameters.go | 113 + ...trics_speculative_retries_get_responses.go | 113 + ...r_read_histogram_by_name_get_parameters.go | 136 + ...er_read_histogram_by_name_get_responses.go | 113 + ...canned_histogram_by_name_get_parameters.go | 136 + ...scanned_histogram_by_name_get_responses.go | 113 + ..._disk_space_used_by_name_get_parameters.go | 136 + ...l_disk_space_used_by_name_get_responses.go | 113 + ...cs_total_disk_space_used_get_parameters.go | 113 + ...ics_total_disk_space_used_get_responses.go | 113 + ...rics_true_snapshots_size_get_parameters.go | 113 + ...trics_true_snapshots_size_get_responses.go | 113 + ...waiting_on_free_memtable_get_parameters.go | 113 + ..._waiting_on_free_memtable_get_responses.go | 103 + ...ly_metrics_write_by_name_get_parameters.go | 136 + ...ily_metrics_write_by_name_get_responses.go | 113 + ...umn_family_metrics_write_get_parameters.go | 113 + ...lumn_family_metrics_write_get_responses.go | 113 + ...cs_write_latency_by_name_get_parameters.go | 136 + ...ics_write_latency_by_name_get_responses.go | 113 + ...imated_histogram_by_name_get_parameters.go | 136 + ...timated_histogram_by_name_get_responses.go | 103 + ...recent_histogram_by_name_get_parameters.go | 136 + ..._recent_histogram_by_name_get_responses.go | 103 + ...ly_metrics_write_latency_get_parameters.go | 113 + ...ily_metrics_write_latency_get_responses.go | 113 + ...atency_histogram_by_name_get_parameters.go | 136 + ...latency_histogram_by_name_get_responses.go | 103 + ..._write_latency_histogram_get_parameters.go | 113 + ...s_write_latency_histogram_get_responses.go | 113 + ...verage_histogram_by_name_get_parameters.go | 136 + ...average_histogram_by_name_get_responses.go | 103 + ...moving_average_histogram_get_parameters.go | 113 + ..._moving_average_histogram_get_responses.go | 113 + ...nimum_compaction_by_name_get_parameters.go | 136 + ...inimum_compaction_by_name_get_responses.go | 113 + ...imum_compaction_by_name_post_parameters.go | 162 + ...nimum_compaction_by_name_post_responses.go | 113 + .../column_family_name_get_parameters.go | 113 + .../column_family_name_get_responses.go | 113 + ...umn_family_name_keyspace_get_parameters.go | 113 + ...lumn_family_name_keyspace_get_responses.go | 113 + ..._sstables_by_key_by_name_get_parameters.go | 161 + ...y_sstables_by_key_by_name_get_responses.go | 113 + ...tables_per_level_by_name_get_parameters.go | 136 + ...stables_per_level_by_name_get_responses.go | 113 + ...tables_unleveled_by_name_get_parameters.go | 136 + ...stables_unleveled_by_name_get_responses.go | 113 + ...etrics_waiting_on_commit_get_parameters.go | 113 + ...metrics_waiting_on_commit_get_responses.go | 103 + ...ng_on_segment_allocation_get_parameters.go | 113 + ...ing_on_segment_allocation_get_responses.go | 103 + ..._metrics_completed_tasks_get_parameters.go | 113 + ...g_metrics_completed_tasks_get_responses.go | 113 + ...og_metrics_pending_tasks_get_parameters.go | 113 + ...log_metrics_pending_tasks_get_responses.go | 113 + ...cs_total_commit_log_size_get_parameters.go | 113 + ...ics_total_commit_log_size_get_responses.go | 113 + ...mmitlog_recover_by_path_post_parameters.go | 136 + ...ommitlog_recover_by_path_post_responses.go | 103 + ...ommitlog_segments_active_get_parameters.go | 113 + ...commitlog_segments_active_get_responses.go | 113 + ...itlog_segments_archiving_get_parameters.go | 113 + ...mitlog_segments_archiving_get_responses.go | 113 + ...nager_compaction_history_get_parameters.go | 113 + ...anager_compaction_history_get_responses.go | 113 + ..._manager_compaction_info_get_parameters.go | 113 + ...n_manager_compaction_info_get_responses.go | 113 + ...tion_manager_compactions_get_parameters.go | 113 + ...ction_manager_compactions_get_responses.go | 113 + ...user_defined_compaction_post_parameters.go | 140 + ..._user_defined_compaction_post_responses.go | 103 + ..._metrics_bytes_compacted_get_parameters.go | 113 + ...r_metrics_bytes_compacted_get_responses.go | 113 + ..._metrics_completed_tasks_get_parameters.go | 113 + ...r_metrics_completed_tasks_get_responses.go | 113 + ...er_metrics_pending_tasks_get_parameters.go | 113 + ...ger_metrics_pending_tasks_get_responses.go | 113 + ...al_compactions_completed_get_parameters.go | 113 + ...tal_compactions_completed_get_responses.go | 113 + ...manager_stop_compaction_post_parameters.go | 140 + ..._manager_stop_compaction_post_responses.go | 103 + ...ctor_count_endpoint_down_get_parameters.go | 113 + ...ector_count_endpoint_down_get_responses.go | 113 + ...tector_count_endpoint_up_get_parameters.go | 113 + ...etector_count_endpoint_up_get_responses.go | 113 + ...ctor_endpoint_phi_values_get_parameters.go | 113 + ...ector_endpoint_phi_values_get_responses.go | 113 + ...ilure_detector_endpoints_get_parameters.go | 113 + ...ailure_detector_endpoints_get_responses.go | 113 + ...endpoints_states_by_addr_get_parameters.go | 136 + ..._endpoints_states_by_addr_get_responses.go | 113 + .../failure_detector_phi_get_parameters.go | 113 + .../failure_detector_phi_get_responses.go | 113 + .../failure_detector_phi_post_parameters.go | 140 + .../failure_detector_phi_post_responses.go | 113 + ...e_detector_simple_states_get_parameters.go | 113 + ...re_detector_simple_states_get_responses.go | 113 + ...per_assassinate_by_addr_post_parameters.go | 169 + ...iper_assassinate_by_addr_post_responses.go | 103 + ...ossiper_downtime_by_addr_get_parameters.go | 136 + ...gossiper_downtime_by_addr_get_responses.go | 113 + .../gossiper_endpoint_down_get_parameters.go | 113 + .../gossiper_endpoint_down_get_responses.go | 113 + .../gossiper_endpoint_live_get_parameters.go | 113 + .../gossiper_endpoint_live_get_responses.go | 113 + ...eneration_number_by_addr_get_parameters.go | 136 + ...generation_number_by_addr_get_responses.go | 113 + ...art_beat_version_by_addr_get_parameters.go | 136 + ...eart_beat_version_by_addr_get_responses.go | 113 + .../hinted_handoff_hints_delete_parameters.go | 147 + .../hinted_handoff_hints_delete_responses.go | 103 + .../hinted_handoff_hints_get_parameters.go | 113 + .../hinted_handoff_hints_get_responses.go | 113 + ...rics_create_hint_by_addr_get_parameters.go | 136 + ...trics_create_hint_by_addr_get_responses.go | 113 + ...not_stored_hints_by_addr_get_parameters.go | 136 + ..._not_stored_hints_by_addr_get_responses.go | 113 + .../hinted_handoff_pause_post_parameters.go | 141 + .../hinted_handoff_pause_post_responses.go | 103 + ...hinted_handoff_schedule_post_parameters.go | 140 + .../hinted_handoff_schedule_post_responses.go | 103 + .../operations/lsa_compact_post_parameters.go | 113 + .../operations/lsa_compact_post_responses.go | 103 + ..._messages_dropped_by_ver_get_parameters.go | 113 + ...e_messages_dropped_by_ver_get_responses.go | 113 + ...service_messages_dropped_get_parameters.go | 113 + ..._service_messages_dropped_get_responses.go | 113 + ...rvice_messages_exception_get_parameters.go | 113 + ...ervice_messages_exception_get_responses.go | 113 + ...service_messages_pending_get_parameters.go | 113 + ..._service_messages_pending_get_responses.go | 113 + ...service_messages_replied_get_parameters.go | 113 + ..._service_messages_replied_get_responses.go | 113 + ...ssages_respond_completed_get_parameters.go | 113 + ...essages_respond_completed_get_responses.go | 113 + ...messages_respond_pending_get_parameters.go | 113 + ..._messages_respond_pending_get_responses.go | 113 + ...ng_service_messages_sent_get_parameters.go | 113 + ...ing_service_messages_sent_get_responses.go | 113 + ...service_messages_timeout_get_parameters.go | 113 + ..._service_messages_timeout_get_responses.go | 113 + ...essaging_service_version_get_parameters.go | 140 + ...messaging_service_version_get_responses.go | 113 + .../client/operations/operations_client.go | 13845 ++++++++++++++++ .../snitch_datacenter_get_parameters.go | 147 + .../snitch_datacenter_get_responses.go | 113 + .../operations/snitch_name_get_parameters.go | 113 + .../operations/snitch_name_get_responses.go | 113 + .../operations/snitch_rack_get_parameters.go | 147 + .../operations/snitch_rack_get_responses.go | 113 + ...y_cas_contention_timeout_get_parameters.go | 113 + ...xy_cas_contention_timeout_get_responses.go | 113 + ..._cas_contention_timeout_post_parameters.go | 140 + ...y_cas_contention_timeout_post_responses.go | 103 + ...ounter_write_rpc_timeout_get_parameters.go | 113 + ...counter_write_rpc_timeout_get_responses.go | 113 + ...unter_write_rpc_timeout_post_parameters.go | 140 + ...ounter_write_rpc_timeout_post_responses.go | 103 + ...ed_handoff_enabled_by_dc_get_parameters.go | 113 + ...ted_handoff_enabled_by_dc_get_responses.go | 113 + ...d_handoff_enabled_by_dc_post_parameters.go | 140 + ...ed_handoff_enabled_by_dc_post_responses.go | 103 + ...y_hinted_handoff_enabled_get_parameters.go | 113 + ...xy_hinted_handoff_enabled_get_responses.go | 113 + ..._hinted_handoff_enabled_post_parameters.go | 141 + ...y_hinted_handoff_enabled_post_responses.go | 103 + ..._proxy_hints_in_progress_get_parameters.go | 113 + ...e_proxy_hints_in_progress_get_responses.go | 113 + ...ge_proxy_max_hint_window_get_parameters.go | 113 + ...age_proxy_max_hint_window_get_responses.go | 113 + ...e_proxy_max_hint_window_post_parameters.go | 141 + ...ge_proxy_max_hint_window_post_responses.go | 103 + ...xy_max_hints_in_progress_get_parameters.go | 113 + ...oxy_max_hints_in_progress_get_responses.go | 113 + ...y_max_hints_in_progress_post_parameters.go | 141 + ...xy_max_hints_in_progress_post_responses.go | 103 + ...s_read_condition_not_met_get_parameters.go | 113 + ...as_read_condition_not_met_get_responses.go | 113 + ...rics_cas_read_contention_get_parameters.go | 113 + ...trics_cas_read_contention_get_responses.go | 113 + ...etrics_cas_read_timeouts_get_parameters.go | 113 + ...metrics_cas_read_timeouts_get_responses.go | 113 + ...cs_cas_read_unavailables_get_parameters.go | 113 + ...ics_cas_read_unavailables_get_responses.go | 113 + ...s_read_unfinished_commit_get_parameters.go | 113 + ...as_read_unfinished_commit_get_responses.go | 113 + ..._write_condition_not_met_get_parameters.go | 113 + ...s_write_condition_not_met_get_responses.go | 113 + ...ics_cas_write_contention_get_parameters.go | 113 + ...rics_cas_write_contention_get_responses.go | 113 + ...trics_cas_write_timeouts_get_parameters.go | 113 + ...etrics_cas_write_timeouts_get_responses.go | 113 + ...s_cas_write_unavailables_get_parameters.go | 113 + ...cs_cas_write_unavailables_get_responses.go | 113 + ..._write_unfinished_commit_get_parameters.go | 113 + ...s_write_unfinished_commit_get_responses.go | 113 + ...ange_estimated_histogram_get_parameters.go | 113 + ...range_estimated_histogram_get_responses.go | 103 + ...rage_proxy_metrics_range_get_parameters.go | 113 + ...orage_proxy_metrics_range_get_responses.go | 113 + ..._metrics_range_histogram_get_parameters.go | 113 + ...y_metrics_range_histogram_get_responses.go | 103 + ...moving_average_histogram_get_parameters.go | 113 + ..._moving_average_histogram_get_responses.go | 103 + ...y_metrics_range_timeouts_get_parameters.go | 113 + ...xy_metrics_range_timeouts_get_responses.go | 113 + ...ics_range_timeouts_rates_get_parameters.go | 113 + ...rics_range_timeouts_rates_get_responses.go | 115 + ...trics_range_unavailables_get_parameters.go | 113 + ...etrics_range_unavailables_get_responses.go | 113 + ...range_unavailables_rates_get_parameters.go | 113 + ..._range_unavailables_rates_get_responses.go | 115 + ...read_estimated_histogram_get_parameters.go | 113 + ..._read_estimated_histogram_get_responses.go | 103 + ...orage_proxy_metrics_read_get_parameters.go | 113 + ...torage_proxy_metrics_read_get_responses.go | 113 + ...y_metrics_read_histogram_get_parameters.go | 113 + ...xy_metrics_read_histogram_get_responses.go | 103 + ...moving_average_histogram_get_parameters.go | 113 + ..._moving_average_histogram_get_responses.go | 103 + ...xy_metrics_read_timeouts_get_parameters.go | 113 + ...oxy_metrics_read_timeouts_get_responses.go | 113 + ...rics_read_timeouts_rates_get_parameters.go | 113 + ...trics_read_timeouts_rates_get_responses.go | 115 + ...etrics_read_unavailables_get_parameters.go | 113 + ...metrics_read_unavailables_get_responses.go | 113 + ..._read_unavailables_rates_get_parameters.go | 113 + ...s_read_unavailables_rates_get_responses.go | 115 + ...rite_estimated_histogram_get_parameters.go | 113 + ...write_estimated_histogram_get_responses.go | 103 + ...rage_proxy_metrics_write_get_parameters.go | 113 + ...orage_proxy_metrics_write_get_responses.go | 113 + ..._metrics_write_histogram_get_parameters.go | 113 + ...y_metrics_write_histogram_get_responses.go | 103 + ...moving_average_histogram_get_parameters.go | 113 + ..._moving_average_histogram_get_responses.go | 103 + ...y_metrics_write_timeouts_get_parameters.go | 113 + ...xy_metrics_write_timeouts_get_responses.go | 113 + ...ics_write_timeouts_rates_get_parameters.go | 113 + ...rics_write_timeouts_rates_get_responses.go | 115 + ...trics_write_unavailables_get_parameters.go | 113 + ...etrics_write_unavailables_get_responses.go | 113 + ...write_unavailables_rates_get_parameters.go | 113 + ..._write_unavailables_rates_get_responses.go | 115 + ..._proxy_range_rpc_timeout_get_parameters.go | 113 + ...e_proxy_range_rpc_timeout_get_responses.go | 113 + ...proxy_range_rpc_timeout_post_parameters.go | 140 + ..._proxy_range_rpc_timeout_post_responses.go | 103 + ...xy_read_repair_attempted_get_parameters.go | 113 + ...oxy_read_repair_attempted_get_responses.go | 113 + ...pair_repaired_background_get_parameters.go | 113 + ...epair_repaired_background_get_responses.go | 113 + ...repair_repaired_blocking_get_parameters.go | 113 + ..._repair_repaired_blocking_get_responses.go | 113 + ...e_proxy_read_rpc_timeout_get_parameters.go | 113 + ...ge_proxy_read_rpc_timeout_get_responses.go | 113 + ..._proxy_read_rpc_timeout_post_parameters.go | 140 + ...e_proxy_read_rpc_timeout_post_responses.go | 103 + ..._reload_trigger_classes_post_parameters.go | 113 + ...y_reload_trigger_classes_post_responses.go | 103 + ...torage_proxy_rpc_timeout_get_parameters.go | 113 + ...storage_proxy_rpc_timeout_get_responses.go | 113 + ...orage_proxy_rpc_timeout_post_parameters.go | 140 + ...torage_proxy_rpc_timeout_post_responses.go | 103 + ...ge_proxy_schema_versions_get_parameters.go | 113 + ...age_proxy_schema_versions_get_responses.go | 113 + ...torage_proxy_total_hints_get_parameters.go | 113 + ...storage_proxy_total_hints_get_responses.go | 113 + ...oxy_truncate_rpc_timeout_get_parameters.go | 113 + ...roxy_truncate_rpc_timeout_get_responses.go | 113 + ...xy_truncate_rpc_timeout_post_parameters.go | 140 + ...oxy_truncate_rpc_timeout_post_responses.go | 103 + ..._proxy_write_rpc_timeout_get_parameters.go | 113 + ...e_proxy_write_rpc_timeout_get_responses.go | 113 + ...proxy_write_rpc_timeout_post_parameters.go | 140 + ..._proxy_write_rpc_timeout_post_responses.go | 103 + ...ge_service_active_repair_get_parameters.go | 113 + ...age_service_active_repair_get_responses.go | 113 + ...ompaction_by_keyspace_delete_parameters.go | 168 + ...compaction_by_keyspace_delete_responses.go | 103 + ..._compaction_by_keyspace_post_parameters.go | 168 + ...o_compaction_by_keyspace_post_responses.go | 103 + ...h_size_failure_threshold_get_parameters.go | 113 + ...ch_size_failure_threshold_get_responses.go | 113 + ..._size_failure_threshold_post_parameters.go | 141 + ...h_size_failure_threshold_post_responses.go | 103 + ..._bulk_load_async_by_path_get_parameters.go | 136 + ...e_bulk_load_async_by_path_get_responses.go | 113 + ...rvice_bulk_load_by_path_post_parameters.go | 136 + ...ervice_bulk_load_by_path_post_responses.go | 103 + ...age_service_cluster_name_get_parameters.go | 113 + ...rage_service_cluster_name_get_responses.go | 113 + ...torage_service_commitlog_get_parameters.go | 113 + ...storage_service_commitlog_get_responses.go | 113 + ...ce_compaction_throughput_get_parameters.go | 113 + ...ice_compaction_throughput_get_responses.go | 113 + ...e_compaction_throughput_post_parameters.go | 141 + ...ce_compaction_throughput_post_responses.go | 103 + ...vice_data_file_locations_get_parameters.go | 113 + ...rvice_data_file_locations_get_responses.go | 113 + ...ge_service_decommission_post_parameters.go | 113 + ...age_service_decommission_post_responses.go | 103 + ...e_service_deliver_hints_post_parameters.go | 140 + ...ge_service_deliver_hints_post_responses.go | 103 + ...escribe_ring_by_keyspace_get_parameters.go | 136 + ...describe_ring_by_keyspace_get_responses.go | 113 + ...ge_service_describe_ring_get_parameters.go | 113 + ...age_service_describe_ring_get_responses.go | 113 + .../storage_service_drain_get_parameters.go | 113 + .../storage_service_drain_get_responses.go | 113 + .../storage_service_drain_post_parameters.go | 113 + .../storage_service_drain_post_responses.go | 103 + ...force_remove_completion_post_parameters.go | 113 + ..._force_remove_completion_post_responses.go | 103 + ...service_force_terminate_post_parameters.go | 113 + ..._service_force_terminate_post_responses.go | 103 + ..._force_terminate_repair_post_parameters.go | 113 + ...e_force_terminate_repair_post_responses.go | 103 + ...ervice_generation_number_get_parameters.go | 113 + ...service_generation_number_get_responses.go | 113 + ...age_service_gossiping_delete_parameters.go | 113 + ...rage_service_gossiping_delete_responses.go | 103 + ...torage_service_gossiping_get_parameters.go | 113 + ...storage_service_gossiping_get_responses.go | 113 + ...orage_service_gossiping_post_parameters.go | 113 + ...torage_service_gossiping_post_responses.go | 103 + ..._service_hinted_handoff_post_parameters.go | 141 + ...e_service_hinted_handoff_post_responses.go | 103 + .../storage_service_host_id_get_parameters.go | 113 + .../storage_service_host_id_get_responses.go | 113 + ...age_service_hostid_local_get_parameters.go | 113 + ...rage_service_hostid_local_get_responses.go | 113 + ...vice_incremental_backups_get_parameters.go | 113 + ...rvice_incremental_backups_get_responses.go | 113 + ...ice_incremental_backups_post_parameters.go | 141 + ...vice_incremental_backups_post_responses.go | 103 + ...e_service_is_initialized_get_parameters.go | 113 + ...ge_service_is_initialized_get_responses.go | 113 + ...rage_service_is_starting_get_parameters.go | 113 + ...orage_service_is_starting_get_responses.go | 113 + ...torage_service_join_ring_get_parameters.go | 113 + ...storage_service_join_ring_get_responses.go | 113 + ...orage_service_join_ring_post_parameters.go | 113 + ...torage_service_join_ring_post_responses.go | 103 + ...ace_cleanup_by_keyspace_post_parameters.go | 168 + ...pace_cleanup_by_keyspace_post_responses.go | 113 + ..._compaction_by_keyspace_post_parameters.go | 168 + ...e_compaction_by_keyspace_post_responses.go | 103 + ...space_flush_by_keyspace_post_parameters.go | 168 + ...yspace_flush_by_keyspace_post_responses.go | 103 + ...yspace_scrub_by_keyspace_get_parameters.go | 233 + ...eyspace_scrub_by_keyspace_get_responses.go | 113 + ...ade_sstables_by_keyspace_get_parameters.go | 201 + ...rade_sstables_by_keyspace_get_responses.go | 113 + ...torage_service_keyspaces_get_parameters.go | 147 + ...storage_service_keyspaces_get_responses.go | 113 + .../storage_service_load_get_parameters.go | 113 + .../storage_service_load_get_responses.go | 113 + ...storage_service_load_map_get_parameters.go | 113 + .../storage_service_load_map_get_responses.go | 113 + ...ge_service_logging_level_get_parameters.go | 113 + ...age_service_logging_level_get_responses.go | 113 + ...e_service_logging_level_post_parameters.go | 165 + ...ge_service_logging_level_post_responses.go | 103 + ...rvice_metrics_exceptions_get_parameters.go | 113 + ...ervice_metrics_exceptions_get_responses.go | 113 + ...etrics_hints_in_progress_get_parameters.go | 113 + ...metrics_hints_in_progress_get_responses.go | 113 + ...age_service_metrics_load_get_parameters.go | 113 + ...rage_service_metrics_load_get_responses.go | 113 + ...vice_metrics_total_hints_get_parameters.go | 113 + ...rvice_metrics_total_hints_get_responses.go | 113 + .../storage_service_move_post_parameters.go | 140 + .../storage_service_move_post_responses.go | 103 + ...vice_native_transport_delete_parameters.go | 113 + ...rvice_native_transport_delete_responses.go | 103 + ...service_native_transport_get_parameters.go | 113 + ..._service_native_transport_get_responses.go | 113 + ...ervice_native_transport_post_parameters.go | 113 + ...service_native_transport_post_responses.go | 103 + ...al_endpoints_by_keyspace_get_parameters.go | 186 + ...ral_endpoints_by_keyspace_get_responses.go | 113 + ...ge_service_nodes_joining_get_parameters.go | 113 + ...age_service_nodes_joining_get_responses.go | 113 + ...ge_service_nodes_leaving_get_parameters.go | 113 + ...age_service_nodes_leaving_get_responses.go | 113 + ...age_service_nodes_moving_get_parameters.go | 113 + ...rage_service_nodes_moving_get_responses.go | 113 + ...e_service_operation_mode_get_parameters.go | 113 + ...ge_service_operation_mode_get_responses.go | 113 + ...ce_ownership_by_keyspace_get_parameters.go | 136 + ...ice_ownership_by_keyspace_get_responses.go | 113 + ...torage_service_ownership_get_parameters.go | 113 + ...storage_service_ownership_get_responses.go | 113 + ...service_partitioner_name_get_parameters.go | 113 + ..._service_partitioner_name_get_responses.go | 113 + ...ending_range_by_keyspace_get_parameters.go | 136 + ...pending_range_by_keyspace_get_responses.go | 113 + ...endpoint_map_by_keyspace_get_parameters.go | 169 + ..._endpoint_map_by_keyspace_get_responses.go | 113 + ...storage_service_rebuild_post_parameters.go | 147 + .../storage_service_rebuild_post_responses.go | 103 + ..._service_release_version_get_parameters.go | 113 + ...e_service_release_version_get_responses.go | 113 + ..._service_relocal_schema_post_parameters.go | 113 + ...e_service_relocal_schema_post_responses.go | 103 + ...e_service_removal_status_get_parameters.go | 113 + ...ge_service_removal_status_get_responses.go | 113 + ...age_service_remove_node_post_parameters.go | 140 + ...rage_service_remove_node_post_responses.go | 103 + ...repair_async_by_keyspace_get_parameters.go | 162 + ..._repair_async_by_keyspace_get_responses.go | 113 + ...epair_async_by_keyspace_post_parameters.go | 488 + ...repair_async_by_keyspace_post_responses.go | 113 + ...hedule_failed_deletions_post_parameters.go | 113 + ...chedule_failed_deletions_post_responses.go | 103 + ...ge_service_rpc_server_delete_parameters.go | 113 + ...age_service_rpc_server_delete_responses.go | 103 + ...orage_service_rpc_server_get_parameters.go | 113 + ...torage_service_rpc_server_get_responses.go | 113 + ...rage_service_rpc_server_post_parameters.go | 113 + ...orage_service_rpc_server_post_responses.go | 103 + ...service_sample_key_range_get_parameters.go | 113 + ..._service_sample_key_range_get_responses.go | 113 + ...ce_saved_caches_location_get_parameters.go | 113 + ...ice_saved_caches_location_get_responses.go | 113 + ...e_service_schema_version_get_parameters.go | 113 + ...ge_service_schema_version_get_responses.go | 113 + ...e_scylla_release_version_get_parameters.go | 113 + ...ce_scylla_release_version_get_responses.go | 113 + ...orage_service_slow_query_get_parameters.go | 113 + ...torage_service_slow_query_get_responses.go | 115 + ...rage_service_slow_query_post_parameters.go | 212 + ...orage_service_slow_query_post_responses.go | 103 + ...age_service_snapshots_delete_parameters.go | 179 + ...rage_service_snapshots_delete_responses.go | 103 + ...torage_service_snapshots_get_parameters.go | 113 + ...storage_service_snapshots_get_responses.go | 113 + ...orage_service_snapshots_post_parameters.go | 211 + ...torage_service_snapshots_post_responses.go | 103 + ...vice_snapshots_size_true_get_parameters.go | 113 + ...rvice_snapshots_size_true_get_responses.go | 113 + ...ce_sstables_by_keyspace_post_parameters.go | 161 + ...ice_sstables_by_keyspace_post_responses.go | 103 + ...age_service_stop_daemon_post_parameters.go | 113 + ...rage_service_stop_daemon_post_responses.go | 103 + ...ervice_stream_throughput_get_parameters.go | 113 + ...service_stream_throughput_get_responses.go | 113 + ...rvice_stream_throughput_post_parameters.go | 141 + ...ervice_stream_throughput_post_responses.go | 103 + ...rvice_tokens_by_endpoint_get_parameters.go | 136 + ...ervice_tokens_by_endpoint_get_responses.go | 113 + ..._service_tokens_endpoint_get_parameters.go | 113 + ...e_service_tokens_endpoint_get_responses.go | 113 + .../storage_service_tokens_get_parameters.go | 113 + .../storage_service_tokens_get_responses.go | 113 + ...bstone_failure_threshold_get_parameters.go | 113 + ...mbstone_failure_threshold_get_responses.go | 113 + ...stone_failure_threshold_post_parameters.go | 141 + ...bstone_failure_threshold_post_responses.go | 103 + ...tombstone_warn_threshold_get_parameters.go | 113 + ..._tombstone_warn_threshold_get_responses.go | 113 + ...ombstone_warn_threshold_post_parameters.go | 141 + ...tombstone_warn_threshold_post_responses.go | 103 + ...ervice_trace_probability_get_parameters.go | 113 + ...service_trace_probability_get_responses.go | 113 + ...rvice_trace_probability_post_parameters.go | 140 + ...ervice_trace_probability_post_responses.go | 103 + ...ce_truncate_by_keyspace_post_parameters.go | 168 + ...ice_truncate_by_keyspace_post_responses.go | 103 + ...e_service_update_snitch_post_parameters.go | 262 + ...ge_service_update_snitch_post_responses.go | 103 + ...ses_by_keyspace_and_view_get_parameters.go | 157 + ...uses_by_keyspace_and_view_get_responses.go | 113 + .../stream_manager_get_parameters.go | 113 + .../stream_manager_get_responses.go | 113 + ...metrics_incoming_by_peer_get_parameters.go | 136 + ..._metrics_incoming_by_peer_get_responses.go | 113 + ...manager_metrics_incoming_get_parameters.go | 113 + ..._manager_metrics_incoming_get_responses.go | 113 + ...manager_metrics_outbound_get_parameters.go | 113 + ..._manager_metrics_outbound_get_responses.go | 113 + ...metrics_outgoing_by_peer_get_parameters.go | 136 + ..._metrics_outgoing_by_peer_get_responses.go | 113 + ...manager_metrics_outgoing_get_parameters.go | 113 + ..._manager_metrics_outgoing_get_responses.go | 113 + .../system_logger_by_name_get_parameters.go | 136 + .../system_logger_by_name_get_responses.go | 113 + .../system_logger_by_name_post_parameters.go | 161 + .../system_logger_by_name_post_responses.go | 103 + .../system_logger_get_parameters.go | 113 + .../operations/system_logger_get_responses.go | 113 + .../system_logger_post_parameters.go | 140 + .../system_logger_post_responses.go | 103 + .../internal/scylla/client/scylla_client.go | 117 + .../scylla/models/collectd_metric_status.go | 76 + .../internal/scylla/models/collectd_value.go | 45 + .../scylla/models/column_family_info.go | 51 + .../internal/scylla/models/compaction_info.go | 54 + .../internal/scylla/models/direction.go | 65 + .../internal/scylla/models/endpoint_detail.go | 51 + .../scylla/models/endpoint_phi_value.go | 48 + .../internal/scylla/models/endpoint_state.go | 97 + .../internal/scylla/models/error_model.go | 46 + .../scylla/models/estimated_histogram.go | 48 + .../internal/scylla/models/histogram.go | 63 + .../internal/scylla/models/history.go | 100 + .../internal/scylla/models/level.go | 72 + .../scylla/models/map_string_double.go | 48 + .../internal/scylla/models/maplist_mapper.go | 48 + .../internal/scylla/models/mapper.go | 48 + .../internal/scylla/models/mapper_list.go | 48 + .../internal/scylla/models/message_counter.go | 48 + .../internal/scylla/models/progress_info.go | 86 + .../scylla/models/progress_info_mapper.go | 76 + .../scylla/models/rate_moving_average.go | 51 + .../rate_moving_average_and_histogram.go | 98 + .../models/repair_async_status_response.go | 66 + .../internal/scylla/models/row_merged.go | 48 + .../internal/scylla/models/slow_query_info.go | 51 + .../internal/scylla/models/snapshot.go | 54 + .../internal/scylla/models/snapshots.go | 85 + .../internal/scylla/models/state.go | 77 + .../internal/scylla/models/stream_info.go | 210 + .../internal/scylla/models/stream_state.go | 88 + .../internal/scylla/models/stream_summary.go | 51 + .../internal/scylla/models/summary.go | 63 + .../internal/scylla/models/token_range.go | 94 + .../internal/scylla/models/type.go | 66 + .../scylla/models/type_instance_id.go | 54 + .../internal/scylla/models/verb.go | 120 + .../internal/scylla/models/verb_counter.go | 74 + .../internal/scylla/models/version_value.go | 51 + .../scylla_v2/client/config/config_client.go | 6089 +++++++ ...onfig_abort_on_lsa_bad_alloc_parameters.go | 113 + ...config_abort_on_lsa_bad_alloc_responses.go | 113 + .../find_config_api_address_parameters.go | 113 + .../find_config_api_address_responses.go | 113 + .../find_config_api_doc_dir_parameters.go | 113 + .../find_config_api_doc_dir_responses.go | 113 + .../config/find_config_api_port_parameters.go | 113 + .../config/find_config_api_port_responses.go | 113 + .../find_config_api_ui_dir_parameters.go | 113 + .../find_config_api_ui_dir_responses.go | 113 + .../find_config_authenticator_parameters.go | 113 + .../find_config_authenticator_responses.go | 113 + .../find_config_authorizer_parameters.go | 113 + .../find_config_authorizer_responses.go | 113 + ...nfig_auto_adjust_flush_quota_parameters.go | 113 + ...onfig_auto_adjust_flush_quota_responses.go | 113 + .../find_config_auto_bootstrap_parameters.go | 113 + .../find_config_auto_bootstrap_responses.go | 113 + .../find_config_auto_snapshot_parameters.go | 113 + .../find_config_auto_snapshot_responses.go | 113 + ...ound_writer_scheduling_quota_parameters.go | 113 + ...round_writer_scheduling_quota_responses.go | 113 + ...ch_size_fail_threshold_in_kb_parameters.go | 113 + ...tch_size_fail_threshold_in_kb_responses.go | 113 + ...ch_size_warn_threshold_in_kb_parameters.go | 113 + ...tch_size_warn_threshold_in_kb_responses.go | 113 + ...tchlog_replay_throttle_in_kb_parameters.go | 113 + ...atchlog_replay_throttle_in_kb_responses.go | 113 + ...ind_config_broadcast_address_parameters.go | 113 + ...find_config_broadcast_address_responses.go | 113 + ...config_broadcast_rpc_address_parameters.go | 113 + ..._config_broadcast_rpc_address_responses.go | 113 + ...ache_hit_rate_read_balancing_parameters.go | 113 + ...cache_hit_rate_read_balancing_responses.go | 113 + ...cas_contention_timeout_in_ms_parameters.go | 113 + ..._cas_contention_timeout_in_ms_responses.go | 113 + ...ig_client_encryption_options_parameters.go | 113 + ...fig_client_encryption_options_responses.go | 113 + .../find_config_cluster_name_parameters.go | 113 + .../find_config_cluster_name_responses.go | 113 + ...nfig_column_index_size_in_kb_parameters.go | 113 + ...onfig_column_index_size_in_kb_responses.go | 113 + ...config_commit_failure_policy_parameters.go | 113 + ..._config_commit_failure_policy_responses.go | 113 + ...d_config_commitlog_directory_parameters.go | 113 + ...nd_config_commitlog_directory_responses.go | 113 + ...fig_commitlog_reuse_segments_parameters.go | 113 + ...nfig_commitlog_reuse_segments_responses.go | 113 + ...commitlog_segment_size_in_mb_parameters.go | 113 + ..._commitlog_segment_size_in_mb_responses.go | 113 + ...tlog_sync_batch_window_in_ms_parameters.go | 113 + ...itlog_sync_batch_window_in_ms_responses.go | 113 + .../find_config_commitlog_sync_parameters.go | 113 + ..._commitlog_sync_period_in_ms_parameters.go | 113 + ...g_commitlog_sync_period_in_ms_responses.go | 113 + .../find_config_commitlog_sync_responses.go | 113 + ..._commitlog_total_space_in_mb_parameters.go | 113 + ...g_commitlog_total_space_in_mb_responses.go | 113 + ..._config_commitlog_useo_dsync_parameters.go | 113 + ...d_config_commitlog_useo_dsync_responses.go | 113 + ...action_enforce_min_threshold_parameters.go | 113 + ...paction_enforce_min_threshold_responses.go | 113 + ...ge_cell_warning_threshold_mb_parameters.go | 113 + ...rge_cell_warning_threshold_mb_responses.go | 113 + ...rtition_warning_threshold_mb_parameters.go | 113 + ...artition_warning_threshold_mb_responses.go | 113 + ...rge_row_warning_threshold_mb_parameters.go | 113 + ...arge_row_warning_threshold_mb_responses.go | 113 + ...compaction_preheat_key_cache_parameters.go | 113 + ..._compaction_preheat_key_cache_responses.go | 113 + ...rows_count_warning_threshold_parameters.go | 113 + ..._rows_count_warning_threshold_responses.go | 113 + ...fig_compaction_static_shares_parameters.go | 113 + ...nfig_compaction_static_shares_responses.go | 113 + ...action_throughput_mb_per_sec_parameters.go | 113 + ...paction_throughput_mb_per_sec_responses.go | 113 + ...config_concurrent_compactors_parameters.go | 113 + ..._config_concurrent_compactors_responses.go | 113 + ...ig_concurrent_counter_writes_parameters.go | 113 + ...fig_concurrent_counter_writes_responses.go | 113 + ...find_config_concurrent_reads_parameters.go | 113 + .../find_config_concurrent_reads_responses.go | 113 + ...ind_config_concurrent_writes_parameters.go | 113 + ...find_config_concurrent_writes_responses.go | 113 + ...fig_consistent_rangemovement_parameters.go | 113 + ...nfig_consistent_rangemovement_responses.go | 113 + ...g_counter_cache_keys_to_save_parameters.go | 113 + ...ig_counter_cache_keys_to_save_responses.go | 113 + ...ig_counter_cache_save_period_parameters.go | 113 + ...fig_counter_cache_save_period_responses.go | 113 + ...fig_counter_cache_size_in_mb_parameters.go | 113 + ...nfig_counter_cache_size_in_mb_responses.go | 113 + ..._write_request_timeout_in_ms_parameters.go | 113 + ...r_write_request_timeout_in_ms_responses.go | 113 + .../find_config_cpu_scheduler_parameters.go | 113 + .../find_config_cpu_scheduler_responses.go | 113 + ...nd_config_cross_node_timeout_parameters.go | 113 + ...ind_config_cross_node_timeout_responses.go | 113 + ...config_data_file_directories_parameters.go | 113 + ..._config_data_file_directories_responses.go | 113 + ...ind_config_default_log_level_parameters.go | 113 + ...find_config_default_log_level_responses.go | 113 + ...ig_defragment_memory_on_idle_parameters.go | 113 + ...fig_defragment_memory_on_idle_responses.go | 113 + .../find_config_developer_mode_parameters.go | 113 + .../find_config_developer_mode_responses.go | 113 + ...d_config_disk_failure_policy_parameters.go | 113 + ...nd_config_disk_failure_policy_responses.go | 113 + ...mic_snitch_badness_threshold_parameters.go | 113 + ...amic_snitch_badness_threshold_responses.go | 113 + ..._snitch_reset_interval_in_ms_parameters.go | 113 + ...c_snitch_reset_interval_in_ms_responses.go | 113 + ...snitch_update_interval_in_ms_parameters.go | 113 + ..._snitch_update_interval_in_ms_responses.go | 113 + .../find_config_enable_cache_parameters.go | 113 + .../find_config_enable_cache_responses.go | 113 + ...find_config_enable_commitlog_parameters.go | 113 + .../find_config_enable_commitlog_responses.go | 113 + ...import_of_cassandra_counters_parameters.go | 113 + ..._import_of_cassandra_counters_responses.go | 113 + ...able_deprecated_partitioners_parameters.go | 113 + ...nable_deprecated_partitioners_responses.go | 113 + ..._enable_in_memory_data_store_parameters.go | 113 + ...g_enable_in_memory_data_store_responses.go | 113 + ...yspace_column_family_metrics_parameters.go | 113 + ...eyspace_column_family_metrics_responses.go | 113 + ...g_enable_shard_aware_drivers_parameters.go | 113 + ...ig_enable_shard_aware_drivers_responses.go | 113 + ...sstable_data_integrity_check_parameters.go | 113 + ..._sstable_data_integrity_check_responses.go | 113 + ...ig_enable_sstables_mc_format_parameters.go | 113 + ...fig_enable_sstables_mc_format_responses.go | 113 + .../find_config_endpoint_snitch_parameters.go | 113 + .../find_config_endpoint_snitch_responses.go | 113 + .../find_config_experimental_parameters.go | 113 + .../find_config_experimental_responses.go | 113 + ...d_config_fd_initial_value_ms_parameters.go | 113 + ...nd_config_fd_initial_value_ms_responses.go | 113 + ...nd_config_fd_max_interval_ms_parameters.go | 113 + ...ind_config_fd_max_interval_ms_responses.go | 113 + ...config_file_cache_size_in_mb_parameters.go | 113 + ..._config_file_cache_size_in_mb_responses.go | 113 + ...onfig_hinted_handoff_enabled_parameters.go | 113 + ...config_hinted_handoff_enabled_responses.go | 113 + ...inted_handoff_throttle_in_kb_parameters.go | 113 + ...hinted_handoff_throttle_in_kb_responses.go | 113 + .../find_config_hints_directory_parameters.go | 113 + .../find_config_hints_directory_responses.go | 113 + ...emory_compaction_limit_in_mb_parameters.go | 113 + ...memory_compaction_limit_in_mb_responses.go | 113 + ...d_config_incremental_backups_parameters.go | 113 + ...nd_config_incremental_backups_responses.go | 113 + ...index_summary_capacity_in_mb_parameters.go | 113 + ..._index_summary_capacity_in_mb_responses.go | 113 + ...y_resize_interval_in_minutes_parameters.go | 113 + ...ry_resize_interval_in_minutes_responses.go | 113 + .../find_config_initial_token_parameters.go | 113 + .../find_config_initial_token_responses.go | 113 + ...ut_outbound_megabits_per_sec_parameters.go | 113 + ...put_outbound_megabits_per_sec_responses.go | 113 + ..._config_inter_dc_tcp_nodelay_parameters.go | 113 + ...d_config_inter_dc_tcp_nodelay_responses.go | 113 + ...nfig_internode_authenticator_parameters.go | 113 + ...onfig_internode_authenticator_responses.go | 113 + ...config_internode_compression_parameters.go | 113 + ..._config_internode_compression_responses.go | 113 + ...node_recv_buff_size_in_bytes_parameters.go | 113 + ...rnode_recv_buff_size_in_bytes_responses.go | 113 + ...node_send_buff_size_in_bytes_parameters.go | 113 + ...rnode_send_buff_size_in_bytes_responses.go | 113 + .../find_config_join_ring_parameters.go | 113 + .../config/find_config_join_ring_responses.go | 113 + ...onfig_key_cache_keys_to_save_parameters.go | 113 + ...config_key_cache_keys_to_save_responses.go | 113 + ...config_key_cache_save_period_parameters.go | 113 + ..._config_key_cache_save_period_responses.go | 113 + ..._config_key_cache_size_in_mb_parameters.go | 113 + ...d_config_key_cache_size_in_mb_responses.go | 113 + ...allocation_warning_threshold_parameters.go | 113 + ..._allocation_warning_threshold_responses.go | 113 + .../find_config_listen_address_parameters.go | 113 + .../find_config_listen_address_responses.go | 113 + ...find_config_listen_interface_parameters.go | 113 + .../find_config_listen_interface_responses.go | 113 + ..._listen_on_broadcast_address_parameters.go | 113 + ...g_listen_on_broadcast_address_responses.go | 113 + .../find_config_load_balance_parameters.go | 113 + .../find_config_load_balance_responses.go | 113 + .../find_config_load_ring_state_parameters.go | 113 + .../find_config_load_ring_state_responses.go | 113 + .../find_config_log_to_stdout_parameters.go | 113 + .../find_config_log_to_stdout_responses.go | 113 + .../find_config_log_to_syslog_parameters.go | 113 + .../find_config_log_to_syslog_responses.go | 113 + ...find_config_logger_log_level_parameters.go | 113 + .../find_config_logger_log_level_responses.go | 113 + ..._config_lsa_reclamation_step_parameters.go | 113 + ...d_config_lsa_reclamation_step_responses.go | 113 + ...config_max_hint_window_in_ms_parameters.go | 113 + ..._config_max_hint_window_in_ms_responses.go | 113 + ...g_max_hints_delivery_threads_parameters.go | 113 + ...ig_max_hints_delivery_threads_responses.go | 113 + ...find_config_memory_allocator_parameters.go | 113 + .../find_config_memory_allocator_responses.go | 113 + ...fig_memtable_allocation_type_parameters.go | 113 + ...nfig_memtable_allocation_type_responses.go | 113 + ...g_memtable_cleanup_threshold_parameters.go | 113 + ...ig_memtable_cleanup_threshold_responses.go | 113 + ...ig_memtable_flush_queue_size_parameters.go | 113 + ...fig_memtable_flush_queue_size_responses.go | 113 + ...memtable_flush_static_shares_parameters.go | 113 + ..._memtable_flush_static_shares_responses.go | 113 + ...onfig_memtable_flush_writers_parameters.go | 113 + ...config_memtable_flush_writers_responses.go | 113 + ...ig_memtable_heap_space_in_mb_parameters.go | 113 + ...fig_memtable_heap_space_in_mb_responses.go | 113 + ...memtable_offheap_space_in_mb_parameters.go | 113 + ..._memtable_offheap_space_in_mb_responses.go | 113 + ...g_memtable_total_space_in_mb_parameters.go | 113 + ...ig_memtable_total_space_in_mb_responses.go | 113 + ..._partitioner_ignore_msb_bits_parameters.go | 113 + ...3_partitioner_ignore_msb_bits_responses.go | 113 + ...ansport_max_frame_size_in_mb_parameters.go | 113 + ...ransport_max_frame_size_in_mb_responses.go | 113 + ...native_transport_max_threads_parameters.go | 113 + ..._native_transport_max_threads_responses.go | 113 + ...config_native_transport_port_parameters.go | 113 + ..._config_native_transport_port_responses.go | 113 + ...ig_native_transport_port_ssl_parameters.go | 113 + ...fig_native_transport_port_ssl_responses.go | 113 + .../find_config_num_tokens_parameters.go | 113 + .../find_config_num_tokens_responses.go | 113 + ...config_override_decommission_parameters.go | 113 + ..._config_override_decommission_responses.go | 113 + .../find_config_partitioner_parameters.go | 113 + .../find_config_partitioner_responses.go | 113 + ...ermissions_cache_max_entries_parameters.go | 113 + ...permissions_cache_max_entries_responses.go | 113 + ...ssions_update_interval_in_ms_parameters.go | 113 + ...issions_update_interval_in_ms_responses.go | 113 + ...g_permissions_validity_in_ms_parameters.go | 113 + ...ig_permissions_validity_in_ms_responses.go | 113 + ...config_phi_convict_threshold_parameters.go | 113 + ..._config_phi_convict_threshold_responses.go | 113 + ...ig_preheat_kernel_page_cache_parameters.go | 113 + ...fig_preheat_kernel_page_cache_responses.go | 113 + ...nd_config_prometheus_address_parameters.go | 113 + ...ind_config_prometheus_address_responses.go | 113 + .../find_config_prometheus_port_parameters.go | 113 + .../find_config_prometheus_port_responses.go | 113 + ...ind_config_prometheus_prefix_parameters.go | 113 + ...find_config_prometheus_prefix_responses.go | 113 + ..._range_request_timeout_in_ms_parameters.go | 113 + ...g_range_request_timeout_in_ms_responses.go | 113 + ...g_read_request_timeout_in_ms_parameters.go | 113 + ...ig_read_request_timeout_in_ms_responses.go | 113 + ...fig_reduce_cache_capacity_to_parameters.go | 113 + ...nfig_reduce_cache_capacity_to_responses.go | 113 + ...config_reduce_cache_sizes_at_parameters.go | 113 + ..._config_reduce_cache_sizes_at_responses.go | 113 + ...g_replace_address_first_boot_parameters.go | 113 + ...ig_replace_address_first_boot_responses.go | 113 + .../find_config_replace_address_parameters.go | 113 + .../find_config_replace_address_responses.go | 113 + .../find_config_replace_node_parameters.go | 113 + .../find_config_replace_node_responses.go | 113 + .../find_config_replace_token_parameters.go | 113 + .../find_config_replace_token_responses.go | 113 + ..._config_request_scheduler_id_parameters.go | 113 + ...d_config_request_scheduler_id_responses.go | 113 + ...ig_request_scheduler_options_parameters.go | 113 + ...fig_request_scheduler_options_responses.go | 113 + ...ind_config_request_scheduler_parameters.go | 113 + ...find_config_request_scheduler_responses.go | 113 + ...config_request_timeout_in_ms_parameters.go | 113 + ..._config_request_timeout_in_ms_responses.go | 113 + .../find_config_ring_delay_ms_parameters.go | 113 + .../find_config_ring_delay_ms_responses.go | 113 + .../find_config_role_manager_parameters.go | 113 + .../find_config_role_manager_responses.go | 113 + ...onfig_row_cache_keys_to_save_parameters.go | 113 + ...config_row_cache_keys_to_save_responses.go | 113 + ...config_row_cache_save_period_parameters.go | 113 + ..._config_row_cache_save_period_responses.go | 113 + ..._config_row_cache_size_in_mb_parameters.go | 113 + ...d_config_row_cache_size_in_mb_responses.go | 113 + .../find_config_rpc_address_parameters.go | 113 + .../find_config_rpc_address_responses.go | 113 + .../find_config_rpc_interface_parameters.go | 113 + .../find_config_rpc_interface_responses.go | 113 + .../find_config_rpc_keepalive_parameters.go | 113 + .../find_config_rpc_keepalive_responses.go | 113 + .../find_config_rpc_max_threads_parameters.go | 113 + .../find_config_rpc_max_threads_responses.go | 113 + .../find_config_rpc_min_threads_parameters.go | 113 + .../find_config_rpc_min_threads_responses.go | 113 + .../config/find_config_rpc_port_parameters.go | 113 + .../config/find_config_rpc_port_responses.go | 113 + ..._rpc_recv_buff_size_in_bytes_parameters.go | 113 + ...g_rpc_recv_buff_size_in_bytes_responses.go | 113 + ..._rpc_send_buff_size_in_bytes_parameters.go | 113 + ...g_rpc_send_buff_size_in_bytes_responses.go | 113 + .../find_config_rpc_server_type_parameters.go | 113 + .../find_config_rpc_server_type_responses.go | 113 + ...onfig_saved_caches_directory_parameters.go | 113 + ...config_saved_caches_directory_responses.go | 113 + .../find_config_seed_provider_parameters.go | 113 + .../find_config_seed_provider_responses.go | 113 + ...ig_server_encryption_options_parameters.go | 113 + ...fig_server_encryption_options_responses.go | 113 + .../find_config_shadow_round_ms_parameters.go | 113 + .../find_config_shadow_round_ms_responses.go | 113 + ...nfig_shutdown_announce_in_ms_parameters.go | 113 + ...onfig_shutdown_announce_in_ms_responses.go | 113 + ...ip_wait_for_gossip_to_settle_parameters.go | 113 + ...kip_wait_for_gossip_to_settle_responses.go | 113 + ...g_snapshot_before_compaction_parameters.go | 113 + ...ig_snapshot_before_compaction_responses.go | 113 + ...find_config_ssl_storage_port_parameters.go | 113 + .../find_config_ssl_storage_port_responses.go | 113 + ...eemptive_open_interval_in_mb_parameters.go | 113 + ...reemptive_open_interval_in_mb_responses.go | 113 + ...config_sstable_summary_ratio_parameters.go | 113 + ..._config_sstable_summary_ratio_responses.go | 113 + ...onfig_start_native_transport_parameters.go | 113 + ...config_start_native_transport_responses.go | 113 + .../find_config_start_rpc_parameters.go | 113 + .../config/find_config_start_rpc_responses.go | 113 + .../find_config_storage_port_parameters.go | 113 + .../find_config_storage_port_responses.go | 113 + ...ut_outbound_megabits_per_sec_parameters.go | 113 + ...put_outbound_megabits_per_sec_responses.go | 113 + ...reaming_socket_timeout_in_ms_parameters.go | 113 + ...treaming_socket_timeout_in_ms_responses.go | 113 + ..._framed_transport_size_in_mb_parameters.go | 113 + ...t_framed_transport_size_in_mb_responses.go | 113 + ...ift_max_message_length_in_mb_parameters.go | 113 + ...rift_max_message_length_in_mb_responses.go | 113 + ..._tombstone_failure_threshold_parameters.go | 113 + ...g_tombstone_failure_threshold_responses.go | 113 + ...fig_tombstone_warn_threshold_parameters.go | 113 + ...nfig_tombstone_warn_threshold_responses.go | 113 + ...trickle_fsync_interval_in_kb_parameters.go | 113 + ..._trickle_fsync_interval_in_kb_responses.go | 113 + .../find_config_trickle_fsync_parameters.go | 113 + .../find_config_trickle_fsync_responses.go | 113 + ...uncate_request_timeout_in_ms_parameters.go | 113 + ...runcate_request_timeout_in_ms_responses.go | 113 + .../find_config_view_building_parameters.go | 113 + .../find_config_view_building_responses.go | 113 + ..._config_view_hints_directory_parameters.go | 113 + ...d_config_view_hints_directory_responses.go | 113 + ...fig_virtual_dirty_soft_limit_parameters.go | 113 + ...nfig_virtual_dirty_soft_limit_responses.go | 113 + ..._system_keyspace_for_testing_parameters.go | 113 + ...e_system_keyspace_for_testing_responses.go | 113 + ..._write_request_timeout_in_ms_parameters.go | 113 + ...g_write_request_timeout_in_ms_responses.go | 113 + .../scylla_v2/client/scylla2_client.go | 117 + .../internal/scylla_v2/models/error_model.go | 46 + .../internal/templates/client/client.gotmpl | 111 + .../internal/templates/client/response.gotmpl | 166 + pkg/scyllaclient/internalgen.sh | 17 + pkg/scyllaclient/log.go | 52 + pkg/scyllaclient/model.go | 248 + pkg/scyllaclient/retry.go | 149 + pkg/scyllaclient/scylla.json | 13495 +++++++++++++++ pkg/scyllaclient/scylla_v2.json | 4895 ++++++ pkg/scyllaclient/status.go | 39 + pkg/scyllaclient/timeout.go | 48 + pkg/sidecar/checks.go | 60 +- pkg/sidecar/config/config.go | 75 - pkg/sidecar/sidecar_controller.go | 37 +- pkg/sidecar/sync.go | 11 +- pkg/util/httpx/clone.go | 40 + pkg/util/httpx/rt.go | 15 + pkg/util/network/network.go | 22 + pkg/util/retry/backoff.go | 55 + pkg/util/retry/retry.go | 29 + pkg/util/timeutc/timeutc.go | 37 + pkg/util/timeutc/timeutc_test.go | 24 + timeutc/timeutc.go | 37 + timeutc/timeutc_test.go | 24 + .../github.com/PuerkitoBio/purell/.gitignore | 5 + .../github.com/PuerkitoBio/purell/.travis.yml | 12 + vendor/github.com/PuerkitoBio/purell/LICENSE | 12 + .../github.com/PuerkitoBio/purell/README.md | 188 + .../github.com/PuerkitoBio/purell/purell.go | 379 + .../github.com/PuerkitoBio/urlesc/.travis.yml | 15 + vendor/github.com/PuerkitoBio/urlesc/LICENSE | 27 + .../github.com/PuerkitoBio/urlesc/README.md | 16 + .../github.com/PuerkitoBio/urlesc/urlesc.go | 180 + .../asaskevich/govalidator/.gitignore | 15 + .../asaskevich/govalidator/.travis.yml | 18 + .../asaskevich/govalidator/CONTRIBUTING.md | 63 + .../github.com/asaskevich/govalidator/LICENSE | 21 + .../asaskevich/govalidator/README.md | 605 + .../asaskevich/govalidator/arrays.go | 58 + .../asaskevich/govalidator/converter.go | 64 + .../github.com/asaskevich/govalidator/doc.go | 3 + .../asaskevich/govalidator/error.go | 43 + .../github.com/asaskevich/govalidator/go.mod | 3 + .../asaskevich/govalidator/numerics.go | 97 + .../asaskevich/govalidator/patterns.go | 103 + .../asaskevich/govalidator/types.go | 652 + .../asaskevich/govalidator/utils.go | 270 + .../asaskevich/govalidator/validator.go | 1524 ++ .../asaskevich/govalidator/wercker.yml | 15 + vendor/github.com/cenkalti/backoff/.gitignore | 22 + .../github.com/cenkalti/backoff/.travis.yml | 10 + vendor/github.com/cenkalti/backoff/LICENSE | 20 + vendor/github.com/cenkalti/backoff/README.md | 33 + vendor/github.com/cenkalti/backoff/backoff.go | 66 + vendor/github.com/cenkalti/backoff/context.go | 66 + .../cenkalti/backoff/exponential.go | 156 + vendor/github.com/cenkalti/backoff/go.mod | 3 + vendor/github.com/cenkalti/backoff/retry.go | 96 + vendor/github.com/cenkalti/backoff/ticker.go | 94 + vendor/github.com/cenkalti/backoff/timer.go | 35 + vendor/github.com/cenkalti/backoff/tries.go | 38 + .../go-openapi/analysis/.codecov.yml | 5 + .../github.com/go-openapi/analysis/.gitignore | 5 + .../go-openapi/analysis/.golangci.yml | 32 + .../go-openapi/analysis/.travis.yml | 13 + .../go-openapi/analysis/CODE_OF_CONDUCT.md | 74 + .../analysis}/LICENSE | 3 +- .../github.com/go-openapi/analysis/README.md | 9 + .../go-openapi/analysis/analyzer.go | 978 ++ .../go-openapi/analysis/appveyor.yml | 33 + .../github.com/go-openapi/analysis/debug.go | 47 + vendor/github.com/go-openapi/analysis/doc.go | 43 + .../github.com/go-openapi/analysis/fixer.go | 76 + .../github.com/go-openapi/analysis/flatten.go | 1757 ++ vendor/github.com/go-openapi/analysis/go.mod | 23 + vendor/github.com/go-openapi/analysis/go.sum | 186 + .../go-openapi/analysis/internal/post_go18.go | 29 + .../go-openapi/analysis/internal/pre_go18.go | 29 + .../github.com/go-openapi/analysis/mixin.go | 431 + .../github.com/go-openapi/analysis/schema.go | 234 + .../github.com/go-openapi/errors/.gitignore | 2 + .../go-openapi/errors/.golangci.yml | 20 + .../github.com/go-openapi/errors/.travis.yml | 13 + .../go-openapi/errors/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/errors/LICENSE | 202 + vendor/github.com/go-openapi/errors/README.md | 8 + vendor/github.com/go-openapi/errors/api.go | 164 + vendor/github.com/go-openapi/errors/auth.go | 22 + vendor/github.com/go-openapi/errors/doc.go | 28 + vendor/github.com/go-openapi/errors/go.mod | 6 + vendor/github.com/go-openapi/errors/go.sum | 9 + .../github.com/go-openapi/errors/headers.go | 85 + .../go-openapi/errors/middleware.go | 51 + .../github.com/go-openapi/errors/parsing.go | 59 + vendor/github.com/go-openapi/errors/schema.go | 562 + .../go-openapi/jsonpointer/.editorconfig | 26 + .../go-openapi/jsonpointer/.gitignore | 1 + .../go-openapi/jsonpointer/.travis.yml | 15 + .../go-openapi/jsonpointer/CODE_OF_CONDUCT.md | 74 + .../github.com/go-openapi/jsonpointer/LICENSE | 202 + .../go-openapi/jsonpointer/README.md | 15 + .../github.com/go-openapi/jsonpointer/go.mod | 9 + .../github.com/go-openapi/jsonpointer/go.sum | 24 + .../go-openapi/jsonpointer/pointer.go | 390 + .../go-openapi/jsonreference/.gitignore | 1 + .../go-openapi/jsonreference/.travis.yml | 15 + .../jsonreference/CODE_OF_CONDUCT.md | 74 + .../go-openapi/jsonreference/LICENSE | 202 + .../go-openapi/jsonreference/README.md | 15 + .../go-openapi/jsonreference/go.mod | 12 + .../go-openapi/jsonreference/go.sum | 44 + .../go-openapi/jsonreference/reference.go | 156 + .../github.com/go-openapi/loads/.editorconfig | 26 + vendor/github.com/go-openapi/loads/.gitignore | 4 + .../github.com/go-openapi/loads/.golangci.yml | 22 + .../github.com/go-openapi/loads/.travis.yml | 13 + .../go-openapi/loads/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/loads/LICENSE | 202 + vendor/github.com/go-openapi/loads/README.md | 7 + vendor/github.com/go-openapi/loads/doc.go | 21 + vendor/github.com/go-openapi/loads/go.mod | 11 + vendor/github.com/go-openapi/loads/go.sum | 180 + vendor/github.com/go-openapi/loads/spec.go | 298 + .../go-openapi/runtime/.editorconfig | 26 + .../github.com/go-openapi/runtime/.gitignore | 5 + .../github.com/go-openapi/runtime/.travis.yml | 13 + .../go-openapi/runtime/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/runtime/LICENSE | 202 + .../github.com/go-openapi/runtime/README.md | 7 + .../go-openapi/runtime/bytestream.go | 155 + .../go-openapi/runtime/client/auth_info.go | 61 + .../go-openapi/runtime/client/keepalive.go | 53 + .../go-openapi/runtime/client/request.go | 431 + .../go-openapi/runtime/client/response.go | 44 + .../go-openapi/runtime/client/runtime.go | 481 + .../go-openapi/runtime/client_auth_info.go | 30 + .../go-openapi/runtime/client_operation.go | 41 + .../go-openapi/runtime/client_request.go | 103 + .../go-openapi/runtime/client_response.go | 63 + .../go-openapi/runtime/constants.go | 47 + vendor/github.com/go-openapi/runtime/csv.go | 77 + .../github.com/go-openapi/runtime/discard.go | 9 + vendor/github.com/go-openapi/runtime/file.go | 33 + vendor/github.com/go-openapi/runtime/go.mod | 16 + vendor/github.com/go-openapi/runtime/go.sum | 149 + .../github.com/go-openapi/runtime/headers.go | 45 + .../go-openapi/runtime/interfaces.go | 103 + vendor/github.com/go-openapi/runtime/json.go | 38 + .../go-openapi/runtime/logger/logger.go | 20 + .../go-openapi/runtime/logger/standard.go | 22 + .../go-openapi/runtime/middleware/context.go | 592 + .../runtime/middleware/denco/LICENSE | 19 + .../runtime/middleware/denco/README.md | 180 + .../runtime/middleware/denco/router.go | 456 + .../runtime/middleware/denco/server.go | 106 + .../runtime/middleware/denco/util.go | 12 + .../go-openapi/runtime/middleware/doc.go | 62 + .../go-openapi/runtime/middleware/go18.go | 9 + .../runtime/middleware/header/header.go | 326 + .../runtime/middleware/negotiate.go | 98 + .../runtime/middleware/not_implemented.go | 48 + .../runtime/middleware/operation.go | 30 + .../runtime/middleware/parameter.go | 481 + .../go-openapi/runtime/middleware/pre_go18.go | 9 + .../go-openapi/runtime/middleware/redoc.go | 103 + .../go-openapi/runtime/middleware/request.go | 104 + .../go-openapi/runtime/middleware/router.go | 478 + .../go-openapi/runtime/middleware/security.go | 39 + .../go-openapi/runtime/middleware/spec.go | 48 + .../runtime/middleware/untyped/api.go | 286 + .../runtime/middleware/validation.go | 123 + .../github.com/go-openapi/runtime/request.go | 139 + .../runtime/security/authenticator.go | 276 + .../go-openapi/runtime/security/authorizer.go | 27 + .../github.com/go-openapi/runtime/statuses.go | 90 + vendor/github.com/go-openapi/runtime/text.go | 117 + .../github.com/go-openapi/runtime/values.go | 19 + vendor/github.com/go-openapi/runtime/xml.go | 36 + .../github.com/go-openapi/spec/.editorconfig | 26 + vendor/github.com/go-openapi/spec/.gitignore | 2 + .../github.com/go-openapi/spec/.golangci.yml | 28 + vendor/github.com/go-openapi/spec/.travis.yml | 13 + .../go-openapi/spec/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/spec/LICENSE | 202 + vendor/github.com/go-openapi/spec/README.md | 10 + vendor/github.com/go-openapi/spec/bindata.go | 297 + vendor/github.com/go-openapi/spec/cache.go | 60 + .../go-openapi/spec/contact_info.go | 54 + vendor/github.com/go-openapi/spec/debug.go | 47 + vendor/github.com/go-openapi/spec/expander.go | 651 + .../go-openapi/spec/external_docs.go | 24 + vendor/github.com/go-openapi/spec/go.mod | 12 + vendor/github.com/go-openapi/spec/go.sum | 49 + vendor/github.com/go-openapi/spec/header.go | 197 + vendor/github.com/go-openapi/spec/info.go | 165 + vendor/github.com/go-openapi/spec/items.go | 244 + vendor/github.com/go-openapi/spec/license.go | 53 + .../github.com/go-openapi/spec/normalizer.go | 152 + .../github.com/go-openapi/spec/operation.go | 398 + .../github.com/go-openapi/spec/parameter.go | 321 + .../github.com/go-openapi/spec/path_item.go | 87 + vendor/github.com/go-openapi/spec/paths.go | 97 + vendor/github.com/go-openapi/spec/ref.go | 193 + vendor/github.com/go-openapi/spec/response.go | 131 + .../github.com/go-openapi/spec/responses.go | 127 + vendor/github.com/go-openapi/spec/schema.go | 596 + .../go-openapi/spec/schema_loader.go | 271 + .../go-openapi/spec/security_scheme.go | 140 + vendor/github.com/go-openapi/spec/spec.go | 86 + vendor/github.com/go-openapi/spec/swagger.go | 448 + vendor/github.com/go-openapi/spec/tag.go | 75 + vendor/github.com/go-openapi/spec/unused.go | 174 + .../github.com/go-openapi/spec/xml_object.go | 68 + .../go-openapi/strfmt/.editorconfig | 26 + .../github.com/go-openapi/strfmt/.gitignore | 2 + .../go-openapi/strfmt/.golangci.yml | 36 + .../github.com/go-openapi/strfmt/.travis.yml | 15 + .../go-openapi/strfmt/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/strfmt/LICENSE | 202 + vendor/github.com/go-openapi/strfmt/README.md | 86 + vendor/github.com/go-openapi/strfmt/bson.go | 165 + vendor/github.com/go-openapi/strfmt/date.go | 182 + .../github.com/go-openapi/strfmt/default.go | 2035 +++ vendor/github.com/go-openapi/strfmt/doc.go | 18 + .../github.com/go-openapi/strfmt/duration.go | 211 + vendor/github.com/go-openapi/strfmt/format.go | 314 + vendor/github.com/go-openapi/strfmt/go.mod | 15 + vendor/github.com/go-openapi/strfmt/go.sum | 25 + vendor/github.com/go-openapi/strfmt/time.go | 263 + .../github.com/go-openapi/swag/.editorconfig | 26 + vendor/github.com/go-openapi/swag/.gitignore | 4 + .../github.com/go-openapi/swag/.golangci.yml | 22 + vendor/github.com/go-openapi/swag/.travis.yml | 13 + .../go-openapi/swag/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/swag/LICENSE | 202 + vendor/github.com/go-openapi/swag/README.md | 22 + vendor/github.com/go-openapi/swag/convert.go | 208 + .../go-openapi/swag/convert_types.go | 595 + vendor/github.com/go-openapi/swag/doc.go | 32 + vendor/github.com/go-openapi/swag/go.mod | 16 + vendor/github.com/go-openapi/swag/go.sum | 20 + vendor/github.com/go-openapi/swag/json.go | 312 + vendor/github.com/go-openapi/swag/loading.go | 80 + .../github.com/go-openapi/swag/name_lexem.go | 87 + vendor/github.com/go-openapi/swag/net.go | 38 + vendor/github.com/go-openapi/swag/path.go | 59 + .../github.com/go-openapi/swag/post_go18.go | 23 + .../github.com/go-openapi/swag/post_go19.go | 67 + vendor/github.com/go-openapi/swag/pre_go18.go | 23 + vendor/github.com/go-openapi/swag/pre_go19.go | 69 + vendor/github.com/go-openapi/swag/split.go | 262 + vendor/github.com/go-openapi/swag/util.go | 385 + vendor/github.com/go-openapi/swag/yaml.go | 246 + .../go-openapi/validate/.editorconfig | 26 + .../github.com/go-openapi/validate/.gitignore | 5 + .../go-openapi/validate/.golangci.yml | 28 + .../go-openapi/validate/.travis.yml | 17 + .../go-openapi/validate/CODE_OF_CONDUCT.md | 74 + vendor/github.com/go-openapi/validate/LICENSE | 202 + .../github.com/go-openapi/validate/README.md | 6 + .../github.com/go-openapi/validate/debug.go | 47 + .../go-openapi/validate/default_validator.go | 281 + vendor/github.com/go-openapi/validate/doc.go | 85 + .../go-openapi/validate/example_validator.go | 270 + .../github.com/go-openapi/validate/formats.go | 69 + vendor/github.com/go-openapi/validate/go.mod | 20 + vendor/github.com/go-openapi/validate/go.sum | 156 + .../github.com/go-openapi/validate/helpers.go | 324 + .../go-openapi/validate/object_validator.go | 279 + .../github.com/go-openapi/validate/options.go | 43 + .../github.com/go-openapi/validate/result.go | 486 + vendor/github.com/go-openapi/validate/rexp.go | 71 + .../github.com/go-openapi/validate/schema.go | 260 + .../go-openapi/validate/schema_messages.go | 78 + .../go-openapi/validate/schema_option.go | 54 + .../go-openapi/validate/schema_props.go | 240 + .../go-openapi/validate/slice_validator.go | 105 + vendor/github.com/go-openapi/validate/spec.go | 795 + .../go-openapi/validate/spec_messages.go | 360 + vendor/github.com/go-openapi/validate/type.go | 178 + .../go-openapi/validate/update-fixtures.sh | 15 + .../go-openapi/validate/validator.go | 646 + .../github.com/go-openapi/validate/values.go | 398 + vendor/github.com/go-stack/stack/.travis.yml | 15 + vendor/github.com/go-stack/stack/LICENSE.md | 21 + vendor/github.com/go-stack/stack/README.md | 38 + vendor/github.com/go-stack/stack/go.mod | 1 + vendor/github.com/go-stack/stack/stack.go | 400 + .../hailocab/go-hostpool/.gitignore | 22 + .../hailocab/go-hostpool/.travis.yml | 0 .../github.com/hailocab/go-hostpool/LICENSE | 21 + .../github.com/hailocab/go-hostpool/README.md | 17 + .../hailocab/go-hostpool/epsilon_greedy.go | 220 + .../go-hostpool/epsilon_value_calculators.go | 40 + .../hailocab/go-hostpool/host_entry.go | 62 + .../hailocab/go-hostpool/hostpool.go | 243 + vendor/github.com/mailru/easyjson/LICENSE | 7 + .../github.com/mailru/easyjson/buffer/pool.go | 270 + .../mailru/easyjson/jlexer/bytestostr.go | 24 + .../easyjson/jlexer/bytestostr_nounsafe.go | 13 + .../mailru/easyjson/jlexer/error.go | 15 + .../mailru/easyjson/jlexer/lexer.go | 1182 ++ .../mailru/easyjson/jwriter/writer.go | 407 + .../mitchellh/mapstructure/.travis.yml | 8 + .../mitchellh/mapstructure/CHANGELOG.md | 21 + .../github.com/mitchellh/mapstructure/LICENSE | 21 + .../mitchellh/mapstructure/README.md | 46 + .../mitchellh/mapstructure/decode_hooks.go | 217 + .../mitchellh/mapstructure/error.go | 50 + .../github.com/mitchellh/mapstructure/go.mod | 1 + .../mitchellh/mapstructure/mapstructure.go | 1149 ++ vendor/github.com/scylladb/go-set/LICENSE | 177 + .../scylladb/go-set/strset/strset.go | 279 + .../yanniszark/go-nodetool/client/client.go | 148 - .../yanniszark/go-nodetool/client/fake.go | 14 - .../go-nodetool/nodetool/decommission.go | 14 - .../go-nodetool/nodetool/nodetool.go | 25 - .../yanniszark/go-nodetool/nodetool/opmode.go | 61 - .../yanniszark/go-nodetool/nodetool/status.go | 163 - .../go-nodetool/nodetool/version.go | 35 - .../yanniszark/go-nodetool/version/version.go | 99 - vendor/go.mongodb.org/mongo-driver/LICENSE | 201 + .../mongo-driver/THIRD-PARTY-NOTICES | 1336 ++ .../go.mongodb.org/mongo-driver/bson/bson.go | 50 + .../mongo-driver/bson/bson_1_8.go | 81 + .../mongo-driver/bson/bsoncodec/bsoncodec.go | 163 + .../bson/bsoncodec/byte_slice_codec.go | 87 + .../bson/bsoncodec/default_value_decoders.go | 1249 ++ .../bson/bsoncodec/default_value_encoders.go | 771 + .../mongo-driver/bson/bsoncodec/doc.go | 84 + .../bson/bsoncodec/empty_interface_codec.go | 125 + .../mongo-driver/bson/bsoncodec/map_codec.go | 206 + .../mongo-driver/bson/bsoncodec/mode.go | 65 + .../bson/bsoncodec/pointer_codec.go | 110 + .../mongo-driver/bson/bsoncodec/proxy.go | 14 + .../mongo-driver/bson/bsoncodec/registry.go | 456 + .../bson/bsoncodec/slice_codec.go | 196 + .../bson/bsoncodec/string_codec.go | 94 + .../bson/bsoncodec/struct_codec.go | 536 + .../bson/bsoncodec/struct_tag_parser.go | 119 + .../mongo-driver/bson/bsoncodec/time_codec.go | 101 + .../mongo-driver/bson/bsoncodec/types.go | 81 + .../mongo-driver/bson/bsoncodec/uint_codec.go | 150 + .../bsonoptions/byte_slice_codec_options.go | 38 + .../empty_interface_codec_options.go | 38 + .../bson/bsonoptions/map_codec_options.go | 48 + .../bson/bsonoptions/slice_codec_options.go | 38 + .../bson/bsonoptions/string_codec_options.go | 41 + .../bson/bsonoptions/struct_codec_options.go | 70 + .../bson/bsonoptions/time_codec_options.go | 38 + .../bson/bsonoptions/uint_codec_options.go | 38 + .../mongo-driver/bson/bsonrw/copier.go | 389 + .../mongo-driver/bson/bsonrw/doc.go | 9 + .../bson/bsonrw/extjson_parser.go | 731 + .../bson/bsonrw/extjson_reader.go | 659 + .../bson/bsonrw/extjson_tables.go | 223 + .../bson/bsonrw/extjson_wrappers.go | 495 + .../bson/bsonrw/extjson_writer.go | 737 + .../mongo-driver/bson/bsonrw/json_scanner.go | 439 + .../mongo-driver/bson/bsonrw/mode.go | 108 + .../mongo-driver/bson/bsonrw/reader.go | 63 + .../mongo-driver/bson/bsonrw/value_reader.go | 886 + .../mongo-driver/bson/bsonrw/value_writer.go | 604 + .../mongo-driver/bson/bsonrw/writer.go | 102 + .../mongo-driver/bson/bsontype/bsontype.go | 95 + .../mongo-driver/bson/decoder.go | 118 + .../go.mongodb.org/mongo-driver/bson/doc.go | 120 + .../mongo-driver/bson/encoder.go | 99 + .../mongo-driver/bson/marshal.go | 223 + .../mongo-driver/bson/primitive/decimal.go | 376 + .../mongo-driver/bson/primitive/objectid.go | 165 + .../mongo-driver/bson/primitive/primitive.go | 196 + .../mongo-driver/bson/primitive_codecs.go | 111 + .../go.mongodb.org/mongo-driver/bson/raw.go | 92 + .../mongo-driver/bson/raw_element.go | 51 + .../mongo-driver/bson/raw_value.go | 287 + .../mongo-driver/bson/registry.go | 24 + .../go.mongodb.org/mongo-driver/bson/types.go | 85 + .../mongo-driver/bson/unmarshal.go | 101 + .../mongo-driver/etc/generate-notices.pl | 99 + .../mongo-driver/x/bsonx/bsoncore/bsoncore.go | 843 + .../mongo-driver/x/bsonx/bsoncore/document.go | 399 + .../x/bsonx/bsoncore/document_sequence.go | 183 + .../mongo-driver/x/bsonx/bsoncore/element.go | 152 + .../mongo-driver/x/bsonx/bsoncore/tables.go | 223 + .../mongo-driver/x/bsonx/bsoncore/value.go | 1015 ++ vendor/golang.org/x/text/width/gen.go | 115 + vendor/golang.org/x/text/width/gen_common.go | 96 + vendor/golang.org/x/text/width/gen_trieval.go | 34 + vendor/golang.org/x/text/width/kind_string.go | 16 + .../golang.org/x/text/width/tables10.0.0.go | 1318 ++ vendor/golang.org/x/text/width/tables9.0.0.go | 1286 ++ vendor/golang.org/x/text/width/transform.go | 239 + vendor/golang.org/x/text/width/trieval.go | 30 + vendor/golang.org/x/text/width/width.go | 206 + 1654 files changed, 248213 insertions(+), 709 deletions(-) create mode 100644 pkg/auth/auth.go create mode 100644 pkg/auth/auth_test.go create mode 100644 pkg/scyllaclient/agent.json create mode 100644 pkg/scyllaclient/client.go create mode 100644 pkg/scyllaclient/config.go create mode 100644 pkg/scyllaclient/context.go create mode 100644 pkg/scyllaclient/hostpool.go create mode 100644 pkg/scyllaclient/internal/agent/client/agent_client.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/job_info_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/job_info_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/job_stop_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/job_stop_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/node_info_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/node_info_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_about_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_about_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_cat_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_cat_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_client.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_list_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_list_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_movefile_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_movefile_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_purge_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/operations_purge_responses.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/sync_copy_parameters.go create mode 100644 pkg/scyllaclient/internal/agent/client/operations/sync_copy_responses.go create mode 100644 pkg/scyllaclient/internal/agent/models/bandwidth.go create mode 100644 pkg/scyllaclient/internal/agent/models/content.go create mode 100644 pkg/scyllaclient/internal/agent/models/error_response.go create mode 100644 pkg/scyllaclient/internal/agent/models/file_system_details.go create mode 100644 pkg/scyllaclient/internal/agent/models/group_list.go create mode 100644 pkg/scyllaclient/internal/agent/models/job.go create mode 100644 pkg/scyllaclient/internal/agent/models/job_info.go create mode 100644 pkg/scyllaclient/internal/agent/models/job_info_params.go create mode 100644 pkg/scyllaclient/internal/agent/models/jobid.go create mode 100644 pkg/scyllaclient/internal/agent/models/list_item.go create mode 100644 pkg/scyllaclient/internal/agent/models/list_options.go create mode 100644 pkg/scyllaclient/internal/agent/models/move_or_copy_file_options.go create mode 100644 pkg/scyllaclient/internal/agent/models/node_info.go create mode 100644 pkg/scyllaclient/internal/agent/models/remote.go create mode 100644 pkg/scyllaclient/internal/agent/models/remote_path.go create mode 100644 pkg/scyllaclient/internal/agent/models/stats.go create mode 100644 pkg/scyllaclient/internal/agent/models/stats_params.go create mode 100644 pkg/scyllaclient/internal/agent/models/transfer.go create mode 100644 pkg/scyllaclient/internal/agent/templates/client/client.gotmpl create mode 100644 pkg/scyllaclient/internal/agent/templates/client/response.gotmpl create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/collectd_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/operations_client.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_responses.go create mode 100644 pkg/scyllaclient/internal/scylla/client/scylla_client.go create mode 100644 pkg/scyllaclient/internal/scylla/models/collectd_metric_status.go create mode 100644 pkg/scyllaclient/internal/scylla/models/collectd_value.go create mode 100644 pkg/scyllaclient/internal/scylla/models/column_family_info.go create mode 100644 pkg/scyllaclient/internal/scylla/models/compaction_info.go create mode 100644 pkg/scyllaclient/internal/scylla/models/direction.go create mode 100644 pkg/scyllaclient/internal/scylla/models/endpoint_detail.go create mode 100644 pkg/scyllaclient/internal/scylla/models/endpoint_phi_value.go create mode 100644 pkg/scyllaclient/internal/scylla/models/endpoint_state.go create mode 100644 pkg/scyllaclient/internal/scylla/models/error_model.go create mode 100644 pkg/scyllaclient/internal/scylla/models/estimated_histogram.go create mode 100644 pkg/scyllaclient/internal/scylla/models/histogram.go create mode 100644 pkg/scyllaclient/internal/scylla/models/history.go create mode 100644 pkg/scyllaclient/internal/scylla/models/level.go create mode 100644 pkg/scyllaclient/internal/scylla/models/map_string_double.go create mode 100644 pkg/scyllaclient/internal/scylla/models/maplist_mapper.go create mode 100644 pkg/scyllaclient/internal/scylla/models/mapper.go create mode 100644 pkg/scyllaclient/internal/scylla/models/mapper_list.go create mode 100644 pkg/scyllaclient/internal/scylla/models/message_counter.go create mode 100644 pkg/scyllaclient/internal/scylla/models/progress_info.go create mode 100644 pkg/scyllaclient/internal/scylla/models/progress_info_mapper.go create mode 100644 pkg/scyllaclient/internal/scylla/models/rate_moving_average.go create mode 100644 pkg/scyllaclient/internal/scylla/models/rate_moving_average_and_histogram.go create mode 100644 pkg/scyllaclient/internal/scylla/models/repair_async_status_response.go create mode 100644 pkg/scyllaclient/internal/scylla/models/row_merged.go create mode 100644 pkg/scyllaclient/internal/scylla/models/slow_query_info.go create mode 100644 pkg/scyllaclient/internal/scylla/models/snapshot.go create mode 100644 pkg/scyllaclient/internal/scylla/models/snapshots.go create mode 100644 pkg/scyllaclient/internal/scylla/models/state.go create mode 100644 pkg/scyllaclient/internal/scylla/models/stream_info.go create mode 100644 pkg/scyllaclient/internal/scylla/models/stream_state.go create mode 100644 pkg/scyllaclient/internal/scylla/models/stream_summary.go create mode 100644 pkg/scyllaclient/internal/scylla/models/summary.go create mode 100644 pkg/scyllaclient/internal/scylla/models/token_range.go create mode 100644 pkg/scyllaclient/internal/scylla/models/type.go create mode 100644 pkg/scyllaclient/internal/scylla/models/type_instance_id.go create mode 100644 pkg/scyllaclient/internal/scylla/models/verb.go create mode 100644 pkg/scyllaclient/internal/scylla/models/verb_counter.go create mode 100644 pkg/scyllaclient/internal/scylla/models/version_value.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/config_client.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_parameters.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_responses.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/client/scylla2_client.go create mode 100644 pkg/scyllaclient/internal/scylla_v2/models/error_model.go create mode 100644 pkg/scyllaclient/internal/templates/client/client.gotmpl create mode 100644 pkg/scyllaclient/internal/templates/client/response.gotmpl create mode 100755 pkg/scyllaclient/internalgen.sh create mode 100644 pkg/scyllaclient/log.go create mode 100644 pkg/scyllaclient/model.go create mode 100644 pkg/scyllaclient/retry.go create mode 100644 pkg/scyllaclient/scylla.json create mode 100644 pkg/scyllaclient/scylla_v2.json create mode 100644 pkg/scyllaclient/status.go create mode 100644 pkg/scyllaclient/timeout.go create mode 100644 pkg/util/httpx/clone.go create mode 100644 pkg/util/httpx/rt.go create mode 100644 pkg/util/network/network.go create mode 100644 pkg/util/retry/backoff.go create mode 100644 pkg/util/retry/retry.go create mode 100644 pkg/util/timeutc/timeutc.go create mode 100644 pkg/util/timeutc/timeutc_test.go create mode 100644 timeutc/timeutc.go create mode 100644 timeutc/timeutc_test.go create mode 100644 vendor/github.com/PuerkitoBio/purell/.gitignore create mode 100644 vendor/github.com/PuerkitoBio/purell/.travis.yml create mode 100644 vendor/github.com/PuerkitoBio/purell/LICENSE create mode 100644 vendor/github.com/PuerkitoBio/purell/README.md create mode 100644 vendor/github.com/PuerkitoBio/purell/purell.go create mode 100644 vendor/github.com/PuerkitoBio/urlesc/.travis.yml create mode 100644 vendor/github.com/PuerkitoBio/urlesc/LICENSE create mode 100644 vendor/github.com/PuerkitoBio/urlesc/README.md create mode 100644 vendor/github.com/PuerkitoBio/urlesc/urlesc.go create mode 100644 vendor/github.com/asaskevich/govalidator/.gitignore create mode 100644 vendor/github.com/asaskevich/govalidator/.travis.yml create mode 100644 vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md create mode 100644 vendor/github.com/asaskevich/govalidator/LICENSE create mode 100644 vendor/github.com/asaskevich/govalidator/README.md create mode 100644 vendor/github.com/asaskevich/govalidator/arrays.go create mode 100644 vendor/github.com/asaskevich/govalidator/converter.go create mode 100644 vendor/github.com/asaskevich/govalidator/doc.go create mode 100644 vendor/github.com/asaskevich/govalidator/error.go create mode 100644 vendor/github.com/asaskevich/govalidator/go.mod create mode 100644 vendor/github.com/asaskevich/govalidator/numerics.go create mode 100644 vendor/github.com/asaskevich/govalidator/patterns.go create mode 100644 vendor/github.com/asaskevich/govalidator/types.go create mode 100644 vendor/github.com/asaskevich/govalidator/utils.go create mode 100644 vendor/github.com/asaskevich/govalidator/validator.go create mode 100644 vendor/github.com/asaskevich/govalidator/wercker.yml create mode 100644 vendor/github.com/cenkalti/backoff/.gitignore create mode 100644 vendor/github.com/cenkalti/backoff/.travis.yml create mode 100644 vendor/github.com/cenkalti/backoff/LICENSE create mode 100644 vendor/github.com/cenkalti/backoff/README.md create mode 100644 vendor/github.com/cenkalti/backoff/backoff.go create mode 100644 vendor/github.com/cenkalti/backoff/context.go create mode 100644 vendor/github.com/cenkalti/backoff/exponential.go create mode 100644 vendor/github.com/cenkalti/backoff/go.mod create mode 100644 vendor/github.com/cenkalti/backoff/retry.go create mode 100644 vendor/github.com/cenkalti/backoff/ticker.go create mode 100644 vendor/github.com/cenkalti/backoff/timer.go create mode 100644 vendor/github.com/cenkalti/backoff/tries.go create mode 100644 vendor/github.com/go-openapi/analysis/.codecov.yml create mode 100644 vendor/github.com/go-openapi/analysis/.gitignore create mode 100644 vendor/github.com/go-openapi/analysis/.golangci.yml create mode 100644 vendor/github.com/go-openapi/analysis/.travis.yml create mode 100644 vendor/github.com/go-openapi/analysis/CODE_OF_CONDUCT.md rename vendor/github.com/{yanniszark/go-nodetool => go-openapi/analysis}/LICENSE (99%) create mode 100644 vendor/github.com/go-openapi/analysis/README.md create mode 100644 vendor/github.com/go-openapi/analysis/analyzer.go create mode 100644 vendor/github.com/go-openapi/analysis/appveyor.yml create mode 100644 vendor/github.com/go-openapi/analysis/debug.go create mode 100644 vendor/github.com/go-openapi/analysis/doc.go create mode 100644 vendor/github.com/go-openapi/analysis/fixer.go create mode 100644 vendor/github.com/go-openapi/analysis/flatten.go create mode 100644 vendor/github.com/go-openapi/analysis/go.mod create mode 100644 vendor/github.com/go-openapi/analysis/go.sum create mode 100644 vendor/github.com/go-openapi/analysis/internal/post_go18.go create mode 100644 vendor/github.com/go-openapi/analysis/internal/pre_go18.go create mode 100644 vendor/github.com/go-openapi/analysis/mixin.go create mode 100644 vendor/github.com/go-openapi/analysis/schema.go create mode 100644 vendor/github.com/go-openapi/errors/.gitignore create mode 100644 vendor/github.com/go-openapi/errors/.golangci.yml create mode 100644 vendor/github.com/go-openapi/errors/.travis.yml create mode 100644 vendor/github.com/go-openapi/errors/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/errors/LICENSE create mode 100644 vendor/github.com/go-openapi/errors/README.md create mode 100644 vendor/github.com/go-openapi/errors/api.go create mode 100644 vendor/github.com/go-openapi/errors/auth.go create mode 100644 vendor/github.com/go-openapi/errors/doc.go create mode 100644 vendor/github.com/go-openapi/errors/go.mod create mode 100644 vendor/github.com/go-openapi/errors/go.sum create mode 100644 vendor/github.com/go-openapi/errors/headers.go create mode 100644 vendor/github.com/go-openapi/errors/middleware.go create mode 100644 vendor/github.com/go-openapi/errors/parsing.go create mode 100644 vendor/github.com/go-openapi/errors/schema.go create mode 100644 vendor/github.com/go-openapi/jsonpointer/.editorconfig create mode 100644 vendor/github.com/go-openapi/jsonpointer/.gitignore create mode 100644 vendor/github.com/go-openapi/jsonpointer/.travis.yml create mode 100644 vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/jsonpointer/LICENSE create mode 100644 vendor/github.com/go-openapi/jsonpointer/README.md create mode 100644 vendor/github.com/go-openapi/jsonpointer/go.mod create mode 100644 vendor/github.com/go-openapi/jsonpointer/go.sum create mode 100644 vendor/github.com/go-openapi/jsonpointer/pointer.go create mode 100644 vendor/github.com/go-openapi/jsonreference/.gitignore create mode 100644 vendor/github.com/go-openapi/jsonreference/.travis.yml create mode 100644 vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/jsonreference/LICENSE create mode 100644 vendor/github.com/go-openapi/jsonreference/README.md create mode 100644 vendor/github.com/go-openapi/jsonreference/go.mod create mode 100644 vendor/github.com/go-openapi/jsonreference/go.sum create mode 100644 vendor/github.com/go-openapi/jsonreference/reference.go create mode 100644 vendor/github.com/go-openapi/loads/.editorconfig create mode 100644 vendor/github.com/go-openapi/loads/.gitignore create mode 100644 vendor/github.com/go-openapi/loads/.golangci.yml create mode 100644 vendor/github.com/go-openapi/loads/.travis.yml create mode 100644 vendor/github.com/go-openapi/loads/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/loads/LICENSE create mode 100644 vendor/github.com/go-openapi/loads/README.md create mode 100644 vendor/github.com/go-openapi/loads/doc.go create mode 100644 vendor/github.com/go-openapi/loads/go.mod create mode 100644 vendor/github.com/go-openapi/loads/go.sum create mode 100644 vendor/github.com/go-openapi/loads/spec.go create mode 100644 vendor/github.com/go-openapi/runtime/.editorconfig create mode 100644 vendor/github.com/go-openapi/runtime/.gitignore create mode 100644 vendor/github.com/go-openapi/runtime/.travis.yml create mode 100644 vendor/github.com/go-openapi/runtime/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/runtime/LICENSE create mode 100644 vendor/github.com/go-openapi/runtime/README.md create mode 100644 vendor/github.com/go-openapi/runtime/bytestream.go create mode 100644 vendor/github.com/go-openapi/runtime/client/auth_info.go create mode 100644 vendor/github.com/go-openapi/runtime/client/keepalive.go create mode 100644 vendor/github.com/go-openapi/runtime/client/request.go create mode 100644 vendor/github.com/go-openapi/runtime/client/response.go create mode 100644 vendor/github.com/go-openapi/runtime/client/runtime.go create mode 100644 vendor/github.com/go-openapi/runtime/client_auth_info.go create mode 100644 vendor/github.com/go-openapi/runtime/client_operation.go create mode 100644 vendor/github.com/go-openapi/runtime/client_request.go create mode 100644 vendor/github.com/go-openapi/runtime/client_response.go create mode 100644 vendor/github.com/go-openapi/runtime/constants.go create mode 100644 vendor/github.com/go-openapi/runtime/csv.go create mode 100644 vendor/github.com/go-openapi/runtime/discard.go create mode 100644 vendor/github.com/go-openapi/runtime/file.go create mode 100644 vendor/github.com/go-openapi/runtime/go.mod create mode 100644 vendor/github.com/go-openapi/runtime/go.sum create mode 100644 vendor/github.com/go-openapi/runtime/headers.go create mode 100644 vendor/github.com/go-openapi/runtime/interfaces.go create mode 100644 vendor/github.com/go-openapi/runtime/json.go create mode 100644 vendor/github.com/go-openapi/runtime/logger/logger.go create mode 100644 vendor/github.com/go-openapi/runtime/logger/standard.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/context.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE create mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/README.md create mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/router.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/server.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/denco/util.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/doc.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/go18.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/header/header.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/negotiate.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/not_implemented.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/operation.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/parameter.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/pre_go18.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/redoc.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/request.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/router.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/security.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/spec.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/untyped/api.go create mode 100644 vendor/github.com/go-openapi/runtime/middleware/validation.go create mode 100644 vendor/github.com/go-openapi/runtime/request.go create mode 100644 vendor/github.com/go-openapi/runtime/security/authenticator.go create mode 100644 vendor/github.com/go-openapi/runtime/security/authorizer.go create mode 100644 vendor/github.com/go-openapi/runtime/statuses.go create mode 100644 vendor/github.com/go-openapi/runtime/text.go create mode 100644 vendor/github.com/go-openapi/runtime/values.go create mode 100644 vendor/github.com/go-openapi/runtime/xml.go create mode 100644 vendor/github.com/go-openapi/spec/.editorconfig create mode 100644 vendor/github.com/go-openapi/spec/.gitignore create mode 100644 vendor/github.com/go-openapi/spec/.golangci.yml create mode 100644 vendor/github.com/go-openapi/spec/.travis.yml create mode 100644 vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/spec/LICENSE create mode 100644 vendor/github.com/go-openapi/spec/README.md create mode 100644 vendor/github.com/go-openapi/spec/bindata.go create mode 100644 vendor/github.com/go-openapi/spec/cache.go create mode 100644 vendor/github.com/go-openapi/spec/contact_info.go create mode 100644 vendor/github.com/go-openapi/spec/debug.go create mode 100644 vendor/github.com/go-openapi/spec/expander.go create mode 100644 vendor/github.com/go-openapi/spec/external_docs.go create mode 100644 vendor/github.com/go-openapi/spec/go.mod create mode 100644 vendor/github.com/go-openapi/spec/go.sum create mode 100644 vendor/github.com/go-openapi/spec/header.go create mode 100644 vendor/github.com/go-openapi/spec/info.go create mode 100644 vendor/github.com/go-openapi/spec/items.go create mode 100644 vendor/github.com/go-openapi/spec/license.go create mode 100644 vendor/github.com/go-openapi/spec/normalizer.go create mode 100644 vendor/github.com/go-openapi/spec/operation.go create mode 100644 vendor/github.com/go-openapi/spec/parameter.go create mode 100644 vendor/github.com/go-openapi/spec/path_item.go create mode 100644 vendor/github.com/go-openapi/spec/paths.go create mode 100644 vendor/github.com/go-openapi/spec/ref.go create mode 100644 vendor/github.com/go-openapi/spec/response.go create mode 100644 vendor/github.com/go-openapi/spec/responses.go create mode 100644 vendor/github.com/go-openapi/spec/schema.go create mode 100644 vendor/github.com/go-openapi/spec/schema_loader.go create mode 100644 vendor/github.com/go-openapi/spec/security_scheme.go create mode 100644 vendor/github.com/go-openapi/spec/spec.go create mode 100644 vendor/github.com/go-openapi/spec/swagger.go create mode 100644 vendor/github.com/go-openapi/spec/tag.go create mode 100644 vendor/github.com/go-openapi/spec/unused.go create mode 100644 vendor/github.com/go-openapi/spec/xml_object.go create mode 100644 vendor/github.com/go-openapi/strfmt/.editorconfig create mode 100644 vendor/github.com/go-openapi/strfmt/.gitignore create mode 100644 vendor/github.com/go-openapi/strfmt/.golangci.yml create mode 100644 vendor/github.com/go-openapi/strfmt/.travis.yml create mode 100644 vendor/github.com/go-openapi/strfmt/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/strfmt/LICENSE create mode 100644 vendor/github.com/go-openapi/strfmt/README.md create mode 100644 vendor/github.com/go-openapi/strfmt/bson.go create mode 100644 vendor/github.com/go-openapi/strfmt/date.go create mode 100644 vendor/github.com/go-openapi/strfmt/default.go create mode 100644 vendor/github.com/go-openapi/strfmt/doc.go create mode 100644 vendor/github.com/go-openapi/strfmt/duration.go create mode 100644 vendor/github.com/go-openapi/strfmt/format.go create mode 100644 vendor/github.com/go-openapi/strfmt/go.mod create mode 100644 vendor/github.com/go-openapi/strfmt/go.sum create mode 100644 vendor/github.com/go-openapi/strfmt/time.go create mode 100644 vendor/github.com/go-openapi/swag/.editorconfig create mode 100644 vendor/github.com/go-openapi/swag/.gitignore create mode 100644 vendor/github.com/go-openapi/swag/.golangci.yml create mode 100644 vendor/github.com/go-openapi/swag/.travis.yml create mode 100644 vendor/github.com/go-openapi/swag/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/swag/LICENSE create mode 100644 vendor/github.com/go-openapi/swag/README.md create mode 100644 vendor/github.com/go-openapi/swag/convert.go create mode 100644 vendor/github.com/go-openapi/swag/convert_types.go create mode 100644 vendor/github.com/go-openapi/swag/doc.go create mode 100644 vendor/github.com/go-openapi/swag/go.mod create mode 100644 vendor/github.com/go-openapi/swag/go.sum create mode 100644 vendor/github.com/go-openapi/swag/json.go create mode 100644 vendor/github.com/go-openapi/swag/loading.go create mode 100644 vendor/github.com/go-openapi/swag/name_lexem.go create mode 100644 vendor/github.com/go-openapi/swag/net.go create mode 100644 vendor/github.com/go-openapi/swag/path.go create mode 100644 vendor/github.com/go-openapi/swag/post_go18.go create mode 100644 vendor/github.com/go-openapi/swag/post_go19.go create mode 100644 vendor/github.com/go-openapi/swag/pre_go18.go create mode 100644 vendor/github.com/go-openapi/swag/pre_go19.go create mode 100644 vendor/github.com/go-openapi/swag/split.go create mode 100644 vendor/github.com/go-openapi/swag/util.go create mode 100644 vendor/github.com/go-openapi/swag/yaml.go create mode 100644 vendor/github.com/go-openapi/validate/.editorconfig create mode 100644 vendor/github.com/go-openapi/validate/.gitignore create mode 100644 vendor/github.com/go-openapi/validate/.golangci.yml create mode 100644 vendor/github.com/go-openapi/validate/.travis.yml create mode 100644 vendor/github.com/go-openapi/validate/CODE_OF_CONDUCT.md create mode 100644 vendor/github.com/go-openapi/validate/LICENSE create mode 100644 vendor/github.com/go-openapi/validate/README.md create mode 100644 vendor/github.com/go-openapi/validate/debug.go create mode 100644 vendor/github.com/go-openapi/validate/default_validator.go create mode 100644 vendor/github.com/go-openapi/validate/doc.go create mode 100644 vendor/github.com/go-openapi/validate/example_validator.go create mode 100644 vendor/github.com/go-openapi/validate/formats.go create mode 100644 vendor/github.com/go-openapi/validate/go.mod create mode 100644 vendor/github.com/go-openapi/validate/go.sum create mode 100644 vendor/github.com/go-openapi/validate/helpers.go create mode 100644 vendor/github.com/go-openapi/validate/object_validator.go create mode 100644 vendor/github.com/go-openapi/validate/options.go create mode 100644 vendor/github.com/go-openapi/validate/result.go create mode 100644 vendor/github.com/go-openapi/validate/rexp.go create mode 100644 vendor/github.com/go-openapi/validate/schema.go create mode 100644 vendor/github.com/go-openapi/validate/schema_messages.go create mode 100644 vendor/github.com/go-openapi/validate/schema_option.go create mode 100644 vendor/github.com/go-openapi/validate/schema_props.go create mode 100644 vendor/github.com/go-openapi/validate/slice_validator.go create mode 100644 vendor/github.com/go-openapi/validate/spec.go create mode 100644 vendor/github.com/go-openapi/validate/spec_messages.go create mode 100644 vendor/github.com/go-openapi/validate/type.go create mode 100755 vendor/github.com/go-openapi/validate/update-fixtures.sh create mode 100644 vendor/github.com/go-openapi/validate/validator.go create mode 100644 vendor/github.com/go-openapi/validate/values.go create mode 100644 vendor/github.com/go-stack/stack/.travis.yml create mode 100644 vendor/github.com/go-stack/stack/LICENSE.md create mode 100644 vendor/github.com/go-stack/stack/README.md create mode 100644 vendor/github.com/go-stack/stack/go.mod create mode 100644 vendor/github.com/go-stack/stack/stack.go create mode 100644 vendor/github.com/hailocab/go-hostpool/.gitignore create mode 100644 vendor/github.com/hailocab/go-hostpool/.travis.yml create mode 100644 vendor/github.com/hailocab/go-hostpool/LICENSE create mode 100644 vendor/github.com/hailocab/go-hostpool/README.md create mode 100644 vendor/github.com/hailocab/go-hostpool/epsilon_greedy.go create mode 100644 vendor/github.com/hailocab/go-hostpool/epsilon_value_calculators.go create mode 100644 vendor/github.com/hailocab/go-hostpool/host_entry.go create mode 100644 vendor/github.com/hailocab/go-hostpool/hostpool.go create mode 100644 vendor/github.com/mailru/easyjson/LICENSE create mode 100644 vendor/github.com/mailru/easyjson/buffer/pool.go create mode 100644 vendor/github.com/mailru/easyjson/jlexer/bytestostr.go create mode 100644 vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go create mode 100644 vendor/github.com/mailru/easyjson/jlexer/error.go create mode 100644 vendor/github.com/mailru/easyjson/jlexer/lexer.go create mode 100644 vendor/github.com/mailru/easyjson/jwriter/writer.go create mode 100644 vendor/github.com/mitchellh/mapstructure/.travis.yml create mode 100644 vendor/github.com/mitchellh/mapstructure/CHANGELOG.md create mode 100644 vendor/github.com/mitchellh/mapstructure/LICENSE create mode 100644 vendor/github.com/mitchellh/mapstructure/README.md create mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks.go create mode 100644 vendor/github.com/mitchellh/mapstructure/error.go create mode 100644 vendor/github.com/mitchellh/mapstructure/go.mod create mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure.go create mode 100644 vendor/github.com/scylladb/go-set/LICENSE create mode 100644 vendor/github.com/scylladb/go-set/strset/strset.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/client/client.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/client/fake.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/nodetool/decommission.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/nodetool/nodetool.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/nodetool/opmode.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/nodetool/status.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/nodetool/version.go delete mode 100644 vendor/github.com/yanniszark/go-nodetool/version/version.go create mode 100644 vendor/go.mongodb.org/mongo-driver/LICENSE create mode 100644 vendor/go.mongodb.org/mongo-driver/THIRD-PARTY-NOTICES create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bson.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bson_1_8.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/bsoncodec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/byte_slice_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_decoders.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/default_value_encoders.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/doc.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/empty_interface_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/map_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/mode.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/pointer_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/proxy.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/registry.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/slice_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/string_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/struct_tag_parser.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/time_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/types.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsoncodec/uint_codec.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/byte_slice_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/empty_interface_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/map_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/slice_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/string_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/struct_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/time_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonoptions/uint_codec_options.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/copier.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/doc.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_parser.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_reader.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_tables.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_wrappers.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/extjson_writer.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/json_scanner.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/mode.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/reader.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/value_reader.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/value_writer.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsonrw/writer.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/bsontype/bsontype.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/decoder.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/doc.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/encoder.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/marshal.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/primitive/decimal.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/primitive/objectid.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/primitive/primitive.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/primitive_codecs.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/raw.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/raw_element.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/raw_value.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/registry.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/types.go create mode 100644 vendor/go.mongodb.org/mongo-driver/bson/unmarshal.go create mode 100755 vendor/go.mongodb.org/mongo-driver/etc/generate-notices.pl create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/bsoncore.go create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/document.go create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/document_sequence.go create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/element.go create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/tables.go create mode 100644 vendor/go.mongodb.org/mongo-driver/x/bsonx/bsoncore/value.go create mode 100644 vendor/golang.org/x/text/width/gen.go create mode 100644 vendor/golang.org/x/text/width/gen_common.go create mode 100644 vendor/golang.org/x/text/width/gen_trieval.go create mode 100644 vendor/golang.org/x/text/width/kind_string.go create mode 100644 vendor/golang.org/x/text/width/tables10.0.0.go create mode 100644 vendor/golang.org/x/text/width/tables9.0.0.go create mode 100644 vendor/golang.org/x/text/width/transform.go create mode 100644 vendor/golang.org/x/text/width/trieval.go create mode 100644 vendor/golang.org/x/text/width/width.go diff --git a/Dockerfile b/Dockerfile index 89cfd0dbd0f..7567740e94d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,6 @@ RUN chmod +x /usr/local/bin/tini # Add files for the sidecar RUN mkdir -p /sidecar -# Jolokia plugin to sidecar for JMX<->HTTP -ADD "http://search.maven.org/remotecontent?filepath=org/jolokia/jolokia-jvm/1.6.0/jolokia-jvm-1.6.0-agent.jar" /sidecar/jolokia.jar # Add tini to sidecar RUN cp /usr/local/bin/tini /sidecar/tini diff --git a/Gopkg.lock b/Gopkg.lock index 911abc6b6f9..4587efc1aa9 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -9,6 +9,30 @@ revision = "0ebda48a7f143b1cce9eb37a8c1106ac762a3430" version = "v0.34.0" +[[projects]] + digest = "1:a2682518d905d662d984ef9959984ef87cecb777d379bfa9d9fe40e78069b3e4" + name = "github.com/PuerkitoBio/purell" + packages = ["."] + pruneopts = "UT" + revision = "44968752391892e1b0d0b821ee79e9a85fa13049" + version = "v1.1.1" + +[[projects]] + branch = "master" + digest = "1:c739832d67eb1e9cc478a19cc1a1ccd78df0397bf8a32978b759152e205f644b" + name = "github.com/PuerkitoBio/urlesc" + packages = ["."] + pruneopts = "UT" + revision = "de5bf2ad457846296e2031421a34e2568e304e35" + +[[projects]] + digest = "1:c68aba66f5db6052fd838d9a7d60d8859f8c11b8c1d9ac9758f69c7a51efc07a" + name = "github.com/asaskevich/govalidator" + packages = ["."] + pruneopts = "UT" + revision = "475eaeb164960a651e97470412a7d3b0c5036105" + version = "v10" + [[projects]] branch = "master" digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" @@ -25,6 +49,14 @@ revision = "ba2c2ddd89069b46a7011d4106f6868f17ee1705" version = "v3.6.1" +[[projects]] + digest = "1:bc7e9c56408594a678dd165db7c579c2498a3c9eab9b308099820ddbfe85b720" + name = "github.com/cenkalti/backoff" + packages = ["."] + pruneopts = "UT" + revision = "a9a4cec6c9a26336ca42700ccc319ca842be56c0" + version = "v4.0.0" + [[projects]] digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" @@ -79,6 +111,106 @@ revision = "7536572e8d55209135cd5e7ccf7fce43dca217ab" version = "v0.1.0" +[[projects]] + digest = "1:1b1f68a87dd0f828ee951475f4a33012f45475957ee2c77e0e41abeebbb02e3c" + name = "github.com/go-openapi/analysis" + packages = [ + ".", + "internal", + ] + pruneopts = "UT" + revision = "421cb960388d1c41b1d4f0eee5300257ac289c97" + version = "v0.19.10" + +[[projects]] + digest = "1:2085c605117b9b52889c4c1b221739e228ca0f39faed4ef13465c7f32c350ebe" + name = "github.com/go-openapi/errors" + packages = ["."] + pruneopts = "UT" + revision = "34a71fb81ae13cc914d218367d944c1cb93bc4b4" + version = "v0.19.4" + +[[projects]] + digest = "1:ed15647db08b6d63666bf9755d337725960c302bbfa5e23754b4b915a4797e42" + name = "github.com/go-openapi/jsonpointer" + packages = ["."] + pruneopts = "UT" + revision = "ed123515f087412cd7ef02e49b0b0a5e6a79a360" + version = "v0.19.3" + +[[projects]] + digest = "1:451fe53c19443c6941be5d4295edc973a3eb16baccb940efee94284024be03b0" + name = "github.com/go-openapi/jsonreference" + packages = ["."] + pruneopts = "UT" + revision = "82f31475a8f7a12bc26962f6e26ceade8ea6f66a" + version = "v0.19.3" + +[[projects]] + digest = "1:2aa2219434b56450e68de4ce5e5dcd14ecb289b3a1bbfa91fc22855b507012a2" + name = "github.com/go-openapi/loads" + packages = ["."] + pruneopts = "UT" + revision = "18bb1f3437c08e833e5f629003bafc2a3884d19f" + version = "v0.19.5" + +[[projects]] + digest = "1:b58808fb91ab712addeeec11b0135c6edffaed5052f7d618063f44b1d9cca383" + name = "github.com/go-openapi/runtime" + packages = [ + ".", + "client", + "logger", + "middleware", + "middleware/denco", + "middleware/header", + "middleware/untyped", + "security", + ] + pruneopts = "UT" + revision = "c2daaa2a68f30a68af3a15b3cbd83adc0c1a1880" + version = "v0.19.12" + +[[projects]] + digest = "1:9e6992ea4c7005c711e3460e90d20e0c40cce6743bbdc65d12e8fe45e5b6beaf" + name = "github.com/go-openapi/spec" + packages = ["."] + pruneopts = "UT" + revision = "1297e9a4ddf9325269fe013d7c1300aac3985f92" + version = "v0.19.7" + +[[projects]] + digest = "1:462bb5aad8e422edfcfdb254b34a8dd6e538a72a9e720d2615eedfa106d76a35" + name = "github.com/go-openapi/strfmt" + packages = ["."] + pruneopts = "UT" + revision = "2887e74ed0fe2aea628affe322b19fc3112f98cd" + version = "v0.19.5" + +[[projects]] + digest = "1:8b59d79dc97889c333cdad6fcbd9c47d4d9abc19a5ec0683bfa40e5a36d1b1b7" + name = "github.com/go-openapi/swag" + packages = ["."] + pruneopts = "UT" + revision = "59a9232e9392613952a0a4c90523c40c99140043" + version = "v0.19.8" + +[[projects]] + digest = "1:68f7e70a78ef84c0b070ef90e9013ca0706579d3ec17acbc8e5ee311da9873f9" + name = "github.com/go-openapi/validate" + packages = ["."] + pruneopts = "UT" + revision = "2ddc1827652e11f55541c3a14ec2ec050f0f7ca8" + version = "v0.19.7" + +[[projects]] + digest = "1:586ea76dbd0374d6fb649a91d70d652b7fe0ccffb8910a77468e7702e7901f3d" + name = "github.com/go-stack/stack" + packages = ["."] + pruneopts = "UT" + revision = "2fee6af1a9795aafbe0253a0cfbdf668e1fb8a9a" + version = "v1.8.0" + [[projects]] digest = "1:bd342004ef1bb83bee8709e2ad630e47a95d069f7fcb60ee1b8bceb4bbbe14ae" name = "github.com/gobuffalo/envy" @@ -189,6 +321,14 @@ pruneopts = "UT" revision = "c63ab54fda8f77302f8d414e19933f2b6026a089" +[[projects]] + branch = "master" + digest = "1:364b908b9b27b97ab838f2f6f1b1f46281fa29b978a037d72a9b1d4f6d940190" + name = "github.com/hailocab/go-hostpool" + packages = ["."] + pruneopts = "UT" + revision = "e80d13ce29ede4452c43dea11e79b9bc8a15b478" + [[projects]] digest = "1:950caca7dfcf796419232ba996c9c3539d09f26af27ba848c4508e604c13efbb" name = "github.com/hashicorp/go-version" @@ -262,6 +402,18 @@ revision = "de8848e004dd33dc07a2947b3d76f618a7fc7ef1" version = "v1.8.1" +[[projects]] + digest = "1:7bbccd3dd7998f2a180264ec1d12e362ed8e02f55ea7b82ac0d0f48ffa2d8888" + name = "github.com/mailru/easyjson" + packages = [ + "buffer", + "jlexer", + "jwriter", + ] + pruneopts = "UT" + revision = "8edcc4e51f39ddbd3505a3386aff3f435a7fd028" + version = "v0.7.1" + [[projects]] digest = "1:3804a3a02964db8e6db3e5e7960ac1c1a9b12835642dd4f4ac4e56c749ec73eb" name = "github.com/markbates/inflect" @@ -286,6 +438,14 @@ revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" version = "v1.0.1" +[[projects]] + digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + pruneopts = "UT" + revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" + version = "v1.1.2" + [[projects]] digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" name = "github.com/modern-go/concurrent" @@ -465,6 +625,14 @@ revision = "2e4ab32fc413adff82d89e7a2756d1b9ac4956fe" version = "v0.0.2" +[[projects]] + digest = "1:6f3ce746342be7b14a2d1ca33a4a11fd6cb0300e5d34c766f01e19e936fb10af" + name = "github.com/scylladb/go-set" + packages = ["strset"] + pruneopts = "UT" + revision = "e560bb8f49bb7f34d4f59b7e771f6e1307c329da" + version = "v1.0.2" + [[projects]] digest = "1:d707dbc1330c0ed177d4642d6ae102d5e2c847ebd0eb84562d0dc4f024531cfc" name = "github.com/spf13/afero" @@ -504,16 +672,20 @@ version = "v1.3.0" [[projects]] - branch = "master" - digest = "1:6ec11be01ce051ca8144cd34f62627d3a575bde02b8f6e297d89f036e175e37a" - name = "github.com/yanniszark/go-nodetool" + digest = "1:a300b9466f2839e5dd4f9e4d329f383c96fe648258d741a0245e9cd7ddaf9c39" + name = "go.mongodb.org/mongo-driver" packages = [ - "client", - "nodetool", - "version", + "bson", + "bson/bsoncodec", + "bson/bsonoptions", + "bson/bsonrw", + "bson/bsontype", + "bson/primitive", + "x/bsonx/bsoncore", ] pruneopts = "UT" - revision = "cc333b9c2b54be5ed617fcaa2bf32c6fff93f719" + revision = "17ea4abd2ac121376c1f782964fce1c3ee692915" + version = "v1.3.1" [[projects]] digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" @@ -603,7 +775,7 @@ revision = "2be51725563103c17124a318f1745b66f2347acb" [[projects]] - digest = "1:436b24586f8fee329e0dd65fd67c817681420cda1d7f934345c13fe78c212a73" + digest = "1:bb8277a2ca2bcad6ff7f413b939375924099be908cedd1314baa21ecd08df477" name = "golang.org/x/text" packages = [ "collate", @@ -632,6 +804,7 @@ "unicode/cldr", "unicode/norm", "unicode/rangetable", + "width", ] pruneopts = "UT" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" @@ -1219,17 +1392,28 @@ analyzer-version = 1 input-imports = [ "github.com/blang/semver", + "github.com/cenkalti/backoff", "github.com/emicklei/go-restful", "github.com/ghodss/yaml", + "github.com/go-openapi/errors", + "github.com/go-openapi/runtime", + "github.com/go-openapi/runtime/client", + "github.com/go-openapi/runtime/middleware", + "github.com/go-openapi/strfmt", + "github.com/go-openapi/swag", + "github.com/go-openapi/validate", "github.com/google/go-cmp/cmp", + "github.com/hailocab/go-hostpool", + "github.com/hashicorp/go-version", "github.com/magiconair/properties", "github.com/onsi/ginkgo", "github.com/onsi/gomega", "github.com/pkg/errors", "github.com/scylladb/go-log", + "github.com/scylladb/go-set/strset", "github.com/spf13/cobra", "github.com/stretchr/testify/require", - "github.com/yanniszark/go-nodetool/nodetool", + "go.uber.org/multierr", "go.uber.org/zap", "go.uber.org/zap/zapcore", "k8s.io/api/admissionregistration/v1beta1", diff --git a/config/manager_patch.yaml b/config/manager_patch.yaml index 8defe924274..82e75020dc1 100644 --- a/config/manager_patch.yaml +++ b/config/manager_patch.yaml @@ -19,6 +19,7 @@ spec: command: args: - operator + - --enable-scylla-agent-sidecar env: - name: POD_NAME valueFrom: diff --git a/examples/generic/operator.yaml b/examples/generic/operator.yaml index 8b39fc68cd7..4c1c9d347d0 100644 --- a/examples/generic/operator.yaml +++ b/examples/generic/operator.yaml @@ -318,6 +318,7 @@ spec: containers: - args: - operator + - --enable-scylla-agent-sidecar env: - name: POD_NAME valueFrom: diff --git a/examples/gke/operator.yaml b/examples/gke/operator.yaml index 8b39fc68cd7..4c1c9d347d0 100644 --- a/examples/gke/operator.yaml +++ b/examples/gke/operator.yaml @@ -318,6 +318,7 @@ spec: containers: - args: - operator + - --enable-scylla-agent-sidecar env: - name: POD_NAME valueFrom: diff --git a/examples/minikube/operator.yaml b/examples/minikube/operator.yaml index 8b39fc68cd7..4c1c9d347d0 100644 --- a/examples/minikube/operator.yaml +++ b/examples/minikube/operator.yaml @@ -318,6 +318,7 @@ spec: containers: - args: - operator + - --enable-scylla-agent-sidecar env: - name: POD_NAME valueFrom: diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go new file mode 100644 index 00000000000..f7b17c65b8f --- /dev/null +++ b/pkg/auth/auth.go @@ -0,0 +1,75 @@ +// Copyright (C) 2017 ScyllaDB + +package auth + +import ( + "crypto/subtle" + "encoding/json" + "net/http" + "strings" + "time" + + "github.com/scylladb/scylla-operator/pkg/util/httpx" +) + +// AddToken sets authorization header. If token is empty it immediately returns +// the next handler. +func AddToken(next http.RoundTripper, token string) http.RoundTripper { + if token == "" { + return next + } + + return httpx.RoundTripperFunc(func(req *http.Request) (resp *http.Response, err error) { + r := httpx.CloneRequest(req) + r.Header.Set("Authorization", "Bearer "+token) + return next.RoundTrip(r) + }) +} + +// ValidateToken is http server middleware that checks if Authorization header +// contains `Bearer token`. +// If not the execution would be held for the penalty duration and then 401 +// status code with provided body would be returned. +// If token is empty it immediately returns the next handler. +func ValidateToken(token string, penalty time.Duration, + unauthorizedBody json.RawMessage) func(http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + if token == "" { + return next + } + + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if !secureCompare(bearerAuth(r), token) { + if penalty > 0 { + time.Sleep(penalty) + } + w.WriteHeader(http.StatusUnauthorized) + w.Write(unauthorizedBody) // nolint:errcheck + } else { + next.ServeHTTP(w, r) + } + }) + } +} + +// bearerAuth returns the token provided in the request's Authorization header. +func bearerAuth(r *http.Request) (token string) { + auth := r.Header.Get("Authorization") + if auth == "" { + return + } + return parseBearerAuth(auth) +} + +func parseBearerAuth(auth string) (token string) { + const prefix = "Bearer " + // Case insensitive prefix match. See Issue 22736. + if len(auth) < len(prefix) || !strings.EqualFold(auth[:len(prefix)], prefix) { + return "" + } + return auth[len(prefix):] +} + +func secureCompare(x, y string) bool { + return subtle.ConstantTimeCompare([]byte(x), []byte(y)) == 1 +} diff --git a/pkg/auth/auth_test.go b/pkg/auth/auth_test.go new file mode 100644 index 00000000000..1a8d064495d --- /dev/null +++ b/pkg/auth/auth_test.go @@ -0,0 +1,160 @@ +// Copyright (C) 2017 ScyllaDB + +package auth + +import ( + "encoding/json" + "io/ioutil" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/scylladb/scylla-operator/pkg/util/timeutc" + + "github.com/google/go-cmp/cmp" + "github.com/scylladb/scylla-operator/pkg/util/httpx" +) + +func TestParseBearerAuth(t *testing.T) { + t.Parallel() + + table := []struct { + Name string + Header string + Token string + }{ + { + Name: "empty header", + Header: "", + Token: "", + }, + { + Name: "bearer canonical token", + Header: "Bearer token", + Token: "token", + }, + { + Name: "bearer case mismatch token", + Header: "bEaReR token", + Token: "token", + }, + { + Name: "basic auth", + Header: "Basic foobar", + Token: "", + }, + } + + for i := range table { + test := table[i] + + t.Run(test.Name, func(t *testing.T) { + t.Parallel() + + if token := parseBearerAuth(test.Header); token != test.Token { + t.Error("expected", test.Token, "got", token) + } + }) + } +} + +func TestValidateTokenNoToken(t *testing.T) { + t.Parallel() + + h := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) + r := httptest.NewRequest(http.MethodGet, "/foobar", nil) + w := httptest.NewRecorder() + + ValidateToken("", 0, nil)(h).ServeHTTP(w, r) + if w.Code != http.StatusOK { + t.Error("expected status 200 got", w) + } +} + +func TestValidateTokenSuccess(t *testing.T) { + t.Parallel() + + const token = "token" + h := http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) + r := httptest.NewRequest(http.MethodGet, "/foobar", nil) + r.Header.Set("Authorization", "Bearer "+token) + w := httptest.NewRecorder() + + ValidateToken(token, 0, nil)(h).ServeHTTP(w, r) + if w.Code != http.StatusOK { + t.Error("expected status 200 got", w) + } +} + +func TestValidateTokenFailure(t *testing.T) { + t.Parallel() + + h := http.HandlerFunc(func(http.ResponseWriter, *http.Request) { + t.Fatal("this must not be called") + }) + + verify := func(t *testing.T, r *http.Request, penalty time.Duration) { + t.Helper() + + var bodyError = json.RawMessage(`{"message":"unauthorized","code":401}`) + + w := httptest.NewRecorder() + ValidateToken("token", penalty, bodyError)(h).ServeHTTP(w, r) + if w.Code != http.StatusUnauthorized { + t.Error("expected status 401 got", w) + } + responseBody, err := ioutil.ReadAll(ioutil.NopCloser(w.Result().Body)) + if err != nil { + t.Error("expected nil err, got", err) + } + if cmp.Diff(string(responseBody), string(bodyError)) != "" { + t.Error("wrong response body, got", string(responseBody)) + } + } + + t.Run("no token", func(t *testing.T) { + r := httptest.NewRequest(http.MethodGet, "/foobar", nil) + verify(t, r, 0) + }) + + t.Run("invalid token", func(t *testing.T) { + r := httptest.NewRequest(http.MethodGet, "/foobar", nil) + r.Header.Set("Authorization", "Bearer foobar") + verify(t, r, 0) + }) + + t.Run("penalty", func(t *testing.T) { + r := httptest.NewRequest(http.MethodGet, "/foobar", nil) + penalty := 150 * time.Millisecond + start := timeutc.Now() + verify(t, r, penalty) + if timeutc.Since(start) < penalty { + t.Fatal("expected penalty") + } + }) +} + +func TestCrossCheckAddValidateToken(t *testing.T) { + t.Parallel() + + const token = "token" + + var h http.Handler + h = http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) + h = ValidateToken(token, 0, nil)(h) + + var rt http.RoundTripper + rt = httpx.RoundTripperFunc(func(r *http.Request) (*http.Response, error) { + w := httptest.NewRecorder() + h.ServeHTTP(w, r) + return w.Result(), nil + }) + rt = AddToken(rt, token) + + req := httptest.NewRequest(http.MethodGet, "/foobar", nil) + resp, _ := rt.RoundTrip(req) + if resp.StatusCode != http.StatusOK { + t.Error("expected status 200 got", resp.StatusCode) + } +} diff --git a/pkg/controller/cluster/resource/resource.go b/pkg/controller/cluster/resource/resource.go index e13ae993ed4..049288abd8a 100644 --- a/pkg/controller/cluster/resource/resource.go +++ b/pkg/controller/cluster/resource/resource.go @@ -2,10 +2,11 @@ package resource import ( "fmt" - "github.com/scylladb/scylla-operator/cmd/options" "path" "strings" + "github.com/scylladb/scylla-operator/cmd/options" + scyllav1alpha1 "github.com/scylladb/scylla-operator/pkg/apis/scylla/v1alpha1" "github.com/scylladb/scylla-operator/pkg/controller/cluster/util" "github.com/scylladb/scylla-operator/pkg/naming" @@ -89,6 +90,10 @@ func MemberServiceForPod(pod *corev1.Pod, cluster *scyllav1alpha1.Cluster) *core Name: "cql-ssl", Port: 9142, }, + { + Name: "agent-api", + Port: 10001, + }, }, PublishNotReadyAddresses: true, }, @@ -206,10 +211,6 @@ func StatefulSetForRack(r scyllav1alpha1.RackSpec, c *scyllav1alpha1.Cluster, si Name: "thrift", ContainerPort: 9160, }, - { - Name: "jolokia", - ContainerPort: 8778, - }, { Name: "prometheus", ContainerPort: 9180, diff --git a/pkg/naming/constants.go b/pkg/naming/constants.go index 9fdec2b12cd..d5e4b15be8d 100644 --- a/pkg/naming/constants.go +++ b/pkg/naming/constants.go @@ -69,10 +69,6 @@ const ( DataDir = "/var/lib/scylla" - JolokiaJarName = "jolokia.jar" - JolokiaPort = 8778 - JolokiaContext = "jolokia" - ReadinessProbePath = "/readyz" LivenessProbePath = "/healthz" ProbePort = 8080 diff --git a/pkg/scyllaclient/agent.json b/pkg/scyllaclient/agent.json new file mode 100644 index 00000000000..2e724924407 --- /dev/null +++ b/pkg/scyllaclient/agent.json @@ -0,0 +1,1174 @@ +{ + "swagger": "2.0", + "info": { + "version": "0.0.1", + "title": "Scylla Manager Agent API", + "contact": {} + }, + "host": "mermaid.magic.host", + "basePath": "/agent", + "schemes": [ + "http" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/rclone/core/bwlimit": { + "post": { + "description": "This sets the bandwidth limit to that passed in", + "summary": "Set the bandwidth limit", + "operationId": "CoreBwlimit", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "bandwidth_rate", + "description": "bandwidth rate", + "schema": { + "$ref": "#/definitions/Bandwidth" + } + } + ], + "responses": { + "200": { + "description": "bandwidth rate", + "schema": { + "$ref": "#/definitions/Bandwidth" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/core/stats-reset": { + "post": { + "description": "Resets stats", + "summary": "Resets all or specific stats group", + "operationId": "CoreStatsReset", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "StatsParams", + "description": "Stats parameters", + "schema": { + "$ref": "#/definitions/StatsParams" + } + } + ], + "responses": { + "200": { + "description": "Empty object", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/core/stats-delete": { + "post": { + "description": "Delete stats", + "summary": "Deletes specific stats group", + "operationId": "CoreStatsDelete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "StatsParams", + "description": "Stats parameters", + "schema": { + "$ref": "#/definitions/StatsParams" + } + } + ], + "responses": { + "200": { + "description": "Empty object", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/about": { + "post": { + "description": "Get usage information from the remote", + "summary": "About remote", + "operationId": "OperationsAbout", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "about", + "description": "about", + "schema": { + "$ref": "#/definitions/RemotePath" + } + } + ], + "responses": { + "200": { + "description": "File system details", + "schema": { + "$ref": "#/definitions/FileSystemDetails" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/cat": { + "post": { + "description": "Concatenate any files and send them in response", + "summary": "Cat remote", + "operationId": "OperationsCat", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "cat", + "description": "cat", + "schema": { + "$ref": "#/definitions/RemotePath" + } + } + ], + "responses": { + "200": { + "description": "File system details", + "schema": { + "$ref": "#/definitions/Content" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/list": { + "post": { + "description": "List the given remote and path", + "summary": "List remote", + "operationId": "OperationsList", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "listOpts", + "description": "listOpts", + "schema": { + "$ref": "#/definitions/ListOptions" + } + } + ], + "responses": { + "200": { + "description": "List of items", + "schema": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/ListItem" + } + } + } + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/movefile": { + "post": { + "description": "Move a file from source remote to destination remote", + "summary": "Move a file", + "operationId": "OperationsMovefile", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "_group", + "description": "Place this operation under this stat group", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "copyfile", + "description": "copyfile", + "schema": { + "$ref": "#/definitions/MoveOrCopyFileOptions" + } + } + ], + "responses": { + "200": { + "description": "Empty object", + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/copyfile": { + "post": { + "description": "Copy a file from source remote to destination remote", + "summary": "Copy a file", + "operationId": "OperationsCopyfile", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "_async", + "description": "Async request", + "type": "boolean", + "required": true, + "default": true + }, + { + "in": "query", + "name": "_group", + "description": "Place this operation under this stat group", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "copyfile", + "description": "copyfile", + "schema": { + "$ref": "#/definitions/MoveOrCopyFileOptions" + } + } + ], + "responses": { + "200": { + "description": "Job", + "schema": { + "$ref": "#/definitions/Jobid" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/sync/copy": { + "post": { + "description": "Copy a directory from source remote to destination remote", + "summary": "Copy directory", + "operationId": "SyncCopy", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "_async", + "description": "Async request", + "type": "boolean", + "required": true, + "default": true + }, + { + "in": "query", + "name": "_group", + "description": "Place this operation under this stat group", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "copydir", + "description": "copydir", + "schema": { + "type": "object", + "properties": { + "srcFs": { + "description": "A remote name string eg. drive: for the source", + "type": "string" + }, + "dstFs": { + "description": "A remote name string eg. drive: for the destination", + "type": "string" + } + } + } + } + ], + "responses": { + "200": { + "description": "Job ID", + "schema": { + "$ref": "#/definitions/Jobid" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/purge": { + "post": { + "description": "Remove a directory or container and all of its contents", + "summary": "Purge container", + "operationId": "OperationsPurge", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "_async", + "description": "Async request", + "type": "boolean", + "required": true, + "default": true + }, + { + "in": "query", + "name": "_group", + "description": "Place this operation under this stat group", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "purge", + "description": "purge", + "schema": { + "$ref": "#/definitions/RemotePath" + } + } + ], + "responses": { + "200": { + "description": "Job ID", + "schema": { + "$ref": "#/definitions/Jobid" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/deletefile": { + "post": { + "description": "Remove the single file pointed to", + "summary": "Delete file", + "operationId": "OperationsDeletefile", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "_async", + "description": "Async request", + "type": "boolean", + "required": true, + "default": true + }, + { + "in": "query", + "name": "_group", + "description": "Place this operation under this stat group", + "type": "string", + "required": true + }, + { + "in": "body", + "name": "deletefile", + "description": "deletefile", + "schema": { + "$ref": "#/definitions/RemotePath" + } + } + ], + "responses": { + "200": { + "description": "Job ID", + "schema": { + "$ref": "#/definitions/Jobid" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/operations/check-permissions": { + "post": { + "description": "Check if the fs is fully accessible", + "summary": "Check fs", + "operationId": "OperationsCheckPermissions", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "fs", + "description": "FS to check", + "schema": { + "$ref": "#/definitions/RemotePath" + } + } + ], + "responses": { + "200": { + "description": "Empty object", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/job/stop": { + "post": { + "description": "Stops job with provided ID", + "summary": "Stop async job", + "operationId": "JobStop", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "jobid", + "required": true, + "description": "jobid", + "schema": { + "$ref": "#/definitions/Jobid" + } + } + ], + "responses": { + "200": { + "description": "Empty object", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/rclone/job/info": { + "post": { + "description": "Returns current, completed transfers and job stats", + "summary": "Transfer stats about the job", + "operationId": "JobInfo", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "jobinfo", + "description": "Job info params with id and long polling", + "schema": { + "$ref": "#/definitions/JobInfoParams" + } + } + ], + "responses": { + "200": { + "description": "Aggregated info about job transfers", + "schema": { + "$ref": "#/definitions/JobInfo" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/node_info": { + "get": { + "description": "Get information about Scylla node", + "summary": "Get information about Scylla node", + "operationId": "NodeInfo", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "node information", + "schema": { + "$ref": "#/definitions/NodeInfo" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + }, + "/free_os_memory": { + "post": { + "description": "Run debug.FreeOSMemory on the agent", + "summary": "Return memory to OS", + "operationId": "FreeOSMemory", + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "Empty object", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "Server error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + }, + "headers": {} + } + }, + "security": [] + } + } + }, + "definitions": { + "Bandwidth": { + "title": "bandwidth rate", + "description": "Rate at witch to rate limit bandwidth", + "type": "object", + "properties": { + "rate": { + "description": "String representation of the bandwidth rate limit (eg. 100k, 1M, ...).", + "type": "string" + } + } + }, + "Jobid": { + "type": "object", + "properties": { + "jobid": { + "description": "ID of the job", + "type": "integer" + } + } + }, + "JobInfoParams": { + "type": "object", + "properties": { + "jobid": { + "description": "ID of the job", + "type": "integer" + }, + "wait": { + "description": "Duration in seconds", + "type": "integer" + } + } + }, + "Job": { + "title": "job", + "description": "Status information about the job", + "type": "object", + "properties": { + "id": { + "description": "ID of the job", + "type": "integer" + }, + "duration": { + "description": "Time in seconds that the job ran for", + "type": "number", + "format": "double" + }, + "finished": { + "description": "Job has finished execution", + "type": "boolean" + }, + "success": { + "description": "True for success false otherwise", + "type": "boolean" + }, + "startTime": { + "description": "Time the job started (eg 2018-10-26T18:50:20.528746884+01:00)", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "Time the job finished (eg 2018-10-26T18:50:20.528746884+01:00)", + "type": "string", + "format": "date-time" + }, + "error": { + "description": "Error from the job or empty string for no error", + "type": "string" + }, + "output": { + "description": "Output of the job as would have been returned if called synchronously", + "type": "object" + } + } + }, + "ErrorResponse": { + "title": "error", + "description": "Details about error response", + "type": "object", + "properties": { + "path": { + "description": "Requested path", + "type": "string" + }, + "status": { + "description": "HTTP status code", + "type": "integer" + }, + "message": { + "description": "Error description", + "type": "string" + }, + "input": { + "description": "Map of request parameters", + "type": "object" + } + } + }, + "RemotePath": { + "type": "object", + "properties": { + "fs": { + "description": "A remote name string eg. drive:", + "type": "string" + }, + "remote": { + "description": "A path within that remote eg. dir", + "type": "string" + } + } + }, + "FileSystemDetails": { + "type": "object", + "properties": { + "free": { + "description": "Free space in bytes", + "type": "integer" + }, + "total": { + "description": "Available space in bytes", + "type": "integer" + }, + "used": { + "description": "Used space in bytes", + "type": "integer" + } + } + }, + "Content": { + "type": "object", + "properties": { + "Content": { + "description": "File content", + "type": "string", + "format": "byte" + } + } + }, + "ListOptions": { + "type": "object", + "required": [ + "fs", + "remote" + ], + "properties": { + "fs": { + "description": "A remote name string eg. drive:", + "type": "string" + }, + "remote": { + "description": "A path within that remote eg. dir", + "type": "string" + }, + "opt": { + "description": "A path within that remote eg. dir", + "type": "object", + "properties": { + "recurse": { + "description": "Recurse into the listing", + "type": "boolean" + }, + "noModTime": { + "description": "Don't read the modification time (can speed things up)", + "type": "boolean" + }, + "showEncrypted": { + "description": "Show the encrypted names", + "type": "boolean" + }, + "showOrigIDs": { + "description": "Show the ID of the underlying Object", + "type": "boolean" + }, + "showHash": { + "description": "Include hashes in the output (may take longer)", + "type": "boolean" + }, + "dirsOnly": { + "description": "Show only directories in the listing", + "type": "boolean" + }, + "filesOnly": { + "description": "Show only files in the listing", + "type": "boolean" + } + } + } + } + }, + "ListItem": { + "type": "object", + "properties": { + "Hashes": { + "description": "Hash of the item", + "type": "object" + }, + "ID": { + "description": "ID of the item", + "type": "string" + }, + "OrigID": { + "description": "Original ID of the item", + "type": "string" + }, + "IsDir": { + "description": "true if item is directory", + "type": "boolean" + }, + "MimeType": { + "description": "mime type of the item", + "type": "string" + }, + "ModTime": { + "description": "Modification time", + "type": "string", + "format": "date-time" + }, + "Name": { + "description": "Name of the item", + "type": "string" + }, + "Encrypted": { + "description": "Encrypted name", + "type": "string" + }, + "Path": { + "description": "Path of the item", + "type": "string" + }, + "Size": { + "description": "Size in bytes", + "type": "integer" + } + } + }, + "MoveOrCopyFileOptions": { + "type": "object", + "properties": { + "srcFs": { + "description": "A remote name string eg. drive: for the source", + "type": "string" + }, + "srcRemote": { + "description": "A path within that remote eg. file.txt for the source", + "type": "string" + }, + "dstFs": { + "description": "A remote name string eg. drive: for the destination", + "type": "string" + }, + "dstRemote": { + "description": "A path within that remote eg. file.txt for the destination", + "type": "string" + } + } + }, + "Remote": { + "type": "object", + "properties": { + "name": { + "description": "Name of the remote", + "type": "string" + }, + "type": { + "description": "Type of the new remote", + "type": "string" + }, + "parameters": { + "description": "Additional parameters for the remote", + "type": "object" + } + } + }, + "Transfer": { + "type": "object", + "properties": { + "name": { + "description": "name of the file", + "type": "string" + }, + "size": { + "description": "size of the file in bytes", + "type": "integer" + }, + "bytes": { + "description": "total transferred bytes for this file", + "type": "integer" + }, + "checked": { + "description": "if the transfer is only checked (skipped, deleted)", + "type": "boolean" + }, + "started_at": { + "description": "time at which transfer started", + "type": "string", + "format": "date-time" + }, + "completed_at": { + "description": "time at which transfer completed ", + "type": "string", + "format": "date-time" + }, + "error": { + "description": "string description of the error (empty if successful)", + "type": "string" + } + } + }, + "GroupList": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "type": "string", + "description": "group name" + } + } + } + }, + "StatsParams": { + "type": "object", + "properties": { + "group": { + "description": "group name", + "type": "string" + } + } + }, + "JobInfo": { + "type": "object", + "properties": { + "job": { + "description": "job", + "type": "object", + "$ref": "#/definitions/Job" + }, + "stats": { + "description": "Core status", + "type": "object", + "$ref": "#/definitions/Stats" + }, + "transferred": { + "description": "Completed transfers", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Transfer" + } + } + } + }, + "Stats": { + "type": "object", + "properties": { + "speed": { + "description": "average speed in bytes/sec since start of the process", + "type": "number", + "format": "double" + }, + "bytes": { + "description": "total transferred bytes since the start of the process", + "type": "integer" + }, + "errors": { + "description": "number of errors", + "type": "integer" + }, + "fatalError": { + "description": "whether there has been at least one FatalError", + "type": "boolean" + }, + "retryError": { + "description": "whether there has been at least one non-NoRetryError", + "type": "boolean" + }, + "checks": { + "description": "number of checked files", + "type": "integer" + }, + "transfers": { + "description": "number of transferred files", + "type": "integer" + }, + "deletes": { + "description": "number of deleted files", + "type": "integer" + }, + "elapsedTime": { + "description": "time in seconds since the start of the process", + "type": "number", + "format": "double" + }, + "lastError": { + "description": "last occurred error", + "type": "string" + }, + "transferring": { + "description": "an array of currently active file transfers", + "type": "array", + "items": { + "type": "object", + "properties": { + "bytes": { + "description": "total transferred bytes for this file", + "type": "integer" + }, + "eta": { + "description": "estimated time in seconds until file transfer completion", + "type": "number", + "format": "double" + }, + "name": { + "description": "name of the file", + "type": "string" + }, + "percentage": { + "description": "progress of the file transfer in percent", + "type": "number", + "format": "double" + }, + "speed": { + "description": "speed in bytes/sec", + "type": "number", + "format": "double" + }, + "speedAvg": { + "description": "speed in bytes/sec as an exponentially weighted moving average", + "type": "number", + "format": "double" + }, + "size": { + "description": "size of the file in bytes", + "type": "integer" + } + } + } + }, + "checking": { + "description": "an array of names of currently active file checks", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NodeInfo": { + "title": "node info", + "description": "Information about Scylla node.", + "type": "object", + "properties": { + "listen_address": { + "description": "Address Scylla listens for connections from other nodes.", + "type": "string" + }, + "native_transport_port": { + "description": "Port for the CQL native transport to listen for clients on.", + "type": "string" + }, + "rpc_address": { + "description": "Address on which Scylla is going to expect Thrift and CQL clients connections.", + "type": "string" + }, + "rpc_port": { + "description": "Port for Thrift to listen for clients on.", + "type": "string" + }, + "broadcast_address": { + "description": "Address that is broadcasted to tell other Scylla nodes to connect to. Related to listen_address.", + "type": "string" + }, + "broadcast_rpc_address": { + "description": "Address that is broadcasted to tell the clients to connect to.", + "type": "string" + }, + "api_address": { + "description": "Address for REST API requests.", + "type": "string" + }, + "api_port": { + "description": "Port for REST API server.", + "type": "string" + }, + "prometheus_address": { + "description": "Address for Prometheus queries.", + "type": "string" + }, + "prometheus_port": { + "description": "Port for Prometheus server.", + "type": "string" + } + } + } + }, + "tags": [] +} diff --git a/pkg/scyllaclient/client.go b/pkg/scyllaclient/client.go new file mode 100644 index 00000000000..bcf64ebe58a --- /dev/null +++ b/pkg/scyllaclient/client.go @@ -0,0 +1,249 @@ +package scyllaclient + +import ( + "context" + "crypto/tls" + "net" + "net/http" + "runtime" + "sort" + "sync" + "time" + + "github.com/hailocab/go-hostpool" + + "github.com/go-openapi/strfmt" + + scyllaClient "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/client" + "github.com/scylladb/scylla-operator/pkg/util/httpx" + + "github.com/scylladb/scylla-operator/pkg/auth" + + api "github.com/go-openapi/runtime/client" + apiMiddleware "github.com/go-openapi/runtime/middleware" + "github.com/scylladb/go-log" + "github.com/scylladb/go-set/strset" + scyllaOperations "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/client/operations" +) + +type Client struct { + config Config + logger log.Logger + + scyllaOps *scyllaOperations.Client + transport http.RoundTripper + + mu sync.RWMutex + dcCache map[string]string +} + +func NewClient(config Config, logger log.Logger) (*Client, error) { + /*if err := config.Validate(); err != nil { + return nil, errors.Wrap(err, "invalid config") + }*/ + setOpenAPIGlobals() + hosts := make([]string, len(config.Hosts)) + copy(hosts, config.Hosts) + + pool := hostpool.NewEpsilonGreedy(hosts, config.PoolDecayDuration, &hostpool.LinearEpsilonValueCalculator{}) + + if config.Transport == nil { + config.Transport = DefaultTransport() + } + transport := config.Transport + transport = timeout(transport, config.Timeout) + transport = requestLogger(transport, logger) + transport = hostPool(transport, pool, config.Port) + transport = auth.AddToken(transport, config.AuthToken) + transport = fixContentType(transport) + + c := &http.Client{Transport: transport} + + scyllaRuntime := api.NewWithClient( + scyllaClient.DefaultHost, scyllaClient.DefaultBasePath, []string{config.Scheme}, c, + ) + // Debug can be turned on by SWAGGER_DEBUG or DEBUG env variable + scyllaRuntime.Debug = false + + scyllaOps := scyllaOperations.New(retryable(scyllaRuntime, config, logger), strfmt.Default) + + return &Client{ + config: config, + logger: logger, + scyllaOps: scyllaOps, + transport: transport, + dcCache: make(map[string]string), + }, nil +} + +// HostDatacenter looks up the datacenter that the given host belongs to. +func (c *Client) HostDatacenter(ctx context.Context, host string) (dc string, err error) { + // Try reading from cache + c.mu.RLock() + dc = c.dcCache[host] + c.mu.RUnlock() + if dc != "" { + return + } + + resp, err := c.scyllaOps.SnitchDatacenterGet(&scyllaOperations.SnitchDatacenterGetParams{ + Context: ctx, + Host: &host, + }) + if err != nil { + return "", err + } + dc = resp.Payload + + return +} + +func (c *Client) Status(ctx context.Context, host string) (NodeStatusInfoSlice, error) { + // Get all hosts + resp, err := c.scyllaOps.StorageServiceHostIDGet(&scyllaOperations.StorageServiceHostIDGetParams{Context: forceHost(ctx, host)}) + if err != nil { + return nil, err + } + + all := make([]NodeStatusInfo, len(resp.Payload)) + for i, p := range resp.Payload { + all[i].Addr = p.Key + all[i].HostID = p.Value + } + + // Get host datacenter (hopefully cached) + for i := range all { + all[i].Datacenter, err = c.HostDatacenter(ctx, all[i].Addr) + if err != nil { + return nil, err + } + } + + // Get live nodes + live, err := c.scyllaOps.GossiperEndpointLiveGet(&scyllaOperations.GossiperEndpointLiveGetParams{Context: ctx}) + if err != nil { + return nil, err + } + setNodeStatus(all, NodeStatusUp, live.Payload) + + // Get joining nodes + joining, err := c.scyllaOps.StorageServiceNodesJoiningGet(&scyllaOperations.StorageServiceNodesJoiningGetParams{Context: ctx}) + if err != nil { + return nil, err + } + setNodeState(all, NodeStateJoining, joining.Payload) + + // Get leaving nodes + leaving, err := c.scyllaOps.StorageServiceNodesLeavingGet(&scyllaOperations.StorageServiceNodesLeavingGetParams{Context: ctx}) + if err != nil { + return nil, err + } + setNodeState(all, NodeStateLeaving, leaving.Payload) + + // Get moving nodes + moving, err := c.scyllaOps.StorageServiceNodesMovingGet(&scyllaOperations.StorageServiceNodesMovingGetParams{Context: ctx}) + if err != nil { + return nil, err + } + setNodeState(all, NodeStateMoving, moving.Payload) + + // Sort by Datacenter and Address + sort.Slice(all, func(i, j int) bool { + if all[i].Datacenter != all[j].Datacenter { + return all[i].Datacenter < all[j].Datacenter + } + return all[i].Addr < all[j].Addr + }) + + return all, nil +} + +func (c *Client) Decommission(ctx context.Context, host string) error { + _, err := c.scyllaOps.StorageServiceDecommissionPost(&scyllaOperations.StorageServiceDecommissionPostParams{Context: forceHost(ctx, host)}) + if err != nil { + return err + } + return nil +} + +func (c *Client) OperationMode(ctx context.Context, host string) (OperationalMode, error) { + resp, err := c.scyllaOps.StorageServiceOperationModeGet(&scyllaOperations.StorageServiceOperationModeGetParams{Context: forceHost(ctx, host)}) + if err != nil { + return "", err + } + return operationalModeFromString(resp.Payload), nil +} + +func DefaultTransport() *http.Transport { + return &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).DialContext, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, + + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + } +} + +func setNodeState(all []NodeStatusInfo, state NodeState, addrs []string) { + if len(addrs) == 0 { + return + } + m := strset.New(addrs...) + + for i := range all { + if m.Has(all[i].Addr) { + all[i].State = state + } + } +} + +func setNodeStatus(all []NodeStatusInfo, status NodeStatus, addrs []string) { + if len(addrs) == 0 { + return + } + m := strset.New(addrs...) + + for i := range all { + if m.Has(all[i].Addr) { + all[i].Status = status + } + } +} + +var setOpenAPIGlobalsOnce sync.Once + +func setOpenAPIGlobals() { + setOpenAPIGlobalsOnce.Do(func() { + // Timeout is defined in http client that we provide in api.NewWithClient. + // If Context is provided to operation, which is always the case here, + // this value has no meaning since OpenAPI runtime ignores it. + api.DefaultTimeout = 0 + // Disable debug output to stderr, it could have been enabled by setting + // SWAGGER_DEBUG or DEBUG env variables. + apiMiddleware.Debug = false + }) +} + +// fixContentType adjusts Scylla REST API response so that it can be consumed +// by Open API. +func fixContentType(next http.RoundTripper) http.RoundTripper { + return httpx.RoundTripperFunc(func(req *http.Request) (resp *http.Response, err error) { + defer func() { + if resp != nil { + // Force JSON, Scylla returns "text/plain" that misleads the + // unmarshaller and breaks processing. + resp.Header.Set("Content-Type", "application/json") + } + }() + return next.RoundTrip(req) + }) +} diff --git a/pkg/scyllaclient/config.go b/pkg/scyllaclient/config.go new file mode 100644 index 00000000000..39d0fc5e02e --- /dev/null +++ b/pkg/scyllaclient/config.go @@ -0,0 +1,86 @@ +package scyllaclient + +import ( + "net/http" + "time" + + "github.com/scylladb/scylla-operator/pkg/util/network" + + "github.com/pkg/errors" + "go.uber.org/multierr" +) + +// Config specifies the Client configuration. +type Config struct { + // Hosts specifies all the cluster hosts that for a pool of hosts for the + // client. + Hosts []string + // Port specifies the default Scylla Manager agent port. + Port string + // Transport scheme HTTP or HTTPS. + Scheme string + // AuthToken specifies the authentication token. + AuthToken string + // Timeout specifies time to complete a single request to Scylla REST API + // possibly including opening a TCP connection. + Timeout time.Duration + // PoolDecayDuration specifies size of time window to measure average + // request time in Epsilon-Greedy host pool. + Backoff BackoffConfig + // InteractiveBackoff specifies backoff for interactive requests i.e. + // originating from API / sctool. + InteractiveBackoff BackoffConfig + // How many seconds to wait for the job to finish before returning + // the info response. + LongPollingSeconds int64 + PoolDecayDuration time.Duration + // Transport allows for setting a custom round tripper to send HTTP + // requests over not standard connections i.e. over SSH tunnel. + Transport http.RoundTripper +} + +// BackoffConfig specifies request exponential backoff parameters. +type BackoffConfig struct { + WaitMin time.Duration + WaitMax time.Duration + MaxRetries uint64 + Multiplier float64 + Jitter float64 +} + +// DefaultConfig returns a Config initialized with default values. +func DefaultConfig() Config { + host, _ := network.FindFirstNonLocalIP() + return Config{ + Hosts: []string{host.String()}, + Port: "10001", + Scheme: "https", + Timeout: 15 * time.Second, + Backoff: BackoffConfig{ + WaitMin: 1 * time.Second, + WaitMax: 30 * time.Second, + MaxRetries: 9, + Multiplier: 2, + Jitter: 0.2, + }, + InteractiveBackoff: BackoffConfig{ + WaitMin: time.Second, + MaxRetries: 1, + }, + LongPollingSeconds: 10, + PoolDecayDuration: 30 * time.Minute, + } +} + +// Validate checks if all the fields are properly set. +func (c Config) Validate() error { + var err error + if len(c.Hosts) == 0 { + err = multierr.Append(err, errors.New("missing hosts")) + } + if c.Port == "" { + err = multierr.Append(err, errors.New("missing port")) + } + + return err +} diff --git a/pkg/scyllaclient/context.go b/pkg/scyllaclient/context.go new file mode 100644 index 00000000000..6bc56fde1de --- /dev/null +++ b/pkg/scyllaclient/context.go @@ -0,0 +1,55 @@ +// Copyright (C) 2017 ScyllaDB + +package scyllaclient + +import ( + "context" + "time" +) + +// ctxt is a context key type. +type ctxt byte + +// ctxt enumeration. +const ( + ctxInteractive ctxt = iota + ctxHost + ctxNoRetry + ctxCustomTimeout +) + +// Interactive context means that it should be processed fast without too much +// useless waiting. +func Interactive(ctx context.Context) context.Context { + return context.WithValue(ctx, ctxInteractive, true) +} + +func isInteractive(ctx context.Context) bool { + _, ok := ctx.Value(ctxInteractive).(bool) + return ok +} + +// forceHost makes hostPool middleware use the given host instead of selecting +// one. +func forceHost(ctx context.Context, host string) context.Context { + return context.WithValue(ctx, ctxHost, host) +} + +func isForceHost(ctx context.Context) bool { + _, ok := ctx.Value(ctxHost).(string) + return ok +} + +// noRetry disables retries. +func noRetry(ctx context.Context) context.Context { + return context.WithValue(ctx, ctxNoRetry, true) +} + +// customTimeout allows to pass a custom timeout to timeout middleware. +// +// WARNING: Usually this is a workaround for Scylla or other API slowness +// in field condition i.e. with tons of data. This is the last resort of +// defense please use with care. +func customTimeout(ctx context.Context, d time.Duration) context.Context { + return context.WithValue(ctx, ctxCustomTimeout, d) +} diff --git a/pkg/scyllaclient/hostpool.go b/pkg/scyllaclient/hostpool.go new file mode 100644 index 00000000000..64e9fded1c5 --- /dev/null +++ b/pkg/scyllaclient/hostpool.go @@ -0,0 +1,66 @@ +// Copyright (C) 2017 ScyllaDB + +package scyllaclient + +import ( + "net" + "net/http" + + "github.com/hailocab/go-hostpool" + "github.com/pkg/errors" + "github.com/scylladb/scylla-operator/pkg/util/httpx" +) + +var errPoolServerError = errors.New("server error") + +// hostPool sets request host from a pool. +func hostPool(next http.RoundTripper, pool hostpool.HostPool, port string) http.RoundTripper { + return httpx.RoundTripperFunc(func(req *http.Request) (*http.Response, error) { + ctx := req.Context() + + var ( + h string + hpr hostpool.HostPoolResponse + ) + + // Get host from context + h, ok := ctx.Value(ctxHost).(string) + + // Get host from pool + if !ok { + hpr = pool.Get() + h = hpr.Host() + } + + // Clone request + r := httpx.CloneRequest(req) + + // Set host and port + hp := net.JoinHostPort(h, port) + r.Host = hp + r.URL.Host = hp + + // RoundTrip shall not modify requests, here we modify it to fix error + // messages see https://github.com/scylladb/mermaid/pkg/issues/266. + // This is legit because we own the whole process. The modified request + // is not being sent. + req.Host = h + req.URL.Host = h + + resp, err := next.RoundTrip(r) + + // Mark response + if hpr != nil { + switch { + case err != nil: + hpr.Mark(err) + case resp.StatusCode == 401 || resp.StatusCode == 403 || resp.StatusCode >= 500: + hpr.Mark(errPoolServerError) + default: + hpr.Mark(nil) + } + } + + return resp, err + }) +} diff --git a/pkg/scyllaclient/internal/agent/client/agent_client.go b/pkg/scyllaclient/internal/agent/client/agent_client.go new file mode 100644 index 00000000000..b6adfedd1c6 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/agent_client.go @@ -0,0 +1,117 @@ +// 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" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/client/operations" +) + +// Default agent HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "mermaid.magic.host" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/agent" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new agent HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Agent { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new agent HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Agent { + // 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 agent client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Agent { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Agent) + cli.Transport = transport + + cli.Operations = operations.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 +} + +// Agent is a client for agent +type Agent struct { + Operations *operations.Client + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Agent) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + + c.Operations.SetTransport(transport) + +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_parameters.go new file mode 100644 index 00000000000..e361429cc8a --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewCoreBwlimitParams creates a new CoreBwlimitParams object +// with the default values initialized. +func NewCoreBwlimitParams() *CoreBwlimitParams { + var () + return &CoreBwlimitParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCoreBwlimitParamsWithTimeout creates a new CoreBwlimitParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCoreBwlimitParamsWithTimeout(timeout time.Duration) *CoreBwlimitParams { + var () + return &CoreBwlimitParams{ + + timeout: timeout, + } +} + +// NewCoreBwlimitParamsWithContext creates a new CoreBwlimitParams object +// with the default values initialized, and the ability to set a context for a request +func NewCoreBwlimitParamsWithContext(ctx context.Context) *CoreBwlimitParams { + var () + return &CoreBwlimitParams{ + + Context: ctx, + } +} + +// NewCoreBwlimitParamsWithHTTPClient creates a new CoreBwlimitParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCoreBwlimitParamsWithHTTPClient(client *http.Client) *CoreBwlimitParams { + var () + return &CoreBwlimitParams{ + HTTPClient: client, + } +} + +/*CoreBwlimitParams contains all the parameters to send to the API endpoint +for the core bwlimit operation typically these are written to a http.Request +*/ +type CoreBwlimitParams struct { + + /*BandwidthRate + bandwidth rate + + */ + BandwidthRate *models.Bandwidth + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the core bwlimit params +func (o *CoreBwlimitParams) WithTimeout(timeout time.Duration) *CoreBwlimitParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the core bwlimit params +func (o *CoreBwlimitParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the core bwlimit params +func (o *CoreBwlimitParams) WithContext(ctx context.Context) *CoreBwlimitParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the core bwlimit params +func (o *CoreBwlimitParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the core bwlimit params +func (o *CoreBwlimitParams) WithHTTPClient(client *http.Client) *CoreBwlimitParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the core bwlimit params +func (o *CoreBwlimitParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBandwidthRate adds the bandwidthRate to the core bwlimit params +func (o *CoreBwlimitParams) WithBandwidthRate(bandwidthRate *models.Bandwidth) *CoreBwlimitParams { + o.SetBandwidthRate(bandwidthRate) + return o +} + +// SetBandwidthRate adds the bandwidthRate to the core bwlimit params +func (o *CoreBwlimitParams) SetBandwidthRate(bandwidthRate *models.Bandwidth) { + o.BandwidthRate = bandwidthRate +} + +// WriteToRequest writes these params to a swagger request +func (o *CoreBwlimitParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BandwidthRate != nil { + if err := r.SetBodyParam(o.BandwidthRate); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_responses.go b/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_responses.go new file mode 100644 index 00000000000..582d824088f --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_bwlimit_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// CoreBwlimitReader is a Reader for the CoreBwlimit structure. +type CoreBwlimitReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CoreBwlimitReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCoreBwlimitOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCoreBwlimitDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCoreBwlimitOK creates a CoreBwlimitOK with default headers values +func NewCoreBwlimitOK() *CoreBwlimitOK { + return &CoreBwlimitOK{} +} + +/*CoreBwlimitOK handles this case with default header values. + +bandwidth rate +*/ +type CoreBwlimitOK struct { + Payload *models.Bandwidth + JobID int64 +} + +func (o *CoreBwlimitOK) GetPayload() *models.Bandwidth { + return o.Payload +} + +func (o *CoreBwlimitOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Bandwidth) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewCoreBwlimitDefault creates a CoreBwlimitDefault with default headers values +func NewCoreBwlimitDefault(code int) *CoreBwlimitDefault { + return &CoreBwlimitDefault{ + _statusCode: code, + } +} + +/*CoreBwlimitDefault handles this case with default header values. + +Server error +*/ +type CoreBwlimitDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the core bwlimit default response +func (o *CoreBwlimitDefault) Code() int { + return o._statusCode +} + +func (o *CoreBwlimitDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *CoreBwlimitDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *CoreBwlimitDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_parameters.go new file mode 100644 index 00000000000..b06ed17fe87 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewCoreStatsDeleteParams creates a new CoreStatsDeleteParams object +// with the default values initialized. +func NewCoreStatsDeleteParams() *CoreStatsDeleteParams { + var () + return &CoreStatsDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCoreStatsDeleteParamsWithTimeout creates a new CoreStatsDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCoreStatsDeleteParamsWithTimeout(timeout time.Duration) *CoreStatsDeleteParams { + var () + return &CoreStatsDeleteParams{ + + timeout: timeout, + } +} + +// NewCoreStatsDeleteParamsWithContext creates a new CoreStatsDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewCoreStatsDeleteParamsWithContext(ctx context.Context) *CoreStatsDeleteParams { + var () + return &CoreStatsDeleteParams{ + + Context: ctx, + } +} + +// NewCoreStatsDeleteParamsWithHTTPClient creates a new CoreStatsDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCoreStatsDeleteParamsWithHTTPClient(client *http.Client) *CoreStatsDeleteParams { + var () + return &CoreStatsDeleteParams{ + HTTPClient: client, + } +} + +/*CoreStatsDeleteParams contains all the parameters to send to the API endpoint +for the core stats delete operation typically these are written to a http.Request +*/ +type CoreStatsDeleteParams struct { + + /*StatsParams + Stats parameters + + */ + StatsParams *models.StatsParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the core stats delete params +func (o *CoreStatsDeleteParams) WithTimeout(timeout time.Duration) *CoreStatsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the core stats delete params +func (o *CoreStatsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the core stats delete params +func (o *CoreStatsDeleteParams) WithContext(ctx context.Context) *CoreStatsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the core stats delete params +func (o *CoreStatsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the core stats delete params +func (o *CoreStatsDeleteParams) WithHTTPClient(client *http.Client) *CoreStatsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the core stats delete params +func (o *CoreStatsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStatsParams adds the statsParams to the core stats delete params +func (o *CoreStatsDeleteParams) WithStatsParams(statsParams *models.StatsParams) *CoreStatsDeleteParams { + o.SetStatsParams(statsParams) + return o +} + +// SetStatsParams adds the statsParams to the core stats delete params +func (o *CoreStatsDeleteParams) SetStatsParams(statsParams *models.StatsParams) { + o.StatsParams = statsParams +} + +// WriteToRequest writes these params to a swagger request +func (o *CoreStatsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StatsParams != nil { + if err := r.SetBodyParam(o.StatsParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_responses.go b/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_responses.go new file mode 100644 index 00000000000..00df1e0cc88 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_stats_delete_responses.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// CoreStatsDeleteReader is a Reader for the CoreStatsDelete structure. +type CoreStatsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CoreStatsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCoreStatsDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCoreStatsDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCoreStatsDeleteOK creates a CoreStatsDeleteOK with default headers values +func NewCoreStatsDeleteOK() *CoreStatsDeleteOK { + return &CoreStatsDeleteOK{} +} + +/*CoreStatsDeleteOK handles this case with default header values. + +Empty object +*/ +type CoreStatsDeleteOK struct { + Payload interface{} + JobID int64 +} + +func (o *CoreStatsDeleteOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CoreStatsDeleteOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewCoreStatsDeleteDefault creates a CoreStatsDeleteDefault with default headers values +func NewCoreStatsDeleteDefault(code int) *CoreStatsDeleteDefault { + return &CoreStatsDeleteDefault{ + _statusCode: code, + } +} + +/*CoreStatsDeleteDefault handles this case with default header values. + +Server error +*/ +type CoreStatsDeleteDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the core stats delete default response +func (o *CoreStatsDeleteDefault) Code() int { + return o._statusCode +} + +func (o *CoreStatsDeleteDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *CoreStatsDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *CoreStatsDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_parameters.go new file mode 100644 index 00000000000..902474df764 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewCoreStatsResetParams creates a new CoreStatsResetParams object +// with the default values initialized. +func NewCoreStatsResetParams() *CoreStatsResetParams { + var () + return &CoreStatsResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCoreStatsResetParamsWithTimeout creates a new CoreStatsResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCoreStatsResetParamsWithTimeout(timeout time.Duration) *CoreStatsResetParams { + var () + return &CoreStatsResetParams{ + + timeout: timeout, + } +} + +// NewCoreStatsResetParamsWithContext creates a new CoreStatsResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCoreStatsResetParamsWithContext(ctx context.Context) *CoreStatsResetParams { + var () + return &CoreStatsResetParams{ + + Context: ctx, + } +} + +// NewCoreStatsResetParamsWithHTTPClient creates a new CoreStatsResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCoreStatsResetParamsWithHTTPClient(client *http.Client) *CoreStatsResetParams { + var () + return &CoreStatsResetParams{ + HTTPClient: client, + } +} + +/*CoreStatsResetParams contains all the parameters to send to the API endpoint +for the core stats reset operation typically these are written to a http.Request +*/ +type CoreStatsResetParams struct { + + /*StatsParams + Stats parameters + + */ + StatsParams *models.StatsParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the core stats reset params +func (o *CoreStatsResetParams) WithTimeout(timeout time.Duration) *CoreStatsResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the core stats reset params +func (o *CoreStatsResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the core stats reset params +func (o *CoreStatsResetParams) WithContext(ctx context.Context) *CoreStatsResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the core stats reset params +func (o *CoreStatsResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the core stats reset params +func (o *CoreStatsResetParams) WithHTTPClient(client *http.Client) *CoreStatsResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the core stats reset params +func (o *CoreStatsResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithStatsParams adds the statsParams to the core stats reset params +func (o *CoreStatsResetParams) WithStatsParams(statsParams *models.StatsParams) *CoreStatsResetParams { + o.SetStatsParams(statsParams) + return o +} + +// SetStatsParams adds the statsParams to the core stats reset params +func (o *CoreStatsResetParams) SetStatsParams(statsParams *models.StatsParams) { + o.StatsParams = statsParams +} + +// WriteToRequest writes these params to a swagger request +func (o *CoreStatsResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.StatsParams != nil { + if err := r.SetBodyParam(o.StatsParams); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_responses.go b/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_responses.go new file mode 100644 index 00000000000..54df1ea0510 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/core_stats_reset_responses.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// CoreStatsResetReader is a Reader for the CoreStatsReset structure. +type CoreStatsResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CoreStatsResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCoreStatsResetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCoreStatsResetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCoreStatsResetOK creates a CoreStatsResetOK with default headers values +func NewCoreStatsResetOK() *CoreStatsResetOK { + return &CoreStatsResetOK{} +} + +/*CoreStatsResetOK handles this case with default header values. + +Empty object +*/ +type CoreStatsResetOK struct { + Payload interface{} + JobID int64 +} + +func (o *CoreStatsResetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CoreStatsResetOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewCoreStatsResetDefault creates a CoreStatsResetDefault with default headers values +func NewCoreStatsResetDefault(code int) *CoreStatsResetDefault { + return &CoreStatsResetDefault{ + _statusCode: code, + } +} + +/*CoreStatsResetDefault handles this case with default header values. + +Server error +*/ +type CoreStatsResetDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the core stats reset default response +func (o *CoreStatsResetDefault) Code() int { + return o._statusCode +} + +func (o *CoreStatsResetDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *CoreStatsResetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *CoreStatsResetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_parameters.go new file mode 100644 index 00000000000..3c9ad85af32 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFreeOSMemoryParams creates a new FreeOSMemoryParams object +// with the default values initialized. +func NewFreeOSMemoryParams() *FreeOSMemoryParams { + + return &FreeOSMemoryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFreeOSMemoryParamsWithTimeout creates a new FreeOSMemoryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFreeOSMemoryParamsWithTimeout(timeout time.Duration) *FreeOSMemoryParams { + + return &FreeOSMemoryParams{ + + timeout: timeout, + } +} + +// NewFreeOSMemoryParamsWithContext creates a new FreeOSMemoryParams object +// with the default values initialized, and the ability to set a context for a request +func NewFreeOSMemoryParamsWithContext(ctx context.Context) *FreeOSMemoryParams { + + return &FreeOSMemoryParams{ + + Context: ctx, + } +} + +// NewFreeOSMemoryParamsWithHTTPClient creates a new FreeOSMemoryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFreeOSMemoryParamsWithHTTPClient(client *http.Client) *FreeOSMemoryParams { + + return &FreeOSMemoryParams{ + HTTPClient: client, + } +} + +/*FreeOSMemoryParams contains all the parameters to send to the API endpoint +for the free o s memory operation typically these are written to a http.Request +*/ +type FreeOSMemoryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the free o s memory params +func (o *FreeOSMemoryParams) WithTimeout(timeout time.Duration) *FreeOSMemoryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the free o s memory params +func (o *FreeOSMemoryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the free o s memory params +func (o *FreeOSMemoryParams) WithContext(ctx context.Context) *FreeOSMemoryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the free o s memory params +func (o *FreeOSMemoryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the free o s memory params +func (o *FreeOSMemoryParams) WithHTTPClient(client *http.Client) *FreeOSMemoryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the free o s memory params +func (o *FreeOSMemoryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FreeOSMemoryParams) 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/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_responses.go b/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_responses.go new file mode 100644 index 00000000000..31391a3207b --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/free_o_s_memory_responses.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// FreeOSMemoryReader is a Reader for the FreeOSMemory structure. +type FreeOSMemoryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FreeOSMemoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFreeOSMemoryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFreeOSMemoryDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFreeOSMemoryOK creates a FreeOSMemoryOK with default headers values +func NewFreeOSMemoryOK() *FreeOSMemoryOK { + return &FreeOSMemoryOK{} +} + +/*FreeOSMemoryOK handles this case with default header values. + +Empty object +*/ +type FreeOSMemoryOK struct { + Payload interface{} + JobID int64 +} + +func (o *FreeOSMemoryOK) GetPayload() interface{} { + return o.Payload +} + +func (o *FreeOSMemoryOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewFreeOSMemoryDefault creates a FreeOSMemoryDefault with default headers values +func NewFreeOSMemoryDefault(code int) *FreeOSMemoryDefault { + return &FreeOSMemoryDefault{ + _statusCode: code, + } +} + +/*FreeOSMemoryDefault handles this case with default header values. + +Server error +*/ +type FreeOSMemoryDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the free o s memory default response +func (o *FreeOSMemoryDefault) Code() int { + return o._statusCode +} + +func (o *FreeOSMemoryDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *FreeOSMemoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *FreeOSMemoryDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/job_info_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/job_info_parameters.go new file mode 100644 index 00000000000..ff40cee96a9 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/job_info_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewJobInfoParams creates a new JobInfoParams object +// with the default values initialized. +func NewJobInfoParams() *JobInfoParams { + var () + return &JobInfoParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewJobInfoParamsWithTimeout creates a new JobInfoParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewJobInfoParamsWithTimeout(timeout time.Duration) *JobInfoParams { + var () + return &JobInfoParams{ + + timeout: timeout, + } +} + +// NewJobInfoParamsWithContext creates a new JobInfoParams object +// with the default values initialized, and the ability to set a context for a request +func NewJobInfoParamsWithContext(ctx context.Context) *JobInfoParams { + var () + return &JobInfoParams{ + + Context: ctx, + } +} + +// NewJobInfoParamsWithHTTPClient creates a new JobInfoParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewJobInfoParamsWithHTTPClient(client *http.Client) *JobInfoParams { + var () + return &JobInfoParams{ + HTTPClient: client, + } +} + +/*JobInfoParams contains all the parameters to send to the API endpoint +for the job info operation typically these are written to a http.Request +*/ +type JobInfoParams struct { + + /*Jobinfo + Job info params with id and long polling + + */ + Jobinfo *models.JobInfoParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the job info params +func (o *JobInfoParams) WithTimeout(timeout time.Duration) *JobInfoParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job info params +func (o *JobInfoParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job info params +func (o *JobInfoParams) WithContext(ctx context.Context) *JobInfoParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job info params +func (o *JobInfoParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job info params +func (o *JobInfoParams) WithHTTPClient(client *http.Client) *JobInfoParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job info params +func (o *JobInfoParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJobinfo adds the jobinfo to the job info params +func (o *JobInfoParams) WithJobinfo(jobinfo *models.JobInfoParams) *JobInfoParams { + o.SetJobinfo(jobinfo) + return o +} + +// SetJobinfo adds the jobinfo to the job info params +func (o *JobInfoParams) SetJobinfo(jobinfo *models.JobInfoParams) { + o.Jobinfo = jobinfo +} + +// WriteToRequest writes these params to a swagger request +func (o *JobInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Jobinfo != nil { + if err := r.SetBodyParam(o.Jobinfo); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/job_info_responses.go b/pkg/scyllaclient/internal/agent/client/operations/job_info_responses.go new file mode 100644 index 00000000000..081ade67d96 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/job_info_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// JobInfoReader is a Reader for the JobInfo structure. +type JobInfoReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobInfoOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobInfoDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobInfoOK creates a JobInfoOK with default headers values +func NewJobInfoOK() *JobInfoOK { + return &JobInfoOK{} +} + +/*JobInfoOK handles this case with default header values. + +Aggregated info about job transfers +*/ +type JobInfoOK struct { + Payload *models.JobInfo + JobID int64 +} + +func (o *JobInfoOK) GetPayload() *models.JobInfo { + return o.Payload +} + +func (o *JobInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.JobInfo) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewJobInfoDefault creates a JobInfoDefault with default headers values +func NewJobInfoDefault(code int) *JobInfoDefault { + return &JobInfoDefault{ + _statusCode: code, + } +} + +/*JobInfoDefault handles this case with default header values. + +Server error +*/ +type JobInfoDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the job info default response +func (o *JobInfoDefault) Code() int { + return o._statusCode +} + +func (o *JobInfoDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *JobInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *JobInfoDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/job_stop_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/job_stop_parameters.go new file mode 100644 index 00000000000..4f0041e85d4 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/job_stop_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewJobStopParams creates a new JobStopParams object +// with the default values initialized. +func NewJobStopParams() *JobStopParams { + var () + return &JobStopParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewJobStopParamsWithTimeout creates a new JobStopParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewJobStopParamsWithTimeout(timeout time.Duration) *JobStopParams { + var () + return &JobStopParams{ + + timeout: timeout, + } +} + +// NewJobStopParamsWithContext creates a new JobStopParams object +// with the default values initialized, and the ability to set a context for a request +func NewJobStopParamsWithContext(ctx context.Context) *JobStopParams { + var () + return &JobStopParams{ + + Context: ctx, + } +} + +// NewJobStopParamsWithHTTPClient creates a new JobStopParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewJobStopParamsWithHTTPClient(client *http.Client) *JobStopParams { + var () + return &JobStopParams{ + HTTPClient: client, + } +} + +/*JobStopParams contains all the parameters to send to the API endpoint +for the job stop operation typically these are written to a http.Request +*/ +type JobStopParams struct { + + /*Jobid + jobid + + */ + Jobid *models.Jobid + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the job stop params +func (o *JobStopParams) WithTimeout(timeout time.Duration) *JobStopParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the job stop params +func (o *JobStopParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the job stop params +func (o *JobStopParams) WithContext(ctx context.Context) *JobStopParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the job stop params +func (o *JobStopParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the job stop params +func (o *JobStopParams) WithHTTPClient(client *http.Client) *JobStopParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the job stop params +func (o *JobStopParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithJobid adds the jobid to the job stop params +func (o *JobStopParams) WithJobid(jobid *models.Jobid) *JobStopParams { + o.SetJobid(jobid) + return o +} + +// SetJobid adds the jobid to the job stop params +func (o *JobStopParams) SetJobid(jobid *models.Jobid) { + o.Jobid = jobid +} + +// WriteToRequest writes these params to a swagger request +func (o *JobStopParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Jobid != nil { + if err := r.SetBodyParam(o.Jobid); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/job_stop_responses.go b/pkg/scyllaclient/internal/agent/client/operations/job_stop_responses.go new file mode 100644 index 00000000000..bc650de910a --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/job_stop_responses.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// JobStopReader is a Reader for the JobStop structure. +type JobStopReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *JobStopReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewJobStopOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewJobStopDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewJobStopOK creates a JobStopOK with default headers values +func NewJobStopOK() *JobStopOK { + return &JobStopOK{} +} + +/*JobStopOK handles this case with default header values. + +Empty object +*/ +type JobStopOK struct { + Payload interface{} + JobID int64 +} + +func (o *JobStopOK) GetPayload() interface{} { + return o.Payload +} + +func (o *JobStopOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewJobStopDefault creates a JobStopDefault with default headers values +func NewJobStopDefault(code int) *JobStopDefault { + return &JobStopDefault{ + _statusCode: code, + } +} + +/*JobStopDefault handles this case with default header values. + +Server error +*/ +type JobStopDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the job stop default response +func (o *JobStopDefault) Code() int { + return o._statusCode +} + +func (o *JobStopDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *JobStopDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *JobStopDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/node_info_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/node_info_parameters.go new file mode 100644 index 00000000000..7331ec5eb85 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/node_info_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewNodeInfoParams creates a new NodeInfoParams object +// with the default values initialized. +func NewNodeInfoParams() *NodeInfoParams { + + return &NodeInfoParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewNodeInfoParamsWithTimeout creates a new NodeInfoParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewNodeInfoParamsWithTimeout(timeout time.Duration) *NodeInfoParams { + + return &NodeInfoParams{ + + timeout: timeout, + } +} + +// NewNodeInfoParamsWithContext creates a new NodeInfoParams object +// with the default values initialized, and the ability to set a context for a request +func NewNodeInfoParamsWithContext(ctx context.Context) *NodeInfoParams { + + return &NodeInfoParams{ + + Context: ctx, + } +} + +// NewNodeInfoParamsWithHTTPClient creates a new NodeInfoParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewNodeInfoParamsWithHTTPClient(client *http.Client) *NodeInfoParams { + + return &NodeInfoParams{ + HTTPClient: client, + } +} + +/*NodeInfoParams contains all the parameters to send to the API endpoint +for the node info operation typically these are written to a http.Request +*/ +type NodeInfoParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the node info params +func (o *NodeInfoParams) WithTimeout(timeout time.Duration) *NodeInfoParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the node info params +func (o *NodeInfoParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the node info params +func (o *NodeInfoParams) WithContext(ctx context.Context) *NodeInfoParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the node info params +func (o *NodeInfoParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the node info params +func (o *NodeInfoParams) WithHTTPClient(client *http.Client) *NodeInfoParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the node info params +func (o *NodeInfoParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *NodeInfoParams) 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/pkg/scyllaclient/internal/agent/client/operations/node_info_responses.go b/pkg/scyllaclient/internal/agent/client/operations/node_info_responses.go new file mode 100644 index 00000000000..495bd6ea5e5 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/node_info_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NodeInfoReader is a Reader for the NodeInfo structure. +type NodeInfoReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *NodeInfoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewNodeInfoOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewNodeInfoDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewNodeInfoOK creates a NodeInfoOK with default headers values +func NewNodeInfoOK() *NodeInfoOK { + return &NodeInfoOK{} +} + +/*NodeInfoOK handles this case with default header values. + +node information +*/ +type NodeInfoOK struct { + Payload *models.NodeInfo + JobID int64 +} + +func (o *NodeInfoOK) GetPayload() *models.NodeInfo { + return o.Payload +} + +func (o *NodeInfoOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewNodeInfoDefault creates a NodeInfoDefault with default headers values +func NewNodeInfoDefault(code int) *NodeInfoDefault { + return &NodeInfoDefault{ + _statusCode: code, + } +} + +/*NodeInfoDefault handles this case with default header values. + +Server error +*/ +type NodeInfoDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the node info default response +func (o *NodeInfoDefault) Code() int { + return o._statusCode +} + +func (o *NodeInfoDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *NodeInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *NodeInfoDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_about_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_about_parameters.go new file mode 100644 index 00000000000..58185d9e0f4 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_about_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsAboutParams creates a new OperationsAboutParams object +// with the default values initialized. +func NewOperationsAboutParams() *OperationsAboutParams { + var () + return &OperationsAboutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsAboutParamsWithTimeout creates a new OperationsAboutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsAboutParamsWithTimeout(timeout time.Duration) *OperationsAboutParams { + var () + return &OperationsAboutParams{ + + timeout: timeout, + } +} + +// NewOperationsAboutParamsWithContext creates a new OperationsAboutParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsAboutParamsWithContext(ctx context.Context) *OperationsAboutParams { + var () + return &OperationsAboutParams{ + + Context: ctx, + } +} + +// NewOperationsAboutParamsWithHTTPClient creates a new OperationsAboutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsAboutParamsWithHTTPClient(client *http.Client) *OperationsAboutParams { + var () + return &OperationsAboutParams{ + HTTPClient: client, + } +} + +/*OperationsAboutParams contains all the parameters to send to the API endpoint +for the operations about operation typically these are written to a http.Request +*/ +type OperationsAboutParams struct { + + /*About + about + + */ + About *models.RemotePath + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations about params +func (o *OperationsAboutParams) WithTimeout(timeout time.Duration) *OperationsAboutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations about params +func (o *OperationsAboutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations about params +func (o *OperationsAboutParams) WithContext(ctx context.Context) *OperationsAboutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations about params +func (o *OperationsAboutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations about params +func (o *OperationsAboutParams) WithHTTPClient(client *http.Client) *OperationsAboutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations about params +func (o *OperationsAboutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAbout adds the about to the operations about params +func (o *OperationsAboutParams) WithAbout(about *models.RemotePath) *OperationsAboutParams { + o.SetAbout(about) + return o +} + +// SetAbout adds the about to the operations about params +func (o *OperationsAboutParams) SetAbout(about *models.RemotePath) { + o.About = about +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsAboutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.About != nil { + if err := r.SetBodyParam(o.About); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_about_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_about_responses.go new file mode 100644 index 00000000000..77fa59e77e7 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_about_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsAboutReader is a Reader for the OperationsAbout structure. +type OperationsAboutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsAboutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsAboutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsAboutDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsAboutOK creates a OperationsAboutOK with default headers values +func NewOperationsAboutOK() *OperationsAboutOK { + return &OperationsAboutOK{} +} + +/*OperationsAboutOK handles this case with default header values. + +File system details +*/ +type OperationsAboutOK struct { + Payload *models.FileSystemDetails + JobID int64 +} + +func (o *OperationsAboutOK) GetPayload() *models.FileSystemDetails { + return o.Payload +} + +func (o *OperationsAboutOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.FileSystemDetails) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsAboutDefault creates a OperationsAboutDefault with default headers values +func NewOperationsAboutDefault(code int) *OperationsAboutDefault { + return &OperationsAboutDefault{ + _statusCode: code, + } +} + +/*OperationsAboutDefault handles this case with default header values. + +Server error +*/ +type OperationsAboutDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations about default response +func (o *OperationsAboutDefault) Code() int { + return o._statusCode +} + +func (o *OperationsAboutDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsAboutDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsAboutDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_cat_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_cat_parameters.go new file mode 100644 index 00000000000..8f26113b506 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_cat_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsCatParams creates a new OperationsCatParams object +// with the default values initialized. +func NewOperationsCatParams() *OperationsCatParams { + var () + return &OperationsCatParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsCatParamsWithTimeout creates a new OperationsCatParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsCatParamsWithTimeout(timeout time.Duration) *OperationsCatParams { + var () + return &OperationsCatParams{ + + timeout: timeout, + } +} + +// NewOperationsCatParamsWithContext creates a new OperationsCatParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsCatParamsWithContext(ctx context.Context) *OperationsCatParams { + var () + return &OperationsCatParams{ + + Context: ctx, + } +} + +// NewOperationsCatParamsWithHTTPClient creates a new OperationsCatParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsCatParamsWithHTTPClient(client *http.Client) *OperationsCatParams { + var () + return &OperationsCatParams{ + HTTPClient: client, + } +} + +/*OperationsCatParams contains all the parameters to send to the API endpoint +for the operations cat operation typically these are written to a http.Request +*/ +type OperationsCatParams struct { + + /*Cat + cat + + */ + Cat *models.RemotePath + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations cat params +func (o *OperationsCatParams) WithTimeout(timeout time.Duration) *OperationsCatParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations cat params +func (o *OperationsCatParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations cat params +func (o *OperationsCatParams) WithContext(ctx context.Context) *OperationsCatParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations cat params +func (o *OperationsCatParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations cat params +func (o *OperationsCatParams) WithHTTPClient(client *http.Client) *OperationsCatParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations cat params +func (o *OperationsCatParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCat adds the cat to the operations cat params +func (o *OperationsCatParams) WithCat(cat *models.RemotePath) *OperationsCatParams { + o.SetCat(cat) + return o +} + +// SetCat adds the cat to the operations cat params +func (o *OperationsCatParams) SetCat(cat *models.RemotePath) { + o.Cat = cat +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsCatParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cat != nil { + if err := r.SetBodyParam(o.Cat); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_cat_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_cat_responses.go new file mode 100644 index 00000000000..7117905f88d --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_cat_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsCatReader is a Reader for the OperationsCat structure. +type OperationsCatReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsCatReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsCatOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsCatDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsCatOK creates a OperationsCatOK with default headers values +func NewOperationsCatOK() *OperationsCatOK { + return &OperationsCatOK{} +} + +/*OperationsCatOK handles this case with default header values. + +File system details +*/ +type OperationsCatOK struct { + Payload *models.Content + JobID int64 +} + +func (o *OperationsCatOK) GetPayload() *models.Content { + return o.Payload +} + +func (o *OperationsCatOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Content) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsCatDefault creates a OperationsCatDefault with default headers values +func NewOperationsCatDefault(code int) *OperationsCatDefault { + return &OperationsCatDefault{ + _statusCode: code, + } +} + +/*OperationsCatDefault handles this case with default header values. + +Server error +*/ +type OperationsCatDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations cat default response +func (o *OperationsCatDefault) Code() int { + return o._statusCode +} + +func (o *OperationsCatDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsCatDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsCatDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_parameters.go new file mode 100644 index 00000000000..8d38c02f3ce --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsCheckPermissionsParams creates a new OperationsCheckPermissionsParams object +// with the default values initialized. +func NewOperationsCheckPermissionsParams() *OperationsCheckPermissionsParams { + var () + return &OperationsCheckPermissionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsCheckPermissionsParamsWithTimeout creates a new OperationsCheckPermissionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsCheckPermissionsParamsWithTimeout(timeout time.Duration) *OperationsCheckPermissionsParams { + var () + return &OperationsCheckPermissionsParams{ + + timeout: timeout, + } +} + +// NewOperationsCheckPermissionsParamsWithContext creates a new OperationsCheckPermissionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsCheckPermissionsParamsWithContext(ctx context.Context) *OperationsCheckPermissionsParams { + var () + return &OperationsCheckPermissionsParams{ + + Context: ctx, + } +} + +// NewOperationsCheckPermissionsParamsWithHTTPClient creates a new OperationsCheckPermissionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsCheckPermissionsParamsWithHTTPClient(client *http.Client) *OperationsCheckPermissionsParams { + var () + return &OperationsCheckPermissionsParams{ + HTTPClient: client, + } +} + +/*OperationsCheckPermissionsParams contains all the parameters to send to the API endpoint +for the operations check permissions operation typically these are written to a http.Request +*/ +type OperationsCheckPermissionsParams struct { + + /*Fs + FS to check + + */ + Fs *models.RemotePath + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations check permissions params +func (o *OperationsCheckPermissionsParams) WithTimeout(timeout time.Duration) *OperationsCheckPermissionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations check permissions params +func (o *OperationsCheckPermissionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations check permissions params +func (o *OperationsCheckPermissionsParams) WithContext(ctx context.Context) *OperationsCheckPermissionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations check permissions params +func (o *OperationsCheckPermissionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations check permissions params +func (o *OperationsCheckPermissionsParams) WithHTTPClient(client *http.Client) *OperationsCheckPermissionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations check permissions params +func (o *OperationsCheckPermissionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFs adds the fs to the operations check permissions params +func (o *OperationsCheckPermissionsParams) WithFs(fs *models.RemotePath) *OperationsCheckPermissionsParams { + o.SetFs(fs) + return o +} + +// SetFs adds the fs to the operations check permissions params +func (o *OperationsCheckPermissionsParams) SetFs(fs *models.RemotePath) { + o.Fs = fs +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsCheckPermissionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Fs != nil { + if err := r.SetBodyParam(o.Fs); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_responses.go new file mode 100644 index 00000000000..5c9d100f8a5 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_check_permissions_responses.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsCheckPermissionsReader is a Reader for the OperationsCheckPermissions structure. +type OperationsCheckPermissionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsCheckPermissionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsCheckPermissionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsCheckPermissionsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsCheckPermissionsOK creates a OperationsCheckPermissionsOK with default headers values +func NewOperationsCheckPermissionsOK() *OperationsCheckPermissionsOK { + return &OperationsCheckPermissionsOK{} +} + +/*OperationsCheckPermissionsOK handles this case with default header values. + +Empty object +*/ +type OperationsCheckPermissionsOK struct { + Payload interface{} + JobID int64 +} + +func (o *OperationsCheckPermissionsOK) GetPayload() interface{} { + return o.Payload +} + +func (o *OperationsCheckPermissionsOK) 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 + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsCheckPermissionsDefault creates a OperationsCheckPermissionsDefault with default headers values +func NewOperationsCheckPermissionsDefault(code int) *OperationsCheckPermissionsDefault { + return &OperationsCheckPermissionsDefault{ + _statusCode: code, + } +} + +/*OperationsCheckPermissionsDefault handles this case with default header values. + +Server error +*/ +type OperationsCheckPermissionsDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations check permissions default response +func (o *OperationsCheckPermissionsDefault) Code() int { + return o._statusCode +} + +func (o *OperationsCheckPermissionsDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsCheckPermissionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsCheckPermissionsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_client.go b/pkg/scyllaclient/internal/agent/client/operations/operations_client.go new file mode 100644 index 00000000000..42659014de7 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_client.go @@ -0,0 +1,590 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// New creates a new operations API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client for operations API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +/* +CoreBwlimit sets the bandwidth limit + +This sets the bandwidth limit to that passed in +*/ +func (a *Client) CoreBwlimit(params *CoreBwlimitParams) (*CoreBwlimitOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCoreBwlimitParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CoreBwlimit", + Method: "POST", + PathPattern: "/rclone/core/bwlimit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CoreBwlimitReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CoreBwlimitOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CoreBwlimitDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CoreStatsDelete deletes specific stats group + +Delete stats +*/ +func (a *Client) CoreStatsDelete(params *CoreStatsDeleteParams) (*CoreStatsDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCoreStatsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CoreStatsDelete", + Method: "POST", + PathPattern: "/rclone/core/stats-delete", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CoreStatsDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CoreStatsDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CoreStatsDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CoreStatsReset resets all or specific stats group + +Resets stats +*/ +func (a *Client) CoreStatsReset(params *CoreStatsResetParams) (*CoreStatsResetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCoreStatsResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CoreStatsReset", + Method: "POST", + PathPattern: "/rclone/core/stats-reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CoreStatsResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CoreStatsResetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CoreStatsResetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FreeOSMemory returns memory to o s + +Run debug.FreeOSMemory on the agent +*/ +func (a *Client) FreeOSMemory(params *FreeOSMemoryParams) (*FreeOSMemoryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFreeOSMemoryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FreeOSMemory", + Method: "POST", + PathPattern: "/free_os_memory", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FreeOSMemoryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FreeOSMemoryOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FreeOSMemoryDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +JobInfo transfers stats about the job + +Returns current, completed transfers and job stats +*/ +func (a *Client) JobInfo(params *JobInfoParams) (*JobInfoOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewJobInfoParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "JobInfo", + Method: "POST", + PathPattern: "/rclone/job/info", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &JobInfoReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*JobInfoOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobInfoDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +JobStop stops async job + +Stops job with provided ID +*/ +func (a *Client) JobStop(params *JobStopParams) (*JobStopOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewJobStopParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "JobStop", + Method: "POST", + PathPattern: "/rclone/job/stop", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &JobStopReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*JobStopOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*JobStopDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +NodeInfo gets information about scylla node + +Get information about Scylla node +*/ +func (a *Client) NodeInfo(params *NodeInfoParams) (*NodeInfoOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewNodeInfoParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "NodeInfo", + Method: "GET", + PathPattern: "/node_info", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &NodeInfoReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*NodeInfoOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*NodeInfoDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsAbout abouts remote + +Get usage information from the remote +*/ +func (a *Client) OperationsAbout(params *OperationsAboutParams) (*OperationsAboutOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsAboutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsAbout", + Method: "POST", + PathPattern: "/rclone/operations/about", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsAboutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsAboutOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsAboutDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsCat cats remote + +Concatenate any files and send them in response +*/ +func (a *Client) OperationsCat(params *OperationsCatParams) (*OperationsCatOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsCatParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsCat", + Method: "POST", + PathPattern: "/rclone/operations/cat", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsCatReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsCatOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsCatDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsCheckPermissions checks fs + +Check if the fs is fully accessible +*/ +func (a *Client) OperationsCheckPermissions(params *OperationsCheckPermissionsParams) (*OperationsCheckPermissionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsCheckPermissionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsCheckPermissions", + Method: "POST", + PathPattern: "/rclone/operations/check-permissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsCheckPermissionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsCheckPermissionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsCheckPermissionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsCopyfile copies a file + +Copy a file from source remote to destination remote +*/ +func (a *Client) OperationsCopyfile(params *OperationsCopyfileParams) (*OperationsCopyfileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsCopyfileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsCopyfile", + Method: "POST", + PathPattern: "/rclone/operations/copyfile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsCopyfileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsCopyfileOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsCopyfileDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsDeletefile deletes file + +Remove the single file pointed to +*/ +func (a *Client) OperationsDeletefile(params *OperationsDeletefileParams) (*OperationsDeletefileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsDeletefileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsDeletefile", + Method: "POST", + PathPattern: "/rclone/operations/deletefile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsDeletefileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsDeletefileOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsDeletefileDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsList lists remote + +List the given remote and path +*/ +func (a *Client) OperationsList(params *OperationsListParams) (*OperationsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsList", + Method: "POST", + PathPattern: "/rclone/operations/list", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsListOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsListDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsMovefile moves a file + +Move a file from source remote to destination remote +*/ +func (a *Client) OperationsMovefile(params *OperationsMovefileParams) (*OperationsMovefileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsMovefileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsMovefile", + Method: "POST", + PathPattern: "/rclone/operations/movefile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsMovefileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsMovefileOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsMovefileDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +OperationsPurge purges container + +Remove a directory or container and all of its contents +*/ +func (a *Client) OperationsPurge(params *OperationsPurgeParams) (*OperationsPurgeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewOperationsPurgeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "OperationsPurge", + Method: "POST", + PathPattern: "/rclone/operations/purge", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &OperationsPurgeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*OperationsPurgeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*OperationsPurgeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SyncCopy copies directory + +Copy a directory from source remote to destination remote +*/ +func (a *Client) SyncCopy(params *SyncCopyParams) (*SyncCopyOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSyncCopyParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SyncCopy", + Method: "POST", + PathPattern: "/rclone/sync/copy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SyncCopyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SyncCopyOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SyncCopyDefault) + 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/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_parameters.go new file mode 100644 index 00000000000..940cb180d88 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsCopyfileParams creates a new OperationsCopyfileParams object +// with the default values initialized. +func NewOperationsCopyfileParams() *OperationsCopyfileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsCopyfileParams{ + Async: asyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsCopyfileParamsWithTimeout creates a new OperationsCopyfileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsCopyfileParamsWithTimeout(timeout time.Duration) *OperationsCopyfileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsCopyfileParams{ + Async: asyncDefault, + + timeout: timeout, + } +} + +// NewOperationsCopyfileParamsWithContext creates a new OperationsCopyfileParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsCopyfileParamsWithContext(ctx context.Context) *OperationsCopyfileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsCopyfileParams{ + Async: asyncDefault, + + Context: ctx, + } +} + +// NewOperationsCopyfileParamsWithHTTPClient creates a new OperationsCopyfileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsCopyfileParamsWithHTTPClient(client *http.Client) *OperationsCopyfileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsCopyfileParams{ + Async: asyncDefault, + HTTPClient: client, + } +} + +/*OperationsCopyfileParams contains all the parameters to send to the API endpoint +for the operations copyfile operation typically these are written to a http.Request +*/ +type OperationsCopyfileParams struct { + + /*Async + Async request + + */ + Async bool + /*Group + Place this operation under this stat group + + */ + Group string + /*Copyfile + copyfile + + */ + Copyfile *models.MoveOrCopyFileOptions + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations copyfile params +func (o *OperationsCopyfileParams) WithTimeout(timeout time.Duration) *OperationsCopyfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations copyfile params +func (o *OperationsCopyfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations copyfile params +func (o *OperationsCopyfileParams) WithContext(ctx context.Context) *OperationsCopyfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations copyfile params +func (o *OperationsCopyfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations copyfile params +func (o *OperationsCopyfileParams) WithHTTPClient(client *http.Client) *OperationsCopyfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations copyfile params +func (o *OperationsCopyfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAsync adds the async to the operations copyfile params +func (o *OperationsCopyfileParams) WithAsync(async bool) *OperationsCopyfileParams { + o.SetAsync(async) + return o +} + +// SetAsync adds the async to the operations copyfile params +func (o *OperationsCopyfileParams) SetAsync(async bool) { + o.Async = async +} + +// WithGroup adds the group to the operations copyfile params +func (o *OperationsCopyfileParams) WithGroup(group string) *OperationsCopyfileParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the operations copyfile params +func (o *OperationsCopyfileParams) SetGroup(group string) { + o.Group = group +} + +// WithCopyfile adds the copyfile to the operations copyfile params +func (o *OperationsCopyfileParams) WithCopyfile(copyfile *models.MoveOrCopyFileOptions) *OperationsCopyfileParams { + o.SetCopyfile(copyfile) + return o +} + +// SetCopyfile adds the copyfile to the operations copyfile params +func (o *OperationsCopyfileParams) SetCopyfile(copyfile *models.MoveOrCopyFileOptions) { + o.Copyfile = copyfile +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsCopyfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param _async + qrAsync := o.Async + qAsync := swag.FormatBool(qrAsync) + if qAsync != "" { + if err := r.SetQueryParam("_async", qAsync); err != nil { + return err + } + } + + // query param _group + qrGroup := o.Group + qGroup := qrGroup + if qGroup != "" { + if err := r.SetQueryParam("_group", qGroup); err != nil { + return err + } + } + + if o.Copyfile != nil { + if err := r.SetBodyParam(o.Copyfile); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_responses.go new file mode 100644 index 00000000000..752e7130170 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_copyfile_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsCopyfileReader is a Reader for the OperationsCopyfile structure. +type OperationsCopyfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsCopyfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsCopyfileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsCopyfileDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsCopyfileOK creates a OperationsCopyfileOK with default headers values +func NewOperationsCopyfileOK() *OperationsCopyfileOK { + return &OperationsCopyfileOK{} +} + +/*OperationsCopyfileOK handles this case with default header values. + +Job +*/ +type OperationsCopyfileOK struct { + Payload *models.Jobid + JobID int64 +} + +func (o *OperationsCopyfileOK) GetPayload() *models.Jobid { + return o.Payload +} + +func (o *OperationsCopyfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Jobid) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsCopyfileDefault creates a OperationsCopyfileDefault with default headers values +func NewOperationsCopyfileDefault(code int) *OperationsCopyfileDefault { + return &OperationsCopyfileDefault{ + _statusCode: code, + } +} + +/*OperationsCopyfileDefault handles this case with default header values. + +Server error +*/ +type OperationsCopyfileDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations copyfile default response +func (o *OperationsCopyfileDefault) Code() int { + return o._statusCode +} + +func (o *OperationsCopyfileDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsCopyfileDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsCopyfileDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_parameters.go new file mode 100644 index 00000000000..a6c70042ff5 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsDeletefileParams creates a new OperationsDeletefileParams object +// with the default values initialized. +func NewOperationsDeletefileParams() *OperationsDeletefileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsDeletefileParams{ + Async: asyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsDeletefileParamsWithTimeout creates a new OperationsDeletefileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsDeletefileParamsWithTimeout(timeout time.Duration) *OperationsDeletefileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsDeletefileParams{ + Async: asyncDefault, + + timeout: timeout, + } +} + +// NewOperationsDeletefileParamsWithContext creates a new OperationsDeletefileParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsDeletefileParamsWithContext(ctx context.Context) *OperationsDeletefileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsDeletefileParams{ + Async: asyncDefault, + + Context: ctx, + } +} + +// NewOperationsDeletefileParamsWithHTTPClient creates a new OperationsDeletefileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsDeletefileParamsWithHTTPClient(client *http.Client) *OperationsDeletefileParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsDeletefileParams{ + Async: asyncDefault, + HTTPClient: client, + } +} + +/*OperationsDeletefileParams contains all the parameters to send to the API endpoint +for the operations deletefile operation typically these are written to a http.Request +*/ +type OperationsDeletefileParams struct { + + /*Async + Async request + + */ + Async bool + /*Group + Place this operation under this stat group + + */ + Group string + /*Deletefile + deletefile + + */ + Deletefile *models.RemotePath + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations deletefile params +func (o *OperationsDeletefileParams) WithTimeout(timeout time.Duration) *OperationsDeletefileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations deletefile params +func (o *OperationsDeletefileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations deletefile params +func (o *OperationsDeletefileParams) WithContext(ctx context.Context) *OperationsDeletefileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations deletefile params +func (o *OperationsDeletefileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations deletefile params +func (o *OperationsDeletefileParams) WithHTTPClient(client *http.Client) *OperationsDeletefileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations deletefile params +func (o *OperationsDeletefileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAsync adds the async to the operations deletefile params +func (o *OperationsDeletefileParams) WithAsync(async bool) *OperationsDeletefileParams { + o.SetAsync(async) + return o +} + +// SetAsync adds the async to the operations deletefile params +func (o *OperationsDeletefileParams) SetAsync(async bool) { + o.Async = async +} + +// WithGroup adds the group to the operations deletefile params +func (o *OperationsDeletefileParams) WithGroup(group string) *OperationsDeletefileParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the operations deletefile params +func (o *OperationsDeletefileParams) SetGroup(group string) { + o.Group = group +} + +// WithDeletefile adds the deletefile to the operations deletefile params +func (o *OperationsDeletefileParams) WithDeletefile(deletefile *models.RemotePath) *OperationsDeletefileParams { + o.SetDeletefile(deletefile) + return o +} + +// SetDeletefile adds the deletefile to the operations deletefile params +func (o *OperationsDeletefileParams) SetDeletefile(deletefile *models.RemotePath) { + o.Deletefile = deletefile +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsDeletefileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param _async + qrAsync := o.Async + qAsync := swag.FormatBool(qrAsync) + if qAsync != "" { + if err := r.SetQueryParam("_async", qAsync); err != nil { + return err + } + } + + // query param _group + qrGroup := o.Group + qGroup := qrGroup + if qGroup != "" { + if err := r.SetQueryParam("_group", qGroup); err != nil { + return err + } + } + + if o.Deletefile != nil { + if err := r.SetBodyParam(o.Deletefile); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_responses.go new file mode 100644 index 00000000000..5283893e375 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_deletefile_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsDeletefileReader is a Reader for the OperationsDeletefile structure. +type OperationsDeletefileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsDeletefileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsDeletefileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsDeletefileDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsDeletefileOK creates a OperationsDeletefileOK with default headers values +func NewOperationsDeletefileOK() *OperationsDeletefileOK { + return &OperationsDeletefileOK{} +} + +/*OperationsDeletefileOK handles this case with default header values. + +Job ID +*/ +type OperationsDeletefileOK struct { + Payload *models.Jobid + JobID int64 +} + +func (o *OperationsDeletefileOK) GetPayload() *models.Jobid { + return o.Payload +} + +func (o *OperationsDeletefileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Jobid) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsDeletefileDefault creates a OperationsDeletefileDefault with default headers values +func NewOperationsDeletefileDefault(code int) *OperationsDeletefileDefault { + return &OperationsDeletefileDefault{ + _statusCode: code, + } +} + +/*OperationsDeletefileDefault handles this case with default header values. + +Server error +*/ +type OperationsDeletefileDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations deletefile default response +func (o *OperationsDeletefileDefault) Code() int { + return o._statusCode +} + +func (o *OperationsDeletefileDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsDeletefileDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsDeletefileDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_list_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_list_parameters.go new file mode 100644 index 00000000000..6268a8ad815 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_list_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsListParams creates a new OperationsListParams object +// with the default values initialized. +func NewOperationsListParams() *OperationsListParams { + var () + return &OperationsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsListParamsWithTimeout creates a new OperationsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsListParamsWithTimeout(timeout time.Duration) *OperationsListParams { + var () + return &OperationsListParams{ + + timeout: timeout, + } +} + +// NewOperationsListParamsWithContext creates a new OperationsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsListParamsWithContext(ctx context.Context) *OperationsListParams { + var () + return &OperationsListParams{ + + Context: ctx, + } +} + +// NewOperationsListParamsWithHTTPClient creates a new OperationsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsListParamsWithHTTPClient(client *http.Client) *OperationsListParams { + var () + return &OperationsListParams{ + HTTPClient: client, + } +} + +/*OperationsListParams contains all the parameters to send to the API endpoint +for the operations list operation typically these are written to a http.Request +*/ +type OperationsListParams struct { + + /*ListOpts + listOpts + + */ + ListOpts *models.ListOptions + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations list params +func (o *OperationsListParams) WithTimeout(timeout time.Duration) *OperationsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations list params +func (o *OperationsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations list params +func (o *OperationsListParams) WithContext(ctx context.Context) *OperationsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations list params +func (o *OperationsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations list params +func (o *OperationsListParams) WithHTTPClient(client *http.Client) *OperationsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations list params +func (o *OperationsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithListOpts adds the listOpts to the operations list params +func (o *OperationsListParams) WithListOpts(listOpts *models.ListOptions) *OperationsListParams { + o.SetListOpts(listOpts) + return o +} + +// SetListOpts adds the listOpts to the operations list params +func (o *OperationsListParams) SetListOpts(listOpts *models.ListOptions) { + o.ListOpts = listOpts +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ListOpts != nil { + if err := r.SetBodyParam(o.ListOpts); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_list_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_list_responses.go new file mode 100644 index 00000000000..d0cabd9feaf --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_list_responses.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/swag" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsListReader is a Reader for the OperationsList structure. +type OperationsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsListDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsListOK creates a OperationsListOK with default headers values +func NewOperationsListOK() *OperationsListOK { + return &OperationsListOK{} +} + +/*OperationsListOK handles this case with default header values. + +List of items +*/ +type OperationsListOK struct { + Payload *OperationsListOKBody + JobID int64 +} + +func (o *OperationsListOK) GetPayload() *OperationsListOKBody { + return o.Payload +} + +func (o *OperationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(OperationsListOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsListDefault creates a OperationsListDefault with default headers values +func NewOperationsListDefault(code int) *OperationsListDefault { + return &OperationsListDefault{ + _statusCode: code, + } +} + +/*OperationsListDefault handles this case with default header values. + +Server error +*/ +type OperationsListDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations list default response +func (o *OperationsListDefault) Code() int { + return o._statusCode +} + +func (o *OperationsListDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsListDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsListDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} + +/*OperationsListOKBody operations list o k body +swagger:model OperationsListOKBody +*/ +type OperationsListOKBody struct { + + // list + List []*models.ListItem `json:"list"` +} + +// Validate validates this operations list o k body +func (o *OperationsListOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *OperationsListOKBody) validateList(formats strfmt.Registry) error { + + if swag.IsZero(o.List) { // not required + return nil + } + + for i := 0; i < len(o.List); i++ { + if swag.IsZero(o.List[i]) { // not required + continue + } + + if o.List[i] != nil { + if err := o.List[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operationsListOK" + "." + "list" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *OperationsListOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *OperationsListOKBody) UnmarshalBinary(b []byte) error { + var res OperationsListOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_parameters.go new file mode 100644 index 00000000000..e73bc0c5173 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_parameters.go @@ -0,0 +1,164 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsMovefileParams creates a new OperationsMovefileParams object +// with the default values initialized. +func NewOperationsMovefileParams() *OperationsMovefileParams { + var () + return &OperationsMovefileParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsMovefileParamsWithTimeout creates a new OperationsMovefileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsMovefileParamsWithTimeout(timeout time.Duration) *OperationsMovefileParams { + var () + return &OperationsMovefileParams{ + + timeout: timeout, + } +} + +// NewOperationsMovefileParamsWithContext creates a new OperationsMovefileParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsMovefileParamsWithContext(ctx context.Context) *OperationsMovefileParams { + var () + return &OperationsMovefileParams{ + + Context: ctx, + } +} + +// NewOperationsMovefileParamsWithHTTPClient creates a new OperationsMovefileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsMovefileParamsWithHTTPClient(client *http.Client) *OperationsMovefileParams { + var () + return &OperationsMovefileParams{ + HTTPClient: client, + } +} + +/*OperationsMovefileParams contains all the parameters to send to the API endpoint +for the operations movefile operation typically these are written to a http.Request +*/ +type OperationsMovefileParams struct { + + /*Group + Place this operation under this stat group + + */ + Group string + /*Copyfile + copyfile + + */ + Copyfile *models.MoveOrCopyFileOptions + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations movefile params +func (o *OperationsMovefileParams) WithTimeout(timeout time.Duration) *OperationsMovefileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations movefile params +func (o *OperationsMovefileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations movefile params +func (o *OperationsMovefileParams) WithContext(ctx context.Context) *OperationsMovefileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations movefile params +func (o *OperationsMovefileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations movefile params +func (o *OperationsMovefileParams) WithHTTPClient(client *http.Client) *OperationsMovefileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations movefile params +func (o *OperationsMovefileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGroup adds the group to the operations movefile params +func (o *OperationsMovefileParams) WithGroup(group string) *OperationsMovefileParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the operations movefile params +func (o *OperationsMovefileParams) SetGroup(group string) { + o.Group = group +} + +// WithCopyfile adds the copyfile to the operations movefile params +func (o *OperationsMovefileParams) WithCopyfile(copyfile *models.MoveOrCopyFileOptions) *OperationsMovefileParams { + o.SetCopyfile(copyfile) + return o +} + +// SetCopyfile adds the copyfile to the operations movefile params +func (o *OperationsMovefileParams) SetCopyfile(copyfile *models.MoveOrCopyFileOptions) { + o.Copyfile = copyfile +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsMovefileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param _group + qrGroup := o.Group + qGroup := qrGroup + if qGroup != "" { + if err := r.SetQueryParam("_group", qGroup); err != nil { + return err + } + } + + if o.Copyfile != nil { + if err := r.SetBodyParam(o.Copyfile); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_responses.go new file mode 100644 index 00000000000..add69b8ec36 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_movefile_responses.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsMovefileReader is a Reader for the OperationsMovefile structure. +type OperationsMovefileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsMovefileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsMovefileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsMovefileDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsMovefileOK creates a OperationsMovefileOK with default headers values +func NewOperationsMovefileOK() *OperationsMovefileOK { + return &OperationsMovefileOK{} +} + +/*OperationsMovefileOK handles this case with default header values. + +Empty object +*/ +type OperationsMovefileOK struct { + JobID int64 +} + +func (o *OperationsMovefileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsMovefileDefault creates a OperationsMovefileDefault with default headers values +func NewOperationsMovefileDefault(code int) *OperationsMovefileDefault { + return &OperationsMovefileDefault{ + _statusCode: code, + } +} + +/*OperationsMovefileDefault handles this case with default header values. + +Server error +*/ +type OperationsMovefileDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations movefile default response +func (o *OperationsMovefileDefault) Code() int { + return o._statusCode +} + +func (o *OperationsMovefileDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsMovefileDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsMovefileDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_purge_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/operations_purge_parameters.go new file mode 100644 index 00000000000..24c387b14b9 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_purge_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// NewOperationsPurgeParams creates a new OperationsPurgeParams object +// with the default values initialized. +func NewOperationsPurgeParams() *OperationsPurgeParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsPurgeParams{ + Async: asyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewOperationsPurgeParamsWithTimeout creates a new OperationsPurgeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewOperationsPurgeParamsWithTimeout(timeout time.Duration) *OperationsPurgeParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsPurgeParams{ + Async: asyncDefault, + + timeout: timeout, + } +} + +// NewOperationsPurgeParamsWithContext creates a new OperationsPurgeParams object +// with the default values initialized, and the ability to set a context for a request +func NewOperationsPurgeParamsWithContext(ctx context.Context) *OperationsPurgeParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsPurgeParams{ + Async: asyncDefault, + + Context: ctx, + } +} + +// NewOperationsPurgeParamsWithHTTPClient creates a new OperationsPurgeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewOperationsPurgeParamsWithHTTPClient(client *http.Client) *OperationsPurgeParams { + var ( + asyncDefault = bool(true) + ) + return &OperationsPurgeParams{ + Async: asyncDefault, + HTTPClient: client, + } +} + +/*OperationsPurgeParams contains all the parameters to send to the API endpoint +for the operations purge operation typically these are written to a http.Request +*/ +type OperationsPurgeParams struct { + + /*Async + Async request + + */ + Async bool + /*Group + Place this operation under this stat group + + */ + Group string + /*Purge + purge + + */ + Purge *models.RemotePath + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the operations purge params +func (o *OperationsPurgeParams) WithTimeout(timeout time.Duration) *OperationsPurgeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the operations purge params +func (o *OperationsPurgeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the operations purge params +func (o *OperationsPurgeParams) WithContext(ctx context.Context) *OperationsPurgeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the operations purge params +func (o *OperationsPurgeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the operations purge params +func (o *OperationsPurgeParams) WithHTTPClient(client *http.Client) *OperationsPurgeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the operations purge params +func (o *OperationsPurgeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAsync adds the async to the operations purge params +func (o *OperationsPurgeParams) WithAsync(async bool) *OperationsPurgeParams { + o.SetAsync(async) + return o +} + +// SetAsync adds the async to the operations purge params +func (o *OperationsPurgeParams) SetAsync(async bool) { + o.Async = async +} + +// WithGroup adds the group to the operations purge params +func (o *OperationsPurgeParams) WithGroup(group string) *OperationsPurgeParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the operations purge params +func (o *OperationsPurgeParams) SetGroup(group string) { + o.Group = group +} + +// WithPurge adds the purge to the operations purge params +func (o *OperationsPurgeParams) WithPurge(purge *models.RemotePath) *OperationsPurgeParams { + o.SetPurge(purge) + return o +} + +// SetPurge adds the purge to the operations purge params +func (o *OperationsPurgeParams) SetPurge(purge *models.RemotePath) { + o.Purge = purge +} + +// WriteToRequest writes these params to a swagger request +func (o *OperationsPurgeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param _async + qrAsync := o.Async + qAsync := swag.FormatBool(qrAsync) + if qAsync != "" { + if err := r.SetQueryParam("_async", qAsync); err != nil { + return err + } + } + + // query param _group + qrGroup := o.Group + qGroup := qrGroup + if qGroup != "" { + if err := r.SetQueryParam("_group", qGroup); err != nil { + return err + } + } + + if o.Purge != nil { + if err := r.SetBodyParam(o.Purge); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/operations_purge_responses.go b/pkg/scyllaclient/internal/agent/client/operations/operations_purge_responses.go new file mode 100644 index 00000000000..140fcf88f13 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/operations_purge_responses.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// OperationsPurgeReader is a Reader for the OperationsPurge structure. +type OperationsPurgeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *OperationsPurgeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewOperationsPurgeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewOperationsPurgeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewOperationsPurgeOK creates a OperationsPurgeOK with default headers values +func NewOperationsPurgeOK() *OperationsPurgeOK { + return &OperationsPurgeOK{} +} + +/*OperationsPurgeOK handles this case with default header values. + +Job ID +*/ +type OperationsPurgeOK struct { + Payload *models.Jobid + JobID int64 +} + +func (o *OperationsPurgeOK) GetPayload() *models.Jobid { + return o.Payload +} + +func (o *OperationsPurgeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Jobid) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewOperationsPurgeDefault creates a OperationsPurgeDefault with default headers values +func NewOperationsPurgeDefault(code int) *OperationsPurgeDefault { + return &OperationsPurgeDefault{ + _statusCode: code, + } +} + +/*OperationsPurgeDefault handles this case with default header values. + +Server error +*/ +type OperationsPurgeDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the operations purge default response +func (o *OperationsPurgeDefault) Code() int { + return o._statusCode +} + +func (o *OperationsPurgeDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *OperationsPurgeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *OperationsPurgeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/sync_copy_parameters.go b/pkg/scyllaclient/internal/agent/client/operations/sync_copy_parameters.go new file mode 100644 index 00000000000..9900cac048a --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/sync_copy_parameters.go @@ -0,0 +1,198 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSyncCopyParams creates a new SyncCopyParams object +// with the default values initialized. +func NewSyncCopyParams() *SyncCopyParams { + var ( + asyncDefault = bool(true) + ) + return &SyncCopyParams{ + Async: asyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewSyncCopyParamsWithTimeout creates a new SyncCopyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSyncCopyParamsWithTimeout(timeout time.Duration) *SyncCopyParams { + var ( + asyncDefault = bool(true) + ) + return &SyncCopyParams{ + Async: asyncDefault, + + timeout: timeout, + } +} + +// NewSyncCopyParamsWithContext creates a new SyncCopyParams object +// with the default values initialized, and the ability to set a context for a request +func NewSyncCopyParamsWithContext(ctx context.Context) *SyncCopyParams { + var ( + asyncDefault = bool(true) + ) + return &SyncCopyParams{ + Async: asyncDefault, + + Context: ctx, + } +} + +// NewSyncCopyParamsWithHTTPClient creates a new SyncCopyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSyncCopyParamsWithHTTPClient(client *http.Client) *SyncCopyParams { + var ( + asyncDefault = bool(true) + ) + return &SyncCopyParams{ + Async: asyncDefault, + HTTPClient: client, + } +} + +/*SyncCopyParams contains all the parameters to send to the API endpoint +for the sync copy operation typically these are written to a http.Request +*/ +type SyncCopyParams struct { + + /*Async + Async request + + */ + Async bool + /*Group + Place this operation under this stat group + + */ + Group string + /*Copydir + copydir + + */ + Copydir SyncCopyBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the sync copy params +func (o *SyncCopyParams) WithTimeout(timeout time.Duration) *SyncCopyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the sync copy params +func (o *SyncCopyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the sync copy params +func (o *SyncCopyParams) WithContext(ctx context.Context) *SyncCopyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the sync copy params +func (o *SyncCopyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the sync copy params +func (o *SyncCopyParams) WithHTTPClient(client *http.Client) *SyncCopyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the sync copy params +func (o *SyncCopyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAsync adds the async to the sync copy params +func (o *SyncCopyParams) WithAsync(async bool) *SyncCopyParams { + o.SetAsync(async) + return o +} + +// SetAsync adds the async to the sync copy params +func (o *SyncCopyParams) SetAsync(async bool) { + o.Async = async +} + +// WithGroup adds the group to the sync copy params +func (o *SyncCopyParams) WithGroup(group string) *SyncCopyParams { + o.SetGroup(group) + return o +} + +// SetGroup adds the group to the sync copy params +func (o *SyncCopyParams) SetGroup(group string) { + o.Group = group +} + +// WithCopydir adds the copydir to the sync copy params +func (o *SyncCopyParams) WithCopydir(copydir SyncCopyBody) *SyncCopyParams { + o.SetCopydir(copydir) + return o +} + +// SetCopydir adds the copydir to the sync copy params +func (o *SyncCopyParams) SetCopydir(copydir SyncCopyBody) { + o.Copydir = copydir +} + +// WriteToRequest writes these params to a swagger request +func (o *SyncCopyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param _async + qrAsync := o.Async + qAsync := swag.FormatBool(qrAsync) + if qAsync != "" { + if err := r.SetQueryParam("_async", qAsync); err != nil { + return err + } + } + + // query param _group + qrGroup := o.Group + qGroup := qrGroup + if qGroup != "" { + if err := r.SetQueryParam("_group", qGroup); err != nil { + return err + } + } + + if err := r.SetBodyParam(o.Copydir); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/agent/client/operations/sync_copy_responses.go b/pkg/scyllaclient/internal/agent/client/operations/sync_copy_responses.go new file mode 100644 index 00000000000..3420fea53eb --- /dev/null +++ b/pkg/scyllaclient/internal/agent/client/operations/sync_copy_responses.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + "strings" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/swag" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" +) + +// SyncCopyReader is a Reader for the SyncCopy structure. +type SyncCopyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SyncCopyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSyncCopyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSyncCopyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSyncCopyOK creates a SyncCopyOK with default headers values +func NewSyncCopyOK() *SyncCopyOK { + return &SyncCopyOK{} +} + +/*SyncCopyOK handles this case with default header values. + +Job ID +*/ +type SyncCopyOK struct { + Payload *models.Jobid + JobID int64 +} + +func (o *SyncCopyOK) GetPayload() *models.Jobid { + return o.Payload +} + +func (o *SyncCopyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Jobid) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +// NewSyncCopyDefault creates a SyncCopyDefault with default headers values +func NewSyncCopyDefault(code int) *SyncCopyDefault { + return &SyncCopyDefault{ + _statusCode: code, + } +} + +/*SyncCopyDefault handles this case with default header values. + +Server error +*/ +type SyncCopyDefault struct { + _statusCode int + + Payload *models.ErrorResponse + JobID int64 +} + +// Code gets the status code for the sync copy default response +func (o *SyncCopyDefault) Code() int { + return o._statusCode +} + +func (o *SyncCopyDefault) GetPayload() *models.ErrorResponse { + return o.Payload +} + +func (o *SyncCopyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + o.JobID = jobID + } + return nil +} + +func (o *SyncCopyDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} + +/*SyncCopyBody sync copy body +swagger:model SyncCopyBody +*/ +type SyncCopyBody struct { + + // A remote name string eg. drive: for the destination + DstFs string `json:"dstFs,omitempty"` + + // A remote name string eg. drive: for the source + SrcFs string `json:"srcFs,omitempty"` +} + +// Validate validates this sync copy body +func (o *SyncCopyBody) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *SyncCopyBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *SyncCopyBody) UnmarshalBinary(b []byte) error { + var res SyncCopyBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/bandwidth.go b/pkg/scyllaclient/internal/agent/models/bandwidth.go new file mode 100644 index 00000000000..4adbabbd123 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/bandwidth.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Bandwidth bandwidth rate +// +// Rate at witch to rate limit bandwidth +// swagger:model Bandwidth +type Bandwidth struct { + + // String representation of the bandwidth rate limit (eg. 100k, 1M, ...). + Rate string `json:"rate,omitempty"` +} + +// Validate validates this bandwidth +func (m *Bandwidth) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Bandwidth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Bandwidth) UnmarshalBinary(b []byte) error { + var res Bandwidth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/content.go b/pkg/scyllaclient/internal/agent/models/content.go new file mode 100644 index 00000000000..a6e7b24e329 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/content.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// Content content +// swagger:model Content +type Content struct { + + // File content + // Format: byte + Content strfmt.Base64 `json:"Content,omitempty"` +} + +// Validate validates this content +func (m *Content) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContent(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Content) validateContent(formats strfmt.Registry) error { + + if swag.IsZero(m.Content) { // not required + return nil + } + + // Format "byte" (base64 string) is already validated when unmarshalled + + return nil +} + +// MarshalBinary interface implementation +func (m *Content) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Content) UnmarshalBinary(b []byte) error { + var res Content + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/error_response.go b/pkg/scyllaclient/internal/agent/models/error_response.go new file mode 100644 index 00000000000..38b0b9be961 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/error_response.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// ErrorResponse error +// +// Details about error response +// swagger:model ErrorResponse +type ErrorResponse struct { + + // Map of request parameters + Input interface{} `json:"input,omitempty"` + + // Error description + Message string `json:"message,omitempty"` + + // Requested path + Path string `json:"path,omitempty"` + + // HTTP status code + Status int64 `json:"status,omitempty"` +} + +// Validate validates this error response +func (m *ErrorResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ErrorResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ErrorResponse) UnmarshalBinary(b []byte) error { + var res ErrorResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/file_system_details.go b/pkg/scyllaclient/internal/agent/models/file_system_details.go new file mode 100644 index 00000000000..ef4d2dce41e --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/file_system_details.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// FileSystemDetails file system details +// swagger:model FileSystemDetails +type FileSystemDetails struct { + + // Free space in bytes + Free int64 `json:"free,omitempty"` + + // Available space in bytes + Total int64 `json:"total,omitempty"` + + // Used space in bytes + Used int64 `json:"used,omitempty"` +} + +// Validate validates this file system details +func (m *FileSystemDetails) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *FileSystemDetails) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *FileSystemDetails) UnmarshalBinary(b []byte) error { + var res FileSystemDetails + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/group_list.go b/pkg/scyllaclient/internal/agent/models/group_list.go new file mode 100644 index 00000000000..e752abf7bdb --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/group_list.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// GroupList group list +// swagger:model GroupList +type GroupList struct { + + // groups + Groups []string `json:"groups"` +} + +// Validate validates this group list +func (m *GroupList) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *GroupList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *GroupList) UnmarshalBinary(b []byte) error { + var res GroupList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/job.go b/pkg/scyllaclient/internal/agent/models/job.go new file mode 100644 index 00000000000..46f70b228a3 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/job.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Job job +// +// Status information about the job +// swagger:model Job +type Job struct { + + // Time in seconds that the job ran for + Duration float64 `json:"duration,omitempty"` + + // Time the job finished (eg 2018-10-26T18:50:20.528746884+01:00) + // Format: date-time + EndTime strfmt.DateTime `json:"endTime,omitempty"` + + // Error from the job or empty string for no error + Error string `json:"error,omitempty"` + + // Job has finished execution + Finished bool `json:"finished,omitempty"` + + // ID of the job + ID int64 `json:"id,omitempty"` + + // Output of the job as would have been returned if called synchronously + Output interface{} `json:"output,omitempty"` + + // Time the job started (eg 2018-10-26T18:50:20.528746884+01:00) + // Format: date-time + StartTime strfmt.DateTime `json:"startTime,omitempty"` + + // True for success false otherwise + Success bool `json:"success,omitempty"` +} + +// Validate validates this job +func (m *Job) 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 *Job) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("endTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Job) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("startTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Job) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Job) UnmarshalBinary(b []byte) error { + var res Job + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/job_info.go b/pkg/scyllaclient/internal/agent/models/job_info.go new file mode 100644 index 00000000000..fb6148b8b2a --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/job_info.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// JobInfo job info +// swagger:model JobInfo +type JobInfo struct { + + // job + Job *Job `json:"job,omitempty"` + + // Core status + Stats *Stats `json:"stats,omitempty"` + + // Completed transfers + Transferred []*Transfer `json:"transferred"` +} + +// Validate validates this job info +func (m *JobInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateJob(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStats(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTransferred(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *JobInfo) validateJob(formats strfmt.Registry) error { + + if swag.IsZero(m.Job) { // not required + return nil + } + + if m.Job != nil { + if err := m.Job.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("job") + } + return err + } + } + + return nil +} + +func (m *JobInfo) 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") + } + return err + } + } + + return nil +} + +func (m *JobInfo) validateTransferred(formats strfmt.Registry) error { + + if swag.IsZero(m.Transferred) { // not required + return nil + } + + for i := 0; i < len(m.Transferred); i++ { + if swag.IsZero(m.Transferred[i]) { // not required + continue + } + + if m.Transferred[i] != nil { + if err := m.Transferred[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("transferred" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *JobInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobInfo) UnmarshalBinary(b []byte) error { + var res JobInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/job_info_params.go b/pkg/scyllaclient/internal/agent/models/job_info_params.go new file mode 100644 index 00000000000..81941983f5d --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/job_info_params.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// JobInfoParams job info params +// swagger:model JobInfoParams +type JobInfoParams struct { + + // ID of the job + Jobid int64 `json:"jobid,omitempty"` + + // Duration in seconds + Wait int64 `json:"wait,omitempty"` +} + +// Validate validates this job info params +func (m *JobInfoParams) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JobInfoParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JobInfoParams) UnmarshalBinary(b []byte) error { + var res JobInfoParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/jobid.go b/pkg/scyllaclient/internal/agent/models/jobid.go new file mode 100644 index 00000000000..54034ab078c --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/jobid.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Jobid jobid +// swagger:model Jobid +type Jobid struct { + + // ID of the job + Jobid int64 `json:"jobid,omitempty"` +} + +// Validate validates this jobid +func (m *Jobid) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Jobid) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Jobid) UnmarshalBinary(b []byte) error { + var res Jobid + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/list_item.go b/pkg/scyllaclient/internal/agent/models/list_item.go new file mode 100644 index 00000000000..3bf2f06dbeb --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/list_item.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ListItem list item +// swagger:model ListItem +type ListItem struct { + + // Encrypted name + Encrypted string `json:"Encrypted,omitempty"` + + // Hash of the item + Hashes interface{} `json:"Hashes,omitempty"` + + // ID of the item + ID string `json:"ID,omitempty"` + + // true if item is directory + IsDir bool `json:"IsDir,omitempty"` + + // mime type of the item + MimeType string `json:"MimeType,omitempty"` + + // Modification time + // Format: date-time + ModTime strfmt.DateTime `json:"ModTime,omitempty"` + + // Name of the item + Name string `json:"Name,omitempty"` + + // Original ID of the item + OrigID string `json:"OrigID,omitempty"` + + // Path of the item + Path string `json:"Path,omitempty"` + + // Size in bytes + Size int64 `json:"Size,omitempty"` +} + +// Validate validates this list item +func (m *ListItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateModTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListItem) validateModTime(formats strfmt.Registry) error { + + if swag.IsZero(m.ModTime) { // not required + return nil + } + + if err := validate.FormatOf("ModTime", "body", "date-time", m.ModTime.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ListItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListItem) UnmarshalBinary(b []byte) error { + var res ListItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/list_options.go b/pkg/scyllaclient/internal/agent/models/list_options.go new file mode 100644 index 00000000000..dc9795eb96f --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/list_options.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ListOptions list options +// swagger:model ListOptions +type ListOptions struct { + + // A remote name string eg. drive: + // Required: true + Fs *string `json:"fs"` + + // opt + Opt *ListOptionsOpt `json:"opt,omitempty"` + + // A path within that remote eg. dir + // Required: true + Remote *string `json:"remote"` +} + +// Validate validates this list options +func (m *ListOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOpt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRemote(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ListOptions) validateFs(formats strfmt.Registry) error { + + if err := validate.Required("fs", "body", m.Fs); err != nil { + return err + } + + return nil +} + +func (m *ListOptions) validateOpt(formats strfmt.Registry) error { + + if swag.IsZero(m.Opt) { // not required + return nil + } + + if m.Opt != nil { + if err := m.Opt.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("opt") + } + return err + } + } + + return nil +} + +func (m *ListOptions) validateRemote(formats strfmt.Registry) error { + + if err := validate.Required("remote", "body", m.Remote); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ListOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListOptions) UnmarshalBinary(b []byte) error { + var res ListOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// ListOptionsOpt A path within that remote eg. dir +// swagger:model ListOptionsOpt +type ListOptionsOpt struct { + + // Show only directories in the listing + DirsOnly bool `json:"dirsOnly,omitempty"` + + // Show only files in the listing + FilesOnly bool `json:"filesOnly,omitempty"` + + // Don't read the modification time (can speed things up) + NoModTime bool `json:"noModTime,omitempty"` + + // Recurse into the listing + Recurse bool `json:"recurse,omitempty"` + + // Show the encrypted names + ShowEncrypted bool `json:"showEncrypted,omitempty"` + + // Include hashes in the output (may take longer) + ShowHash bool `json:"showHash,omitempty"` + + // Show the ID of the underlying Object + ShowOrigIDs bool `json:"showOrigIDs,omitempty"` +} + +// Validate validates this list options opt +func (m *ListOptionsOpt) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ListOptionsOpt) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ListOptionsOpt) UnmarshalBinary(b []byte) error { + var res ListOptionsOpt + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/move_or_copy_file_options.go b/pkg/scyllaclient/internal/agent/models/move_or_copy_file_options.go new file mode 100644 index 00000000000..a9134e119fc --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/move_or_copy_file_options.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// MoveOrCopyFileOptions move or copy file options +// swagger:model MoveOrCopyFileOptions +type MoveOrCopyFileOptions struct { + + // A remote name string eg. drive: for the destination + DstFs string `json:"dstFs,omitempty"` + + // A path within that remote eg. file.txt for the destination + DstRemote string `json:"dstRemote,omitempty"` + + // A remote name string eg. drive: for the source + SrcFs string `json:"srcFs,omitempty"` + + // A path within that remote eg. file.txt for the source + SrcRemote string `json:"srcRemote,omitempty"` +} + +// Validate validates this move or copy file options +func (m *MoveOrCopyFileOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MoveOrCopyFileOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MoveOrCopyFileOptions) UnmarshalBinary(b []byte) error { + var res MoveOrCopyFileOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/node_info.go b/pkg/scyllaclient/internal/agent/models/node_info.go new file mode 100644 index 00000000000..442c50e68d0 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/node_info.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// NodeInfo node info +// +// Information about Scylla node. +// swagger:model NodeInfo +type NodeInfo struct { + + // Address for REST API requests. + APIAddress string `json:"api_address,omitempty"` + + // Port for REST API server. + APIPort string `json:"api_port,omitempty"` + + // Address that is broadcasted to tell other Scylla nodes to connect to. Related to listen_address. + BroadcastAddress string `json:"broadcast_address,omitempty"` + + // Address that is broadcasted to tell the clients to connect to. + BroadcastRPCAddress string `json:"broadcast_rpc_address,omitempty"` + + // Address Scylla listens for connections from other nodes. + ListenAddress string `json:"listen_address,omitempty"` + + // Port for the CQL native transport to listen for clients on. + NativeTransportPort string `json:"native_transport_port,omitempty"` + + // Address for Prometheus queries. + PrometheusAddress string `json:"prometheus_address,omitempty"` + + // Port for Prometheus server. + PrometheusPort string `json:"prometheus_port,omitempty"` + + // Address on which Scylla is going to expect Thrift and CQL clients connections. + RPCAddress string `json:"rpc_address,omitempty"` + + // Port for Thrift to listen for clients on. + RPCPort string `json:"rpc_port,omitempty"` +} + +// Validate validates this node info +func (m *NodeInfo) Validate(formats strfmt.Registry) error { + 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/pkg/scyllaclient/internal/agent/models/remote.go b/pkg/scyllaclient/internal/agent/models/remote.go new file mode 100644 index 00000000000..122d598ddd0 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/remote.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Remote remote +// swagger:model Remote +type Remote struct { + + // Name of the remote + Name string `json:"name,omitempty"` + + // Additional parameters for the remote + Parameters interface{} `json:"parameters,omitempty"` + + // Type of the new remote + Type string `json:"type,omitempty"` +} + +// Validate validates this remote +func (m *Remote) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Remote) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Remote) UnmarshalBinary(b []byte) error { + var res Remote + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/remote_path.go b/pkg/scyllaclient/internal/agent/models/remote_path.go new file mode 100644 index 00000000000..aae0bfbfa8b --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/remote_path.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// RemotePath remote path +// swagger:model RemotePath +type RemotePath struct { + + // A remote name string eg. drive: + Fs string `json:"fs,omitempty"` + + // A path within that remote eg. dir + Remote string `json:"remote,omitempty"` +} + +// Validate validates this remote path +func (m *RemotePath) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RemotePath) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RemotePath) UnmarshalBinary(b []byte) error { + var res RemotePath + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/stats.go b/pkg/scyllaclient/internal/agent/models/stats.go new file mode 100644 index 00000000000..849c8fc9106 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/stats.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// Stats stats +// swagger:model Stats +type Stats struct { + + // total transferred bytes since the start of the process + Bytes int64 `json:"bytes,omitempty"` + + // an array of names of currently active file checks + Checking []string `json:"checking"` + + // number of checked files + Checks int64 `json:"checks,omitempty"` + + // number of deleted files + Deletes int64 `json:"deletes,omitempty"` + + // time in seconds since the start of the process + ElapsedTime float64 `json:"elapsedTime,omitempty"` + + // number of errors + Errors int64 `json:"errors,omitempty"` + + // whether there has been at least one FatalError + FatalError bool `json:"fatalError,omitempty"` + + // last occurred error + LastError string `json:"lastError,omitempty"` + + // whether there has been at least one non-NoRetryError + RetryError bool `json:"retryError,omitempty"` + + // average speed in bytes/sec since start of the process + Speed float64 `json:"speed,omitempty"` + + // an array of currently active file transfers + Transferring []*StatsTransferringItems0 `json:"transferring"` + + // number of transferred files + Transfers int64 `json:"transfers,omitempty"` +} + +// Validate validates this stats +func (m *Stats) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTransferring(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Stats) validateTransferring(formats strfmt.Registry) error { + + if swag.IsZero(m.Transferring) { // not required + return nil + } + + for i := 0; i < len(m.Transferring); i++ { + if swag.IsZero(m.Transferring[i]) { // not required + continue + } + + if m.Transferring[i] != nil { + if err := m.Transferring[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("transferring" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Stats) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Stats) UnmarshalBinary(b []byte) error { + var res Stats + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// StatsTransferringItems0 stats transferring items0 +// swagger:model StatsTransferringItems0 +type StatsTransferringItems0 struct { + + // total transferred bytes for this file + Bytes int64 `json:"bytes,omitempty"` + + // estimated time in seconds until file transfer completion + Eta float64 `json:"eta,omitempty"` + + // name of the file + Name string `json:"name,omitempty"` + + // progress of the file transfer in percent + Percentage float64 `json:"percentage,omitempty"` + + // size of the file in bytes + Size int64 `json:"size,omitempty"` + + // speed in bytes/sec + Speed float64 `json:"speed,omitempty"` + + // speed in bytes/sec as an exponentially weighted moving average + SpeedAvg float64 `json:"speedAvg,omitempty"` +} + +// Validate validates this stats transferring items0 +func (m *StatsTransferringItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StatsTransferringItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StatsTransferringItems0) UnmarshalBinary(b []byte) error { + var res StatsTransferringItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/stats_params.go b/pkg/scyllaclient/internal/agent/models/stats_params.go new file mode 100644 index 00000000000..9962878ec43 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/stats_params.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// StatsParams stats params +// swagger:model StatsParams +type StatsParams struct { + + // group name + Group string `json:"group,omitempty"` +} + +// Validate validates this stats params +func (m *StatsParams) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StatsParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StatsParams) UnmarshalBinary(b []byte) error { + var res StatsParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/models/transfer.go b/pkg/scyllaclient/internal/agent/models/transfer.go new file mode 100644 index 00000000000..084f87facfa --- /dev/null +++ b/pkg/scyllaclient/internal/agent/models/transfer.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// Transfer transfer +// swagger:model Transfer +type Transfer struct { + + // total transferred bytes for this file + Bytes int64 `json:"bytes,omitempty"` + + // if the transfer is only checked (skipped, deleted) + Checked bool `json:"checked,omitempty"` + + // time at which transfer completed + // Format: date-time + CompletedAt strfmt.DateTime `json:"completed_at,omitempty"` + + // string description of the error (empty if successful) + Error string `json:"error,omitempty"` + + // name of the file + Name string `json:"name,omitempty"` + + // size of the file in bytes + Size int64 `json:"size,omitempty"` + + // time at which transfer started + // Format: date-time + StartedAt strfmt.DateTime `json:"started_at,omitempty"` +} + +// Validate validates this transfer +func (m *Transfer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCompletedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *Transfer) validateCompletedAt(formats strfmt.Registry) error { + + if swag.IsZero(m.CompletedAt) { // not required + return nil + } + + if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *Transfer) validateStartedAt(formats strfmt.Registry) error { + + if swag.IsZero(m.StartedAt) { // not required + return nil + } + + if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Transfer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Transfer) UnmarshalBinary(b []byte) error { + var res Transfer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/agent/templates/client/client.gotmpl b/pkg/scyllaclient/internal/agent/templates/client/client.gotmpl new file mode 100644 index 00000000000..33959c9e2b5 --- /dev/null +++ b/pkg/scyllaclient/internal/agent/templates/client/client.gotmpl @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Name }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/runtime" + "github.com/go-openapi/validate" + + strfmt "github.com/go-openapi/strfmt" + + {{ range .DefaultImports }}{{ printf "%q" .}} + {{ end }} + {{ range $key, $value := .Imports }}{{ $key }} {{ printf "%q" $value }} + {{ end }} +) + +// New creates a new {{ humanize .Name }} API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client {{ if .Summary }}{{ .Summary }}{{ if .Description }} + +{{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}for {{ humanize .Name }} API{{ end }} +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +{{ range .Operations }} +/* +{{ pascalize .Name }} {{ if .Summary }}{{ pluralizeFirstWord (humanize .Summary) }}{{ if .Description }} + +{{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}{{ humanize .Name }} API{{ end }} +*/ +func (a *Client) {{ pascalize .Name }}(params *{{ pascalize .Name }}Params{{ if .Authorized }}, authInfo runtime.ClientAuthInfoWriter{{end}}{{ if .HasStreamingResponse }}, writer io.Writer{{ end }}) {{ if .SuccessResponse }}({{ range .SuccessResponses }}*{{ pascalize .Name }}, {{ end }}{{ end }}error{{ if .SuccessResponse }}){{ end }} { + // TODO: Validate the params before sending + if params == nil { + params = New{{ pascalize .Name }}Params() + } + {{ $length := len .SuccessResponses }} + {{ if .SuccessResponse }}result{{else}}_{{ end }}, err := a.transport.Submit(&runtime.ClientOperation{ + ID: {{ printf "%q" .Name }}, + Method: {{ printf "%q" .Method }}, + PathPattern: {{ printf "%q" .Path }}, + ProducesMediaTypes: {{ printf "%#v" .ProducesMediaTypes }}, + ConsumesMediaTypes: {{ printf "%#v" .ConsumesMediaTypes }}, + Schemes: {{ printf "%#v" .Schemes }}, + Params: params, + Reader: &{{ pascalize .Name }}Reader{formats: a.formats{{ if .HasStreamingResponse }}, writer: writer{{ end }}},{{ if .Authorized }} + AuthInfo: authInfo,{{ end}} + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return {{ if .SuccessResponse }}{{ padSurround "nil" "nil" 0 $length }}, {{ end }}err + } + {{- if .SuccessResponse }} + {{- if eq $length 1 }} + success, ok := result.(*{{ pascalize .SuccessResponse.Name }}) + if ok { + return success,nil + } + // unexpected success response + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ .Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- else }}{{/* several possible success responses */}} + switch value := result.(type) { + {{- range $i, $v := .SuccessResponses }} + case *{{ pascalize $v.Name }}: + return {{ padSurround "value" "nil" $i $length }}, nil + {{- end }} + } + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + // unexpected success response + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return {{ padSurround "nil" "nil" 0 $length }}, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ $.Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- end }} + {{- else }} + return nil + {{- end }} +} +{{- end }} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/pkg/scyllaclient/internal/agent/templates/client/response.gotmpl b/pkg/scyllaclient/internal/agent/templates/client/response.gotmpl new file mode 100644 index 00000000000..74831b5726d --- /dev/null +++ b/pkg/scyllaclient/internal/agent/templates/client/response.gotmpl @@ -0,0 +1,175 @@ +{{ define "errorimpl" }} func ({{ .ReceiverName }} *{{ pascalize .Name }}) Error() string { + return fmt.Sprintf("agent [HTTP %d]{{ if .Schema }} %s{{ end }}", {{ if eq .Code -1 }}{{ .ReceiverName }}._statusCode{{ else }}{{ .Code }}{{ end }}{{ if .Schema }}, strings.TrimRight(o.Payload.Message, "."){{ end }}) +} {{ end }} + +{{ define "clientresponse" }}// New{{ pascalize .Name }} creates a {{ pascalize .Name }} with default headers values +func New{{ pascalize .Name }}({{ if eq .Code -1 }}code int{{ end }}{{ if .Schema }}{{ if and (eq .Code -1) .Schema.IsStream }}, {{end}}{{ if .Schema.IsStream }}writer io.Writer{{ end }}{{ end }}) *{{ pascalize .Name }} { + return &{{ pascalize .Name }}{ + {{ if eq .Code -1 }}_statusCode: code, + {{ end }}{{ range .Headers }}{{ if .HasDefault }}{{ pascalize .Name }}: {{ printf "%#v" .Default }}, + {{ end }}{{ end }}{{ if .Schema }}{{ if .Schema.IsStream }}Payload: writer, + {{ end }}{{ end }}} +} + +/*{{ pascalize .Name}} handles this case with default header values. + +{{ if .Description }}{{ blockcomment .Description }}{{else}}{{ pascalize .Name }} {{ humanize .Name }}{{end}} +*/ +type {{ pascalize .Name }} struct { + {{ if eq .Code -1 }} + _statusCode int + + {{ end }}{{ range .Headers }}{{ if .Description }}/*{{ blockcomment .Description }} + */{{ end }} + {{ pascalize .Name }} {{ .GoType }} + {{ end }} + {{ if .Schema }} + Payload {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} + {{- end }} + JobID int64 +}{{ if eq .Code -1 }} + +// Code gets the status code for the {{ humanize .Name }} response +func ({{ .ReceiverName }} *{{ pascalize .Name }}) Code() int { + return {{ .ReceiverName }}._statusCode +} +{{ end }} + +{{ if .Schema }} +func ({{ .ReceiverName }} *{{ pascalize .Name }}) GetPayload() {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} { + return o.Payload +} +{{ end }} + +func ({{ .ReceiverName }} *{{ pascalize .Name }}) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + {{ range .Headers }} + // response header {{.Name}} + {{if .Converter }}{{ camelize .Name }}, err := {{ .Converter }}(response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = {{ camelize .Name }} + {{ else if .IsCustomFormatter }} + {{ camelize .Name }}, err := formats.Parse({{ printf "%q" .SwaggerFormat }}, response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = *({{ camelize .Name }}.(*{{ .GoType }})) + {{ else}}{{ .ReceiverName }}.{{ pascalize .Name }} = response.GetHeader("{{ .Name }}") + {{end}} + {{ end }} + {{ if .Schema }} + {{ if .Schema.IsBaseType }} + // response payload as interface type + payload, err := {{ toPackageName .ModelsPackage }}.Unmarshal{{ stripPackage .Schema.GoType ( toPackageName .ModelsPackage ) }}{{ if .Schema.IsArray}}Slice{{ end }}(response.Body(), consumer) + if err != nil { + return err + } + {{ .ReceiverName }}.Payload = payload + {{ else if .Schema.IsComplexObject }} + {{ .ReceiverName }}.Payload = new({{ .Schema.GoType }}) + {{ end }}{{ if not .Schema.IsBaseType }} + // response payload + if err := consumer.Consume(response.Body(), {{ if not (or .Schema.IsComplexObject .Schema.IsStream) }}&{{ end}}{{ .ReceiverName }}.Payload); err != nil && err != io.EOF { + return err + } + {{ end }}{{ end }} + if jobIDHeader := response.GetHeader("x-rclone-jobid"); jobIDHeader != "" { + jobID, err := strconv.ParseInt(jobIDHeader, 10, 64) + if err != nil { + return err + } + + {{ .ReceiverName }}.JobID = jobID + } + return nil +} +{{ end }}// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Package }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + + +import ( + "io" + "net/http" + "strings" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + "github.com/go-openapi/runtime" + "github.com/go-openapi/errors" + + strfmt "github.com/go-openapi/strfmt" + + {{ range .DefaultImports }}{{ printf "%q" .}} + {{ end }} + {{ range $key, $value := .Imports }}{{ $key }} {{ printf "%q" $value }} + {{ end }} +) + +// {{ pascalize .Name }}Reader is a Reader for the {{ pascalize .Name }} structure. +type {{ pascalize .Name }}Reader struct { + formats strfmt.Registry{{ if .HasStreamingResponse }} + writer io.Writer{{ end }} +} + +// ReadResponse reads a server response into the received {{ .ReceiverName }}. +func ({{ .ReceiverName }} *{{ pascalize .Name }}Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + {{- if .Responses}} + switch response.Code() { + {{- end }} + {{- range .Responses }} + case {{ .Code }}: + result := New{{ pascalize .Name }}({{ if .Schema }}{{ if .Schema.IsStream }}{{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + return {{ if .IsSuccess }}result, nil{{else}}nil, result{{end}} + {{- end }} + {{- if .DefaultResponse }} + {{- with .DefaultResponse }} + {{- if $.Responses}} + default: + {{- end }} + result := New{{ pascalize .Name }}(response.Code(){{ if .Schema }}{{ if .Schema.IsStream }}, {{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + if response.Code() / 100 == 2 { + return result, nil + } + return nil, result + {{- end }} + {{- else }} + {{ if $.Responses}} + default: + {{- end }} + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + {{- end }} + {{- if .Responses}} + } + {{- end }} +} + +{{ range .Responses }} +{{ template "clientresponse" . }} +{{ end }} +{{ if .DefaultResponse }} +{{ template "clientresponse" .DefaultResponse }} +{{ template "errorimpl" .DefaultResponse }} +{{ end }} + +{{ range .ExtraSchemas }} +/*{{ pascalize .Name }} {{ template "docstring" . }} +swagger:model {{ .Name }} +*/ +{{ template "schema" . }} +{{ end }} \ No newline at end of file diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_parameters.go new file mode 100644 index 00000000000..54b48e688b1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceCounterCacheCapacityPostParams creates a new CacheServiceCounterCacheCapacityPostParams object +// with the default values initialized. +func NewCacheServiceCounterCacheCapacityPostParams() *CacheServiceCounterCacheCapacityPostParams { + var () + return &CacheServiceCounterCacheCapacityPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceCounterCacheCapacityPostParamsWithTimeout creates a new CacheServiceCounterCacheCapacityPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceCounterCacheCapacityPostParamsWithTimeout(timeout time.Duration) *CacheServiceCounterCacheCapacityPostParams { + var () + return &CacheServiceCounterCacheCapacityPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceCounterCacheCapacityPostParamsWithContext creates a new CacheServiceCounterCacheCapacityPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceCounterCacheCapacityPostParamsWithContext(ctx context.Context) *CacheServiceCounterCacheCapacityPostParams { + var () + return &CacheServiceCounterCacheCapacityPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceCounterCacheCapacityPostParamsWithHTTPClient creates a new CacheServiceCounterCacheCapacityPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceCounterCacheCapacityPostParamsWithHTTPClient(client *http.Client) *CacheServiceCounterCacheCapacityPostParams { + var () + return &CacheServiceCounterCacheCapacityPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceCounterCacheCapacityPostParams contains all the parameters to send to the API endpoint +for the cache service counter cache capacity post operation typically these are written to a http.Request +*/ +type CacheServiceCounterCacheCapacityPostParams struct { + + /*Capacity + counter cache capacity in mb + + */ + Capacity string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) WithTimeout(timeout time.Duration) *CacheServiceCounterCacheCapacityPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) WithContext(ctx context.Context) *CacheServiceCounterCacheCapacityPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) WithHTTPClient(client *http.Client) *CacheServiceCounterCacheCapacityPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCapacity adds the capacity to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) WithCapacity(capacity string) *CacheServiceCounterCacheCapacityPostParams { + o.SetCapacity(capacity) + return o +} + +// SetCapacity adds the capacity to the cache service counter cache capacity post params +func (o *CacheServiceCounterCacheCapacityPostParams) SetCapacity(capacity string) { + o.Capacity = capacity +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceCounterCacheCapacityPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param capacity + qrCapacity := o.Capacity + qCapacity := qrCapacity + if qCapacity != "" { + if err := r.SetQueryParam("capacity", qCapacity); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_responses.go new file mode 100644 index 00000000000..48e7df94b67 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_capacity_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceCounterCacheCapacityPostReader is a Reader for the CacheServiceCounterCacheCapacityPost structure. +type CacheServiceCounterCacheCapacityPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceCounterCacheCapacityPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceCounterCacheCapacityPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceCounterCacheCapacityPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceCounterCacheCapacityPostOK creates a CacheServiceCounterCacheCapacityPostOK with default headers values +func NewCacheServiceCounterCacheCapacityPostOK() *CacheServiceCounterCacheCapacityPostOK { + return &CacheServiceCounterCacheCapacityPostOK{} +} + +/*CacheServiceCounterCacheCapacityPostOK handles this case with default header values. + +CacheServiceCounterCacheCapacityPostOK cache service counter cache capacity post o k +*/ +type CacheServiceCounterCacheCapacityPostOK struct { +} + +func (o *CacheServiceCounterCacheCapacityPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceCounterCacheCapacityPostDefault creates a CacheServiceCounterCacheCapacityPostDefault with default headers values +func NewCacheServiceCounterCacheCapacityPostDefault(code int) *CacheServiceCounterCacheCapacityPostDefault { + return &CacheServiceCounterCacheCapacityPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceCounterCacheCapacityPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceCounterCacheCapacityPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service counter cache capacity post default response +func (o *CacheServiceCounterCacheCapacityPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceCounterCacheCapacityPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceCounterCacheCapacityPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceCounterCacheCapacityPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_parameters.go new file mode 100644 index 00000000000..6bc7421379e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceCounterCacheKeysToSaveGetParams creates a new CacheServiceCounterCacheKeysToSaveGetParams object +// with the default values initialized. +func NewCacheServiceCounterCacheKeysToSaveGetParams() *CacheServiceCounterCacheKeysToSaveGetParams { + + return &CacheServiceCounterCacheKeysToSaveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceCounterCacheKeysToSaveGetParamsWithTimeout creates a new CacheServiceCounterCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceCounterCacheKeysToSaveGetParamsWithTimeout(timeout time.Duration) *CacheServiceCounterCacheKeysToSaveGetParams { + + return &CacheServiceCounterCacheKeysToSaveGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceCounterCacheKeysToSaveGetParamsWithContext creates a new CacheServiceCounterCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceCounterCacheKeysToSaveGetParamsWithContext(ctx context.Context) *CacheServiceCounterCacheKeysToSaveGetParams { + + return &CacheServiceCounterCacheKeysToSaveGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceCounterCacheKeysToSaveGetParamsWithHTTPClient creates a new CacheServiceCounterCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceCounterCacheKeysToSaveGetParamsWithHTTPClient(client *http.Client) *CacheServiceCounterCacheKeysToSaveGetParams { + + return &CacheServiceCounterCacheKeysToSaveGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceCounterCacheKeysToSaveGetParams contains all the parameters to send to the API endpoint +for the cache service counter cache keys to save get operation typically these are written to a http.Request +*/ +type CacheServiceCounterCacheKeysToSaveGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) WithTimeout(timeout time.Duration) *CacheServiceCounterCacheKeysToSaveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) WithContext(ctx context.Context) *CacheServiceCounterCacheKeysToSaveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) WithHTTPClient(client *http.Client) *CacheServiceCounterCacheKeysToSaveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service counter cache keys to save get params +func (o *CacheServiceCounterCacheKeysToSaveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceCounterCacheKeysToSaveGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_responses.go new file mode 100644 index 00000000000..60b2af8c340 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceCounterCacheKeysToSaveGetReader is a Reader for the CacheServiceCounterCacheKeysToSaveGet structure. +type CacheServiceCounterCacheKeysToSaveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceCounterCacheKeysToSaveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceCounterCacheKeysToSaveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceCounterCacheKeysToSaveGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceCounterCacheKeysToSaveGetOK creates a CacheServiceCounterCacheKeysToSaveGetOK with default headers values +func NewCacheServiceCounterCacheKeysToSaveGetOK() *CacheServiceCounterCacheKeysToSaveGetOK { + return &CacheServiceCounterCacheKeysToSaveGetOK{} +} + +/*CacheServiceCounterCacheKeysToSaveGetOK handles this case with default header values. + +CacheServiceCounterCacheKeysToSaveGetOK cache service counter cache keys to save get o k +*/ +type CacheServiceCounterCacheKeysToSaveGetOK struct { + Payload int32 +} + +func (o *CacheServiceCounterCacheKeysToSaveGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceCounterCacheKeysToSaveGetOK) 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 +} + +// NewCacheServiceCounterCacheKeysToSaveGetDefault creates a CacheServiceCounterCacheKeysToSaveGetDefault with default headers values +func NewCacheServiceCounterCacheKeysToSaveGetDefault(code int) *CacheServiceCounterCacheKeysToSaveGetDefault { + return &CacheServiceCounterCacheKeysToSaveGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceCounterCacheKeysToSaveGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceCounterCacheKeysToSaveGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service counter cache keys to save get default response +func (o *CacheServiceCounterCacheKeysToSaveGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceCounterCacheKeysToSaveGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceCounterCacheKeysToSaveGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceCounterCacheKeysToSaveGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_parameters.go new file mode 100644 index 00000000000..6f76670c03b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceCounterCacheKeysToSavePostParams creates a new CacheServiceCounterCacheKeysToSavePostParams object +// with the default values initialized. +func NewCacheServiceCounterCacheKeysToSavePostParams() *CacheServiceCounterCacheKeysToSavePostParams { + var () + return &CacheServiceCounterCacheKeysToSavePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceCounterCacheKeysToSavePostParamsWithTimeout creates a new CacheServiceCounterCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceCounterCacheKeysToSavePostParamsWithTimeout(timeout time.Duration) *CacheServiceCounterCacheKeysToSavePostParams { + var () + return &CacheServiceCounterCacheKeysToSavePostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceCounterCacheKeysToSavePostParamsWithContext creates a new CacheServiceCounterCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceCounterCacheKeysToSavePostParamsWithContext(ctx context.Context) *CacheServiceCounterCacheKeysToSavePostParams { + var () + return &CacheServiceCounterCacheKeysToSavePostParams{ + + Context: ctx, + } +} + +// NewCacheServiceCounterCacheKeysToSavePostParamsWithHTTPClient creates a new CacheServiceCounterCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceCounterCacheKeysToSavePostParamsWithHTTPClient(client *http.Client) *CacheServiceCounterCacheKeysToSavePostParams { + var () + return &CacheServiceCounterCacheKeysToSavePostParams{ + HTTPClient: client, + } +} + +/*CacheServiceCounterCacheKeysToSavePostParams contains all the parameters to send to the API endpoint +for the cache service counter cache keys to save post operation typically these are written to a http.Request +*/ +type CacheServiceCounterCacheKeysToSavePostParams struct { + + /*Cckts + counter cache keys to save + + */ + Cckts int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) WithTimeout(timeout time.Duration) *CacheServiceCounterCacheKeysToSavePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) WithContext(ctx context.Context) *CacheServiceCounterCacheKeysToSavePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) WithHTTPClient(client *http.Client) *CacheServiceCounterCacheKeysToSavePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCckts adds the cckts to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) WithCckts(cckts int32) *CacheServiceCounterCacheKeysToSavePostParams { + o.SetCckts(cckts) + return o +} + +// SetCckts adds the cckts to the cache service counter cache keys to save post params +func (o *CacheServiceCounterCacheKeysToSavePostParams) SetCckts(cckts int32) { + o.Cckts = cckts +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceCounterCacheKeysToSavePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cckts + qrCckts := o.Cckts + qCckts := swag.FormatInt32(qrCckts) + if qCckts != "" { + if err := r.SetQueryParam("cckts", qCckts); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_responses.go new file mode 100644 index 00000000000..21e5256008e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_keys_to_save_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceCounterCacheKeysToSavePostReader is a Reader for the CacheServiceCounterCacheKeysToSavePost structure. +type CacheServiceCounterCacheKeysToSavePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceCounterCacheKeysToSavePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceCounterCacheKeysToSavePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceCounterCacheKeysToSavePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceCounterCacheKeysToSavePostOK creates a CacheServiceCounterCacheKeysToSavePostOK with default headers values +func NewCacheServiceCounterCacheKeysToSavePostOK() *CacheServiceCounterCacheKeysToSavePostOK { + return &CacheServiceCounterCacheKeysToSavePostOK{} +} + +/*CacheServiceCounterCacheKeysToSavePostOK handles this case with default header values. + +CacheServiceCounterCacheKeysToSavePostOK cache service counter cache keys to save post o k +*/ +type CacheServiceCounterCacheKeysToSavePostOK struct { +} + +func (o *CacheServiceCounterCacheKeysToSavePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceCounterCacheKeysToSavePostDefault creates a CacheServiceCounterCacheKeysToSavePostDefault with default headers values +func NewCacheServiceCounterCacheKeysToSavePostDefault(code int) *CacheServiceCounterCacheKeysToSavePostDefault { + return &CacheServiceCounterCacheKeysToSavePostDefault{ + _statusCode: code, + } +} + +/*CacheServiceCounterCacheKeysToSavePostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceCounterCacheKeysToSavePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service counter cache keys to save post default response +func (o *CacheServiceCounterCacheKeysToSavePostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceCounterCacheKeysToSavePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceCounterCacheKeysToSavePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceCounterCacheKeysToSavePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_parameters.go new file mode 100644 index 00000000000..5395403db4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceCounterCacheSavePeriodGetParams creates a new CacheServiceCounterCacheSavePeriodGetParams object +// with the default values initialized. +func NewCacheServiceCounterCacheSavePeriodGetParams() *CacheServiceCounterCacheSavePeriodGetParams { + + return &CacheServiceCounterCacheSavePeriodGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceCounterCacheSavePeriodGetParamsWithTimeout creates a new CacheServiceCounterCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceCounterCacheSavePeriodGetParamsWithTimeout(timeout time.Duration) *CacheServiceCounterCacheSavePeriodGetParams { + + return &CacheServiceCounterCacheSavePeriodGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceCounterCacheSavePeriodGetParamsWithContext creates a new CacheServiceCounterCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceCounterCacheSavePeriodGetParamsWithContext(ctx context.Context) *CacheServiceCounterCacheSavePeriodGetParams { + + return &CacheServiceCounterCacheSavePeriodGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceCounterCacheSavePeriodGetParamsWithHTTPClient creates a new CacheServiceCounterCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceCounterCacheSavePeriodGetParamsWithHTTPClient(client *http.Client) *CacheServiceCounterCacheSavePeriodGetParams { + + return &CacheServiceCounterCacheSavePeriodGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceCounterCacheSavePeriodGetParams contains all the parameters to send to the API endpoint +for the cache service counter cache save period get operation typically these are written to a http.Request +*/ +type CacheServiceCounterCacheSavePeriodGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) WithTimeout(timeout time.Duration) *CacheServiceCounterCacheSavePeriodGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) WithContext(ctx context.Context) *CacheServiceCounterCacheSavePeriodGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) WithHTTPClient(client *http.Client) *CacheServiceCounterCacheSavePeriodGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service counter cache save period get params +func (o *CacheServiceCounterCacheSavePeriodGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceCounterCacheSavePeriodGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_responses.go new file mode 100644 index 00000000000..4e37a7c35a8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceCounterCacheSavePeriodGetReader is a Reader for the CacheServiceCounterCacheSavePeriodGet structure. +type CacheServiceCounterCacheSavePeriodGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceCounterCacheSavePeriodGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceCounterCacheSavePeriodGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceCounterCacheSavePeriodGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceCounterCacheSavePeriodGetOK creates a CacheServiceCounterCacheSavePeriodGetOK with default headers values +func NewCacheServiceCounterCacheSavePeriodGetOK() *CacheServiceCounterCacheSavePeriodGetOK { + return &CacheServiceCounterCacheSavePeriodGetOK{} +} + +/*CacheServiceCounterCacheSavePeriodGetOK handles this case with default header values. + +CacheServiceCounterCacheSavePeriodGetOK cache service counter cache save period get o k +*/ +type CacheServiceCounterCacheSavePeriodGetOK struct { + Payload int32 +} + +func (o *CacheServiceCounterCacheSavePeriodGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceCounterCacheSavePeriodGetOK) 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 +} + +// NewCacheServiceCounterCacheSavePeriodGetDefault creates a CacheServiceCounterCacheSavePeriodGetDefault with default headers values +func NewCacheServiceCounterCacheSavePeriodGetDefault(code int) *CacheServiceCounterCacheSavePeriodGetDefault { + return &CacheServiceCounterCacheSavePeriodGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceCounterCacheSavePeriodGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceCounterCacheSavePeriodGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service counter cache save period get default response +func (o *CacheServiceCounterCacheSavePeriodGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceCounterCacheSavePeriodGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceCounterCacheSavePeriodGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceCounterCacheSavePeriodGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_parameters.go new file mode 100644 index 00000000000..4c00c1a05b2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceCounterCacheSavePeriodPostParams creates a new CacheServiceCounterCacheSavePeriodPostParams object +// with the default values initialized. +func NewCacheServiceCounterCacheSavePeriodPostParams() *CacheServiceCounterCacheSavePeriodPostParams { + var () + return &CacheServiceCounterCacheSavePeriodPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceCounterCacheSavePeriodPostParamsWithTimeout creates a new CacheServiceCounterCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceCounterCacheSavePeriodPostParamsWithTimeout(timeout time.Duration) *CacheServiceCounterCacheSavePeriodPostParams { + var () + return &CacheServiceCounterCacheSavePeriodPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceCounterCacheSavePeriodPostParamsWithContext creates a new CacheServiceCounterCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceCounterCacheSavePeriodPostParamsWithContext(ctx context.Context) *CacheServiceCounterCacheSavePeriodPostParams { + var () + return &CacheServiceCounterCacheSavePeriodPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceCounterCacheSavePeriodPostParamsWithHTTPClient creates a new CacheServiceCounterCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceCounterCacheSavePeriodPostParamsWithHTTPClient(client *http.Client) *CacheServiceCounterCacheSavePeriodPostParams { + var () + return &CacheServiceCounterCacheSavePeriodPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceCounterCacheSavePeriodPostParams contains all the parameters to send to the API endpoint +for the cache service counter cache save period post operation typically these are written to a http.Request +*/ +type CacheServiceCounterCacheSavePeriodPostParams struct { + + /*Ccspis + counter cache save period in seconds + + */ + Ccspis int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) WithTimeout(timeout time.Duration) *CacheServiceCounterCacheSavePeriodPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) WithContext(ctx context.Context) *CacheServiceCounterCacheSavePeriodPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) WithHTTPClient(client *http.Client) *CacheServiceCounterCacheSavePeriodPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCcspis adds the ccspis to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) WithCcspis(ccspis int32) *CacheServiceCounterCacheSavePeriodPostParams { + o.SetCcspis(ccspis) + return o +} + +// SetCcspis adds the ccspis to the cache service counter cache save period post params +func (o *CacheServiceCounterCacheSavePeriodPostParams) SetCcspis(ccspis int32) { + o.Ccspis = ccspis +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceCounterCacheSavePeriodPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param ccspis + qrCcspis := o.Ccspis + qCcspis := swag.FormatInt32(qrCcspis) + if qCcspis != "" { + if err := r.SetQueryParam("ccspis", qCcspis); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_responses.go new file mode 100644 index 00000000000..8f14403ce38 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_counter_cache_save_period_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceCounterCacheSavePeriodPostReader is a Reader for the CacheServiceCounterCacheSavePeriodPost structure. +type CacheServiceCounterCacheSavePeriodPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceCounterCacheSavePeriodPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceCounterCacheSavePeriodPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceCounterCacheSavePeriodPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceCounterCacheSavePeriodPostOK creates a CacheServiceCounterCacheSavePeriodPostOK with default headers values +func NewCacheServiceCounterCacheSavePeriodPostOK() *CacheServiceCounterCacheSavePeriodPostOK { + return &CacheServiceCounterCacheSavePeriodPostOK{} +} + +/*CacheServiceCounterCacheSavePeriodPostOK handles this case with default header values. + +CacheServiceCounterCacheSavePeriodPostOK cache service counter cache save period post o k +*/ +type CacheServiceCounterCacheSavePeriodPostOK struct { +} + +func (o *CacheServiceCounterCacheSavePeriodPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceCounterCacheSavePeriodPostDefault creates a CacheServiceCounterCacheSavePeriodPostDefault with default headers values +func NewCacheServiceCounterCacheSavePeriodPostDefault(code int) *CacheServiceCounterCacheSavePeriodPostDefault { + return &CacheServiceCounterCacheSavePeriodPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceCounterCacheSavePeriodPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceCounterCacheSavePeriodPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service counter cache save period post default response +func (o *CacheServiceCounterCacheSavePeriodPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceCounterCacheSavePeriodPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceCounterCacheSavePeriodPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceCounterCacheSavePeriodPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_parameters.go new file mode 100644 index 00000000000..845542c96e2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceInvalidateCounterCachePostParams creates a new CacheServiceInvalidateCounterCachePostParams object +// with the default values initialized. +func NewCacheServiceInvalidateCounterCachePostParams() *CacheServiceInvalidateCounterCachePostParams { + + return &CacheServiceInvalidateCounterCachePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceInvalidateCounterCachePostParamsWithTimeout creates a new CacheServiceInvalidateCounterCachePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceInvalidateCounterCachePostParamsWithTimeout(timeout time.Duration) *CacheServiceInvalidateCounterCachePostParams { + + return &CacheServiceInvalidateCounterCachePostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceInvalidateCounterCachePostParamsWithContext creates a new CacheServiceInvalidateCounterCachePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceInvalidateCounterCachePostParamsWithContext(ctx context.Context) *CacheServiceInvalidateCounterCachePostParams { + + return &CacheServiceInvalidateCounterCachePostParams{ + + Context: ctx, + } +} + +// NewCacheServiceInvalidateCounterCachePostParamsWithHTTPClient creates a new CacheServiceInvalidateCounterCachePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceInvalidateCounterCachePostParamsWithHTTPClient(client *http.Client) *CacheServiceInvalidateCounterCachePostParams { + + return &CacheServiceInvalidateCounterCachePostParams{ + HTTPClient: client, + } +} + +/*CacheServiceInvalidateCounterCachePostParams contains all the parameters to send to the API endpoint +for the cache service invalidate counter cache post operation typically these are written to a http.Request +*/ +type CacheServiceInvalidateCounterCachePostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) WithTimeout(timeout time.Duration) *CacheServiceInvalidateCounterCachePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) WithContext(ctx context.Context) *CacheServiceInvalidateCounterCachePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) WithHTTPClient(client *http.Client) *CacheServiceInvalidateCounterCachePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service invalidate counter cache post params +func (o *CacheServiceInvalidateCounterCachePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceInvalidateCounterCachePostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_responses.go new file mode 100644 index 00000000000..b933b15dd85 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_counter_cache_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceInvalidateCounterCachePostReader is a Reader for the CacheServiceInvalidateCounterCachePost structure. +type CacheServiceInvalidateCounterCachePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceInvalidateCounterCachePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceInvalidateCounterCachePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceInvalidateCounterCachePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceInvalidateCounterCachePostOK creates a CacheServiceInvalidateCounterCachePostOK with default headers values +func NewCacheServiceInvalidateCounterCachePostOK() *CacheServiceInvalidateCounterCachePostOK { + return &CacheServiceInvalidateCounterCachePostOK{} +} + +/*CacheServiceInvalidateCounterCachePostOK handles this case with default header values. + +CacheServiceInvalidateCounterCachePostOK cache service invalidate counter cache post o k +*/ +type CacheServiceInvalidateCounterCachePostOK struct { +} + +func (o *CacheServiceInvalidateCounterCachePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceInvalidateCounterCachePostDefault creates a CacheServiceInvalidateCounterCachePostDefault with default headers values +func NewCacheServiceInvalidateCounterCachePostDefault(code int) *CacheServiceInvalidateCounterCachePostDefault { + return &CacheServiceInvalidateCounterCachePostDefault{ + _statusCode: code, + } +} + +/*CacheServiceInvalidateCounterCachePostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceInvalidateCounterCachePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service invalidate counter cache post default response +func (o *CacheServiceInvalidateCounterCachePostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceInvalidateCounterCachePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceInvalidateCounterCachePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceInvalidateCounterCachePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_parameters.go new file mode 100644 index 00000000000..d6b124e38c4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceInvalidateKeyCachePostParams creates a new CacheServiceInvalidateKeyCachePostParams object +// with the default values initialized. +func NewCacheServiceInvalidateKeyCachePostParams() *CacheServiceInvalidateKeyCachePostParams { + + return &CacheServiceInvalidateKeyCachePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceInvalidateKeyCachePostParamsWithTimeout creates a new CacheServiceInvalidateKeyCachePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceInvalidateKeyCachePostParamsWithTimeout(timeout time.Duration) *CacheServiceInvalidateKeyCachePostParams { + + return &CacheServiceInvalidateKeyCachePostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceInvalidateKeyCachePostParamsWithContext creates a new CacheServiceInvalidateKeyCachePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceInvalidateKeyCachePostParamsWithContext(ctx context.Context) *CacheServiceInvalidateKeyCachePostParams { + + return &CacheServiceInvalidateKeyCachePostParams{ + + Context: ctx, + } +} + +// NewCacheServiceInvalidateKeyCachePostParamsWithHTTPClient creates a new CacheServiceInvalidateKeyCachePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceInvalidateKeyCachePostParamsWithHTTPClient(client *http.Client) *CacheServiceInvalidateKeyCachePostParams { + + return &CacheServiceInvalidateKeyCachePostParams{ + HTTPClient: client, + } +} + +/*CacheServiceInvalidateKeyCachePostParams contains all the parameters to send to the API endpoint +for the cache service invalidate key cache post operation typically these are written to a http.Request +*/ +type CacheServiceInvalidateKeyCachePostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) WithTimeout(timeout time.Duration) *CacheServiceInvalidateKeyCachePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) WithContext(ctx context.Context) *CacheServiceInvalidateKeyCachePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) WithHTTPClient(client *http.Client) *CacheServiceInvalidateKeyCachePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service invalidate key cache post params +func (o *CacheServiceInvalidateKeyCachePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceInvalidateKeyCachePostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_responses.go new file mode 100644 index 00000000000..ddcb9265bbf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_invalidate_key_cache_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceInvalidateKeyCachePostReader is a Reader for the CacheServiceInvalidateKeyCachePost structure. +type CacheServiceInvalidateKeyCachePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceInvalidateKeyCachePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceInvalidateKeyCachePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceInvalidateKeyCachePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceInvalidateKeyCachePostOK creates a CacheServiceInvalidateKeyCachePostOK with default headers values +func NewCacheServiceInvalidateKeyCachePostOK() *CacheServiceInvalidateKeyCachePostOK { + return &CacheServiceInvalidateKeyCachePostOK{} +} + +/*CacheServiceInvalidateKeyCachePostOK handles this case with default header values. + +CacheServiceInvalidateKeyCachePostOK cache service invalidate key cache post o k +*/ +type CacheServiceInvalidateKeyCachePostOK struct { +} + +func (o *CacheServiceInvalidateKeyCachePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceInvalidateKeyCachePostDefault creates a CacheServiceInvalidateKeyCachePostDefault with default headers values +func NewCacheServiceInvalidateKeyCachePostDefault(code int) *CacheServiceInvalidateKeyCachePostDefault { + return &CacheServiceInvalidateKeyCachePostDefault{ + _statusCode: code, + } +} + +/*CacheServiceInvalidateKeyCachePostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceInvalidateKeyCachePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service invalidate key cache post default response +func (o *CacheServiceInvalidateKeyCachePostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceInvalidateKeyCachePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceInvalidateKeyCachePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceInvalidateKeyCachePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_parameters.go new file mode 100644 index 00000000000..a2ac09cda12 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceKeyCacheCapacityPostParams creates a new CacheServiceKeyCacheCapacityPostParams object +// with the default values initialized. +func NewCacheServiceKeyCacheCapacityPostParams() *CacheServiceKeyCacheCapacityPostParams { + var () + return &CacheServiceKeyCacheCapacityPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceKeyCacheCapacityPostParamsWithTimeout creates a new CacheServiceKeyCacheCapacityPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceKeyCacheCapacityPostParamsWithTimeout(timeout time.Duration) *CacheServiceKeyCacheCapacityPostParams { + var () + return &CacheServiceKeyCacheCapacityPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceKeyCacheCapacityPostParamsWithContext creates a new CacheServiceKeyCacheCapacityPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceKeyCacheCapacityPostParamsWithContext(ctx context.Context) *CacheServiceKeyCacheCapacityPostParams { + var () + return &CacheServiceKeyCacheCapacityPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceKeyCacheCapacityPostParamsWithHTTPClient creates a new CacheServiceKeyCacheCapacityPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceKeyCacheCapacityPostParamsWithHTTPClient(client *http.Client) *CacheServiceKeyCacheCapacityPostParams { + var () + return &CacheServiceKeyCacheCapacityPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceKeyCacheCapacityPostParams contains all the parameters to send to the API endpoint +for the cache service key cache capacity post operation typically these are written to a http.Request +*/ +type CacheServiceKeyCacheCapacityPostParams struct { + + /*Capacity + key cache capacity in mb + + */ + Capacity string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) WithTimeout(timeout time.Duration) *CacheServiceKeyCacheCapacityPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) WithContext(ctx context.Context) *CacheServiceKeyCacheCapacityPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) WithHTTPClient(client *http.Client) *CacheServiceKeyCacheCapacityPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCapacity adds the capacity to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) WithCapacity(capacity string) *CacheServiceKeyCacheCapacityPostParams { + o.SetCapacity(capacity) + return o +} + +// SetCapacity adds the capacity to the cache service key cache capacity post params +func (o *CacheServiceKeyCacheCapacityPostParams) SetCapacity(capacity string) { + o.Capacity = capacity +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceKeyCacheCapacityPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param capacity + qrCapacity := o.Capacity + qCapacity := qrCapacity + if qCapacity != "" { + if err := r.SetQueryParam("capacity", qCapacity); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_responses.go new file mode 100644 index 00000000000..31346e0a808 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_capacity_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceKeyCacheCapacityPostReader is a Reader for the CacheServiceKeyCacheCapacityPost structure. +type CacheServiceKeyCacheCapacityPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceKeyCacheCapacityPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceKeyCacheCapacityPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceKeyCacheCapacityPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceKeyCacheCapacityPostOK creates a CacheServiceKeyCacheCapacityPostOK with default headers values +func NewCacheServiceKeyCacheCapacityPostOK() *CacheServiceKeyCacheCapacityPostOK { + return &CacheServiceKeyCacheCapacityPostOK{} +} + +/*CacheServiceKeyCacheCapacityPostOK handles this case with default header values. + +CacheServiceKeyCacheCapacityPostOK cache service key cache capacity post o k +*/ +type CacheServiceKeyCacheCapacityPostOK struct { +} + +func (o *CacheServiceKeyCacheCapacityPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceKeyCacheCapacityPostDefault creates a CacheServiceKeyCacheCapacityPostDefault with default headers values +func NewCacheServiceKeyCacheCapacityPostDefault(code int) *CacheServiceKeyCacheCapacityPostDefault { + return &CacheServiceKeyCacheCapacityPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceKeyCacheCapacityPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceKeyCacheCapacityPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service key cache capacity post default response +func (o *CacheServiceKeyCacheCapacityPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceKeyCacheCapacityPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceKeyCacheCapacityPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceKeyCacheCapacityPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_parameters.go new file mode 100644 index 00000000000..8c1d352d195 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceKeyCacheKeysToSaveGetParams creates a new CacheServiceKeyCacheKeysToSaveGetParams object +// with the default values initialized. +func NewCacheServiceKeyCacheKeysToSaveGetParams() *CacheServiceKeyCacheKeysToSaveGetParams { + + return &CacheServiceKeyCacheKeysToSaveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceKeyCacheKeysToSaveGetParamsWithTimeout creates a new CacheServiceKeyCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceKeyCacheKeysToSaveGetParamsWithTimeout(timeout time.Duration) *CacheServiceKeyCacheKeysToSaveGetParams { + + return &CacheServiceKeyCacheKeysToSaveGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceKeyCacheKeysToSaveGetParamsWithContext creates a new CacheServiceKeyCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceKeyCacheKeysToSaveGetParamsWithContext(ctx context.Context) *CacheServiceKeyCacheKeysToSaveGetParams { + + return &CacheServiceKeyCacheKeysToSaveGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceKeyCacheKeysToSaveGetParamsWithHTTPClient creates a new CacheServiceKeyCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceKeyCacheKeysToSaveGetParamsWithHTTPClient(client *http.Client) *CacheServiceKeyCacheKeysToSaveGetParams { + + return &CacheServiceKeyCacheKeysToSaveGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceKeyCacheKeysToSaveGetParams contains all the parameters to send to the API endpoint +for the cache service key cache keys to save get operation typically these are written to a http.Request +*/ +type CacheServiceKeyCacheKeysToSaveGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) WithTimeout(timeout time.Duration) *CacheServiceKeyCacheKeysToSaveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) WithContext(ctx context.Context) *CacheServiceKeyCacheKeysToSaveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) WithHTTPClient(client *http.Client) *CacheServiceKeyCacheKeysToSaveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service key cache keys to save get params +func (o *CacheServiceKeyCacheKeysToSaveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceKeyCacheKeysToSaveGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_responses.go new file mode 100644 index 00000000000..83dd12a5634 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceKeyCacheKeysToSaveGetReader is a Reader for the CacheServiceKeyCacheKeysToSaveGet structure. +type CacheServiceKeyCacheKeysToSaveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceKeyCacheKeysToSaveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceKeyCacheKeysToSaveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceKeyCacheKeysToSaveGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceKeyCacheKeysToSaveGetOK creates a CacheServiceKeyCacheKeysToSaveGetOK with default headers values +func NewCacheServiceKeyCacheKeysToSaveGetOK() *CacheServiceKeyCacheKeysToSaveGetOK { + return &CacheServiceKeyCacheKeysToSaveGetOK{} +} + +/*CacheServiceKeyCacheKeysToSaveGetOK handles this case with default header values. + +CacheServiceKeyCacheKeysToSaveGetOK cache service key cache keys to save get o k +*/ +type CacheServiceKeyCacheKeysToSaveGetOK struct { + Payload int32 +} + +func (o *CacheServiceKeyCacheKeysToSaveGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceKeyCacheKeysToSaveGetOK) 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 +} + +// NewCacheServiceKeyCacheKeysToSaveGetDefault creates a CacheServiceKeyCacheKeysToSaveGetDefault with default headers values +func NewCacheServiceKeyCacheKeysToSaveGetDefault(code int) *CacheServiceKeyCacheKeysToSaveGetDefault { + return &CacheServiceKeyCacheKeysToSaveGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceKeyCacheKeysToSaveGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceKeyCacheKeysToSaveGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service key cache keys to save get default response +func (o *CacheServiceKeyCacheKeysToSaveGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceKeyCacheKeysToSaveGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceKeyCacheKeysToSaveGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceKeyCacheKeysToSaveGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_parameters.go new file mode 100644 index 00000000000..2da1cf10999 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceKeyCacheKeysToSavePostParams creates a new CacheServiceKeyCacheKeysToSavePostParams object +// with the default values initialized. +func NewCacheServiceKeyCacheKeysToSavePostParams() *CacheServiceKeyCacheKeysToSavePostParams { + var () + return &CacheServiceKeyCacheKeysToSavePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceKeyCacheKeysToSavePostParamsWithTimeout creates a new CacheServiceKeyCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceKeyCacheKeysToSavePostParamsWithTimeout(timeout time.Duration) *CacheServiceKeyCacheKeysToSavePostParams { + var () + return &CacheServiceKeyCacheKeysToSavePostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceKeyCacheKeysToSavePostParamsWithContext creates a new CacheServiceKeyCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceKeyCacheKeysToSavePostParamsWithContext(ctx context.Context) *CacheServiceKeyCacheKeysToSavePostParams { + var () + return &CacheServiceKeyCacheKeysToSavePostParams{ + + Context: ctx, + } +} + +// NewCacheServiceKeyCacheKeysToSavePostParamsWithHTTPClient creates a new CacheServiceKeyCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceKeyCacheKeysToSavePostParamsWithHTTPClient(client *http.Client) *CacheServiceKeyCacheKeysToSavePostParams { + var () + return &CacheServiceKeyCacheKeysToSavePostParams{ + HTTPClient: client, + } +} + +/*CacheServiceKeyCacheKeysToSavePostParams contains all the parameters to send to the API endpoint +for the cache service key cache keys to save post operation typically these are written to a http.Request +*/ +type CacheServiceKeyCacheKeysToSavePostParams struct { + + /*Kckts + key cache keys to save + + */ + Kckts int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) WithTimeout(timeout time.Duration) *CacheServiceKeyCacheKeysToSavePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) WithContext(ctx context.Context) *CacheServiceKeyCacheKeysToSavePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) WithHTTPClient(client *http.Client) *CacheServiceKeyCacheKeysToSavePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKckts adds the kckts to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) WithKckts(kckts int32) *CacheServiceKeyCacheKeysToSavePostParams { + o.SetKckts(kckts) + return o +} + +// SetKckts adds the kckts to the cache service key cache keys to save post params +func (o *CacheServiceKeyCacheKeysToSavePostParams) SetKckts(kckts int32) { + o.Kckts = kckts +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceKeyCacheKeysToSavePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param kckts + qrKckts := o.Kckts + qKckts := swag.FormatInt32(qrKckts) + if qKckts != "" { + if err := r.SetQueryParam("kckts", qKckts); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_responses.go new file mode 100644 index 00000000000..a5c0cf71701 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_keys_to_save_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceKeyCacheKeysToSavePostReader is a Reader for the CacheServiceKeyCacheKeysToSavePost structure. +type CacheServiceKeyCacheKeysToSavePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceKeyCacheKeysToSavePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceKeyCacheKeysToSavePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceKeyCacheKeysToSavePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceKeyCacheKeysToSavePostOK creates a CacheServiceKeyCacheKeysToSavePostOK with default headers values +func NewCacheServiceKeyCacheKeysToSavePostOK() *CacheServiceKeyCacheKeysToSavePostOK { + return &CacheServiceKeyCacheKeysToSavePostOK{} +} + +/*CacheServiceKeyCacheKeysToSavePostOK handles this case with default header values. + +CacheServiceKeyCacheKeysToSavePostOK cache service key cache keys to save post o k +*/ +type CacheServiceKeyCacheKeysToSavePostOK struct { +} + +func (o *CacheServiceKeyCacheKeysToSavePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceKeyCacheKeysToSavePostDefault creates a CacheServiceKeyCacheKeysToSavePostDefault with default headers values +func NewCacheServiceKeyCacheKeysToSavePostDefault(code int) *CacheServiceKeyCacheKeysToSavePostDefault { + return &CacheServiceKeyCacheKeysToSavePostDefault{ + _statusCode: code, + } +} + +/*CacheServiceKeyCacheKeysToSavePostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceKeyCacheKeysToSavePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service key cache keys to save post default response +func (o *CacheServiceKeyCacheKeysToSavePostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceKeyCacheKeysToSavePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceKeyCacheKeysToSavePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceKeyCacheKeysToSavePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_parameters.go new file mode 100644 index 00000000000..75e89b201c7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceKeyCacheSavePeriodGetParams creates a new CacheServiceKeyCacheSavePeriodGetParams object +// with the default values initialized. +func NewCacheServiceKeyCacheSavePeriodGetParams() *CacheServiceKeyCacheSavePeriodGetParams { + + return &CacheServiceKeyCacheSavePeriodGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceKeyCacheSavePeriodGetParamsWithTimeout creates a new CacheServiceKeyCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceKeyCacheSavePeriodGetParamsWithTimeout(timeout time.Duration) *CacheServiceKeyCacheSavePeriodGetParams { + + return &CacheServiceKeyCacheSavePeriodGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceKeyCacheSavePeriodGetParamsWithContext creates a new CacheServiceKeyCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceKeyCacheSavePeriodGetParamsWithContext(ctx context.Context) *CacheServiceKeyCacheSavePeriodGetParams { + + return &CacheServiceKeyCacheSavePeriodGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceKeyCacheSavePeriodGetParamsWithHTTPClient creates a new CacheServiceKeyCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceKeyCacheSavePeriodGetParamsWithHTTPClient(client *http.Client) *CacheServiceKeyCacheSavePeriodGetParams { + + return &CacheServiceKeyCacheSavePeriodGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceKeyCacheSavePeriodGetParams contains all the parameters to send to the API endpoint +for the cache service key cache save period get operation typically these are written to a http.Request +*/ +type CacheServiceKeyCacheSavePeriodGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) WithTimeout(timeout time.Duration) *CacheServiceKeyCacheSavePeriodGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) WithContext(ctx context.Context) *CacheServiceKeyCacheSavePeriodGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) WithHTTPClient(client *http.Client) *CacheServiceKeyCacheSavePeriodGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service key cache save period get params +func (o *CacheServiceKeyCacheSavePeriodGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceKeyCacheSavePeriodGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_responses.go new file mode 100644 index 00000000000..a2768d86bfc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceKeyCacheSavePeriodGetReader is a Reader for the CacheServiceKeyCacheSavePeriodGet structure. +type CacheServiceKeyCacheSavePeriodGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceKeyCacheSavePeriodGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceKeyCacheSavePeriodGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceKeyCacheSavePeriodGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceKeyCacheSavePeriodGetOK creates a CacheServiceKeyCacheSavePeriodGetOK with default headers values +func NewCacheServiceKeyCacheSavePeriodGetOK() *CacheServiceKeyCacheSavePeriodGetOK { + return &CacheServiceKeyCacheSavePeriodGetOK{} +} + +/*CacheServiceKeyCacheSavePeriodGetOK handles this case with default header values. + +CacheServiceKeyCacheSavePeriodGetOK cache service key cache save period get o k +*/ +type CacheServiceKeyCacheSavePeriodGetOK struct { + Payload int32 +} + +func (o *CacheServiceKeyCacheSavePeriodGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceKeyCacheSavePeriodGetOK) 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 +} + +// NewCacheServiceKeyCacheSavePeriodGetDefault creates a CacheServiceKeyCacheSavePeriodGetDefault with default headers values +func NewCacheServiceKeyCacheSavePeriodGetDefault(code int) *CacheServiceKeyCacheSavePeriodGetDefault { + return &CacheServiceKeyCacheSavePeriodGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceKeyCacheSavePeriodGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceKeyCacheSavePeriodGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service key cache save period get default response +func (o *CacheServiceKeyCacheSavePeriodGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceKeyCacheSavePeriodGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceKeyCacheSavePeriodGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceKeyCacheSavePeriodGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_parameters.go new file mode 100644 index 00000000000..740915a5601 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceKeyCacheSavePeriodPostParams creates a new CacheServiceKeyCacheSavePeriodPostParams object +// with the default values initialized. +func NewCacheServiceKeyCacheSavePeriodPostParams() *CacheServiceKeyCacheSavePeriodPostParams { + var () + return &CacheServiceKeyCacheSavePeriodPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceKeyCacheSavePeriodPostParamsWithTimeout creates a new CacheServiceKeyCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceKeyCacheSavePeriodPostParamsWithTimeout(timeout time.Duration) *CacheServiceKeyCacheSavePeriodPostParams { + var () + return &CacheServiceKeyCacheSavePeriodPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceKeyCacheSavePeriodPostParamsWithContext creates a new CacheServiceKeyCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceKeyCacheSavePeriodPostParamsWithContext(ctx context.Context) *CacheServiceKeyCacheSavePeriodPostParams { + var () + return &CacheServiceKeyCacheSavePeriodPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceKeyCacheSavePeriodPostParamsWithHTTPClient creates a new CacheServiceKeyCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceKeyCacheSavePeriodPostParamsWithHTTPClient(client *http.Client) *CacheServiceKeyCacheSavePeriodPostParams { + var () + return &CacheServiceKeyCacheSavePeriodPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceKeyCacheSavePeriodPostParams contains all the parameters to send to the API endpoint +for the cache service key cache save period post operation typically these are written to a http.Request +*/ +type CacheServiceKeyCacheSavePeriodPostParams struct { + + /*Period + key cache save period in seconds + + */ + Period int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) WithTimeout(timeout time.Duration) *CacheServiceKeyCacheSavePeriodPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) WithContext(ctx context.Context) *CacheServiceKeyCacheSavePeriodPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) WithHTTPClient(client *http.Client) *CacheServiceKeyCacheSavePeriodPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeriod adds the period to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) WithPeriod(period int32) *CacheServiceKeyCacheSavePeriodPostParams { + o.SetPeriod(period) + return o +} + +// SetPeriod adds the period to the cache service key cache save period post params +func (o *CacheServiceKeyCacheSavePeriodPostParams) SetPeriod(period int32) { + o.Period = period +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceKeyCacheSavePeriodPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param period + qrPeriod := o.Period + qPeriod := swag.FormatInt32(qrPeriod) + if qPeriod != "" { + if err := r.SetQueryParam("period", qPeriod); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_responses.go new file mode 100644 index 00000000000..4dd6deead50 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_key_cache_save_period_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceKeyCacheSavePeriodPostReader is a Reader for the CacheServiceKeyCacheSavePeriodPost structure. +type CacheServiceKeyCacheSavePeriodPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceKeyCacheSavePeriodPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceKeyCacheSavePeriodPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceKeyCacheSavePeriodPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceKeyCacheSavePeriodPostOK creates a CacheServiceKeyCacheSavePeriodPostOK with default headers values +func NewCacheServiceKeyCacheSavePeriodPostOK() *CacheServiceKeyCacheSavePeriodPostOK { + return &CacheServiceKeyCacheSavePeriodPostOK{} +} + +/*CacheServiceKeyCacheSavePeriodPostOK handles this case with default header values. + +CacheServiceKeyCacheSavePeriodPostOK cache service key cache save period post o k +*/ +type CacheServiceKeyCacheSavePeriodPostOK struct { +} + +func (o *CacheServiceKeyCacheSavePeriodPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceKeyCacheSavePeriodPostDefault creates a CacheServiceKeyCacheSavePeriodPostDefault with default headers values +func NewCacheServiceKeyCacheSavePeriodPostDefault(code int) *CacheServiceKeyCacheSavePeriodPostDefault { + return &CacheServiceKeyCacheSavePeriodPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceKeyCacheSavePeriodPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceKeyCacheSavePeriodPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service key cache save period post default response +func (o *CacheServiceKeyCacheSavePeriodPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceKeyCacheSavePeriodPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceKeyCacheSavePeriodPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceKeyCacheSavePeriodPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_parameters.go new file mode 100644 index 00000000000..10c9da38d74 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterCapacityGetParams creates a new CacheServiceMetricsCounterCapacityGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterCapacityGetParams() *CacheServiceMetricsCounterCapacityGetParams { + + return &CacheServiceMetricsCounterCapacityGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterCapacityGetParamsWithTimeout creates a new CacheServiceMetricsCounterCapacityGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterCapacityGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterCapacityGetParams { + + return &CacheServiceMetricsCounterCapacityGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterCapacityGetParamsWithContext creates a new CacheServiceMetricsCounterCapacityGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterCapacityGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterCapacityGetParams { + + return &CacheServiceMetricsCounterCapacityGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterCapacityGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterCapacityGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterCapacityGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterCapacityGetParams { + + return &CacheServiceMetricsCounterCapacityGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterCapacityGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter capacity get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterCapacityGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterCapacityGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterCapacityGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterCapacityGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter capacity get params +func (o *CacheServiceMetricsCounterCapacityGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterCapacityGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_responses.go new file mode 100644 index 00000000000..9a3f720c75c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_capacity_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterCapacityGetReader is a Reader for the CacheServiceMetricsCounterCapacityGet structure. +type CacheServiceMetricsCounterCapacityGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterCapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterCapacityGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterCapacityGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterCapacityGetOK creates a CacheServiceMetricsCounterCapacityGetOK with default headers values +func NewCacheServiceMetricsCounterCapacityGetOK() *CacheServiceMetricsCounterCapacityGetOK { + return &CacheServiceMetricsCounterCapacityGetOK{} +} + +/*CacheServiceMetricsCounterCapacityGetOK handles this case with default header values. + +CacheServiceMetricsCounterCapacityGetOK cache service metrics counter capacity get o k +*/ +type CacheServiceMetricsCounterCapacityGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsCounterCapacityGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsCounterCapacityGetOK) 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 +} + +// NewCacheServiceMetricsCounterCapacityGetDefault creates a CacheServiceMetricsCounterCapacityGetDefault with default headers values +func NewCacheServiceMetricsCounterCapacityGetDefault(code int) *CacheServiceMetricsCounterCapacityGetDefault { + return &CacheServiceMetricsCounterCapacityGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterCapacityGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterCapacityGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter capacity get default response +func (o *CacheServiceMetricsCounterCapacityGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterCapacityGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterCapacityGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterCapacityGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_parameters.go new file mode 100644 index 00000000000..e9888db0c23 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterEntriesGetParams creates a new CacheServiceMetricsCounterEntriesGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterEntriesGetParams() *CacheServiceMetricsCounterEntriesGetParams { + + return &CacheServiceMetricsCounterEntriesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterEntriesGetParamsWithTimeout creates a new CacheServiceMetricsCounterEntriesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterEntriesGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterEntriesGetParams { + + return &CacheServiceMetricsCounterEntriesGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterEntriesGetParamsWithContext creates a new CacheServiceMetricsCounterEntriesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterEntriesGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterEntriesGetParams { + + return &CacheServiceMetricsCounterEntriesGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterEntriesGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterEntriesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterEntriesGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterEntriesGetParams { + + return &CacheServiceMetricsCounterEntriesGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterEntriesGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter entries get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterEntriesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterEntriesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterEntriesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterEntriesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter entries get params +func (o *CacheServiceMetricsCounterEntriesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterEntriesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_responses.go new file mode 100644 index 00000000000..c09cf352729 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_entries_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterEntriesGetReader is a Reader for the CacheServiceMetricsCounterEntriesGet structure. +type CacheServiceMetricsCounterEntriesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterEntriesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterEntriesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterEntriesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterEntriesGetOK creates a CacheServiceMetricsCounterEntriesGetOK with default headers values +func NewCacheServiceMetricsCounterEntriesGetOK() *CacheServiceMetricsCounterEntriesGetOK { + return &CacheServiceMetricsCounterEntriesGetOK{} +} + +/*CacheServiceMetricsCounterEntriesGetOK handles this case with default header values. + +CacheServiceMetricsCounterEntriesGetOK cache service metrics counter entries get o k +*/ +type CacheServiceMetricsCounterEntriesGetOK struct { + Payload int32 +} + +func (o *CacheServiceMetricsCounterEntriesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceMetricsCounterEntriesGetOK) 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 +} + +// NewCacheServiceMetricsCounterEntriesGetDefault creates a CacheServiceMetricsCounterEntriesGetDefault with default headers values +func NewCacheServiceMetricsCounterEntriesGetDefault(code int) *CacheServiceMetricsCounterEntriesGetDefault { + return &CacheServiceMetricsCounterEntriesGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterEntriesGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterEntriesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter entries get default response +func (o *CacheServiceMetricsCounterEntriesGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterEntriesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterEntriesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterEntriesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_parameters.go new file mode 100644 index 00000000000..1028dce4503 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterHitRateGetParams creates a new CacheServiceMetricsCounterHitRateGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterHitRateGetParams() *CacheServiceMetricsCounterHitRateGetParams { + + return &CacheServiceMetricsCounterHitRateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterHitRateGetParamsWithTimeout creates a new CacheServiceMetricsCounterHitRateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterHitRateGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitRateGetParams { + + return &CacheServiceMetricsCounterHitRateGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterHitRateGetParamsWithContext creates a new CacheServiceMetricsCounterHitRateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterHitRateGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterHitRateGetParams { + + return &CacheServiceMetricsCounterHitRateGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterHitRateGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterHitRateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterHitRateGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitRateGetParams { + + return &CacheServiceMetricsCounterHitRateGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterHitRateGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter hit rate get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterHitRateGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitRateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterHitRateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitRateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter hit rate get params +func (o *CacheServiceMetricsCounterHitRateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterHitRateGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_responses.go new file mode 100644 index 00000000000..d95b2753e56 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hit_rate_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterHitRateGetReader is a Reader for the CacheServiceMetricsCounterHitRateGet structure. +type CacheServiceMetricsCounterHitRateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterHitRateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterHitRateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterHitRateGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterHitRateGetOK creates a CacheServiceMetricsCounterHitRateGetOK with default headers values +func NewCacheServiceMetricsCounterHitRateGetOK() *CacheServiceMetricsCounterHitRateGetOK { + return &CacheServiceMetricsCounterHitRateGetOK{} +} + +/*CacheServiceMetricsCounterHitRateGetOK handles this case with default header values. + +CacheServiceMetricsCounterHitRateGetOK cache service metrics counter hit rate get o k +*/ +type CacheServiceMetricsCounterHitRateGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsCounterHitRateGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitRateGetOK) 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 +} + +// NewCacheServiceMetricsCounterHitRateGetDefault creates a CacheServiceMetricsCounterHitRateGetDefault with default headers values +func NewCacheServiceMetricsCounterHitRateGetDefault(code int) *CacheServiceMetricsCounterHitRateGetDefault { + return &CacheServiceMetricsCounterHitRateGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterHitRateGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterHitRateGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter hit rate get default response +func (o *CacheServiceMetricsCounterHitRateGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterHitRateGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitRateGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterHitRateGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_parameters.go new file mode 100644 index 00000000000..4a57370266a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterHitsGetParams creates a new CacheServiceMetricsCounterHitsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterHitsGetParams() *CacheServiceMetricsCounterHitsGetParams { + + return &CacheServiceMetricsCounterHitsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterHitsGetParamsWithTimeout creates a new CacheServiceMetricsCounterHitsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterHitsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitsGetParams { + + return &CacheServiceMetricsCounterHitsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterHitsGetParamsWithContext creates a new CacheServiceMetricsCounterHitsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterHitsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterHitsGetParams { + + return &CacheServiceMetricsCounterHitsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterHitsGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterHitsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterHitsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitsGetParams { + + return &CacheServiceMetricsCounterHitsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterHitsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter hits get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterHitsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterHitsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter hits get params +func (o *CacheServiceMetricsCounterHitsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterHitsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_responses.go new file mode 100644 index 00000000000..de98be136b7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterHitsGetReader is a Reader for the CacheServiceMetricsCounterHitsGet structure. +type CacheServiceMetricsCounterHitsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterHitsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterHitsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterHitsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterHitsGetOK creates a CacheServiceMetricsCounterHitsGetOK with default headers values +func NewCacheServiceMetricsCounterHitsGetOK() *CacheServiceMetricsCounterHitsGetOK { + return &CacheServiceMetricsCounterHitsGetOK{} +} + +/*CacheServiceMetricsCounterHitsGetOK handles this case with default header values. + +CacheServiceMetricsCounterHitsGetOK cache service metrics counter hits get o k +*/ +type CacheServiceMetricsCounterHitsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsCounterHitsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitsGetOK) 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 +} + +// NewCacheServiceMetricsCounterHitsGetDefault creates a CacheServiceMetricsCounterHitsGetDefault with default headers values +func NewCacheServiceMetricsCounterHitsGetDefault(code int) *CacheServiceMetricsCounterHitsGetDefault { + return &CacheServiceMetricsCounterHitsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterHitsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterHitsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter hits get default response +func (o *CacheServiceMetricsCounterHitsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterHitsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterHitsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..fd9a34d6008 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetParams creates a new CacheServiceMetricsCounterHitsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterHitsMovingAvrageGetParams() *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterHitsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsCounterHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterHitsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsCounterHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterHitsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterHitsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterHitsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterHitsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter hits moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterHitsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterHitsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter hits moving avrage get params +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_responses.go new file mode 100644 index 00000000000..32394a64ce7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_hits_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterHitsMovingAvrageGetReader is a Reader for the CacheServiceMetricsCounterHitsMovingAvrageGet structure. +type CacheServiceMetricsCounterHitsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterHitsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterHitsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetOK creates a CacheServiceMetricsCounterHitsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsCounterHitsMovingAvrageGetOK() *CacheServiceMetricsCounterHitsMovingAvrageGetOK { + return &CacheServiceMetricsCounterHitsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsCounterHitsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsCounterHitsMovingAvrageGetOK cache service metrics counter hits moving avrage get o k +*/ +type CacheServiceMetricsCounterHitsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsCounterHitsMovingAvrageGetDefault creates a CacheServiceMetricsCounterHitsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsCounterHitsMovingAvrageGetDefault(code int) *CacheServiceMetricsCounterHitsMovingAvrageGetDefault { + return &CacheServiceMetricsCounterHitsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterHitsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterHitsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter hits moving avrage get default response +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterHitsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_parameters.go new file mode 100644 index 00000000000..9ec93d91e83 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterRequestsGetParams creates a new CacheServiceMetricsCounterRequestsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterRequestsGetParams() *CacheServiceMetricsCounterRequestsGetParams { + + return &CacheServiceMetricsCounterRequestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterRequestsGetParamsWithTimeout creates a new CacheServiceMetricsCounterRequestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterRequestsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterRequestsGetParams { + + return &CacheServiceMetricsCounterRequestsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterRequestsGetParamsWithContext creates a new CacheServiceMetricsCounterRequestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterRequestsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterRequestsGetParams { + + return &CacheServiceMetricsCounterRequestsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterRequestsGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterRequestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterRequestsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterRequestsGetParams { + + return &CacheServiceMetricsCounterRequestsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterRequestsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter requests get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterRequestsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterRequestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterRequestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterRequestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter requests get params +func (o *CacheServiceMetricsCounterRequestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterRequestsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_responses.go new file mode 100644 index 00000000000..cb1d6e96f73 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterRequestsGetReader is a Reader for the CacheServiceMetricsCounterRequestsGet structure. +type CacheServiceMetricsCounterRequestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterRequestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterRequestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterRequestsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterRequestsGetOK creates a CacheServiceMetricsCounterRequestsGetOK with default headers values +func NewCacheServiceMetricsCounterRequestsGetOK() *CacheServiceMetricsCounterRequestsGetOK { + return &CacheServiceMetricsCounterRequestsGetOK{} +} + +/*CacheServiceMetricsCounterRequestsGetOK handles this case with default header values. + +CacheServiceMetricsCounterRequestsGetOK cache service metrics counter requests get o k +*/ +type CacheServiceMetricsCounterRequestsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsCounterRequestsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsCounterRequestsGetOK) 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 +} + +// NewCacheServiceMetricsCounterRequestsGetDefault creates a CacheServiceMetricsCounterRequestsGetDefault with default headers values +func NewCacheServiceMetricsCounterRequestsGetDefault(code int) *CacheServiceMetricsCounterRequestsGetDefault { + return &CacheServiceMetricsCounterRequestsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterRequestsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterRequestsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter requests get default response +func (o *CacheServiceMetricsCounterRequestsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterRequestsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterRequestsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterRequestsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..fbaf8127e83 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetParams creates a new CacheServiceMetricsCounterRequestsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetParams() *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterRequestsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsCounterRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterRequestsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsCounterRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterRequestsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsCounterRequestsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterRequestsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter requests moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterRequestsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterRequestsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter requests moving avrage get params +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_responses.go new file mode 100644 index 00000000000..e41adbedd68 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_requests_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterRequestsMovingAvrageGetReader is a Reader for the CacheServiceMetricsCounterRequestsMovingAvrageGet structure. +type CacheServiceMetricsCounterRequestsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterRequestsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterRequestsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetOK creates a CacheServiceMetricsCounterRequestsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetOK() *CacheServiceMetricsCounterRequestsMovingAvrageGetOK { + return &CacheServiceMetricsCounterRequestsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsCounterRequestsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsCounterRequestsMovingAvrageGetOK cache service metrics counter requests moving avrage get o k +*/ +type CacheServiceMetricsCounterRequestsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsCounterRequestsMovingAvrageGetDefault creates a CacheServiceMetricsCounterRequestsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsCounterRequestsMovingAvrageGetDefault(code int) *CacheServiceMetricsCounterRequestsMovingAvrageGetDefault { + return &CacheServiceMetricsCounterRequestsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterRequestsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterRequestsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter requests moving avrage get default response +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterRequestsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_parameters.go new file mode 100644 index 00000000000..2df3d983b4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsCounterSizeGetParams creates a new CacheServiceMetricsCounterSizeGetParams object +// with the default values initialized. +func NewCacheServiceMetricsCounterSizeGetParams() *CacheServiceMetricsCounterSizeGetParams { + + return &CacheServiceMetricsCounterSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsCounterSizeGetParamsWithTimeout creates a new CacheServiceMetricsCounterSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsCounterSizeGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsCounterSizeGetParams { + + return &CacheServiceMetricsCounterSizeGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsCounterSizeGetParamsWithContext creates a new CacheServiceMetricsCounterSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsCounterSizeGetParamsWithContext(ctx context.Context) *CacheServiceMetricsCounterSizeGetParams { + + return &CacheServiceMetricsCounterSizeGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsCounterSizeGetParamsWithHTTPClient creates a new CacheServiceMetricsCounterSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsCounterSizeGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsCounterSizeGetParams { + + return &CacheServiceMetricsCounterSizeGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsCounterSizeGetParams contains all the parameters to send to the API endpoint +for the cache service metrics counter size get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsCounterSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsCounterSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) WithContext(ctx context.Context) *CacheServiceMetricsCounterSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsCounterSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics counter size get params +func (o *CacheServiceMetricsCounterSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsCounterSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_responses.go new file mode 100644 index 00000000000..3804fd46106 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_counter_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsCounterSizeGetReader is a Reader for the CacheServiceMetricsCounterSizeGet structure. +type CacheServiceMetricsCounterSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsCounterSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsCounterSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsCounterSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsCounterSizeGetOK creates a CacheServiceMetricsCounterSizeGetOK with default headers values +func NewCacheServiceMetricsCounterSizeGetOK() *CacheServiceMetricsCounterSizeGetOK { + return &CacheServiceMetricsCounterSizeGetOK{} +} + +/*CacheServiceMetricsCounterSizeGetOK handles this case with default header values. + +CacheServiceMetricsCounterSizeGetOK cache service metrics counter size get o k +*/ +type CacheServiceMetricsCounterSizeGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsCounterSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsCounterSizeGetOK) 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 +} + +// NewCacheServiceMetricsCounterSizeGetDefault creates a CacheServiceMetricsCounterSizeGetDefault with default headers values +func NewCacheServiceMetricsCounterSizeGetDefault(code int) *CacheServiceMetricsCounterSizeGetDefault { + return &CacheServiceMetricsCounterSizeGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsCounterSizeGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsCounterSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics counter size get default response +func (o *CacheServiceMetricsCounterSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsCounterSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsCounterSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsCounterSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_parameters.go new file mode 100644 index 00000000000..3908df6e735 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyCapacityGetParams creates a new CacheServiceMetricsKeyCapacityGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyCapacityGetParams() *CacheServiceMetricsKeyCapacityGetParams { + + return &CacheServiceMetricsKeyCapacityGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyCapacityGetParamsWithTimeout creates a new CacheServiceMetricsKeyCapacityGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyCapacityGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyCapacityGetParams { + + return &CacheServiceMetricsKeyCapacityGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyCapacityGetParamsWithContext creates a new CacheServiceMetricsKeyCapacityGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyCapacityGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyCapacityGetParams { + + return &CacheServiceMetricsKeyCapacityGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyCapacityGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyCapacityGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyCapacityGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyCapacityGetParams { + + return &CacheServiceMetricsKeyCapacityGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyCapacityGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key capacity get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyCapacityGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyCapacityGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyCapacityGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyCapacityGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key capacity get params +func (o *CacheServiceMetricsKeyCapacityGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyCapacityGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_responses.go new file mode 100644 index 00000000000..a2343947ee7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_capacity_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyCapacityGetReader is a Reader for the CacheServiceMetricsKeyCapacityGet structure. +type CacheServiceMetricsKeyCapacityGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyCapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyCapacityGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyCapacityGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyCapacityGetOK creates a CacheServiceMetricsKeyCapacityGetOK with default headers values +func NewCacheServiceMetricsKeyCapacityGetOK() *CacheServiceMetricsKeyCapacityGetOK { + return &CacheServiceMetricsKeyCapacityGetOK{} +} + +/*CacheServiceMetricsKeyCapacityGetOK handles this case with default header values. + +CacheServiceMetricsKeyCapacityGetOK cache service metrics key capacity get o k +*/ +type CacheServiceMetricsKeyCapacityGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsKeyCapacityGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsKeyCapacityGetOK) 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 +} + +// NewCacheServiceMetricsKeyCapacityGetDefault creates a CacheServiceMetricsKeyCapacityGetDefault with default headers values +func NewCacheServiceMetricsKeyCapacityGetDefault(code int) *CacheServiceMetricsKeyCapacityGetDefault { + return &CacheServiceMetricsKeyCapacityGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyCapacityGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyCapacityGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key capacity get default response +func (o *CacheServiceMetricsKeyCapacityGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyCapacityGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyCapacityGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyCapacityGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_parameters.go new file mode 100644 index 00000000000..fccb452c02a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyEntriesGetParams creates a new CacheServiceMetricsKeyEntriesGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyEntriesGetParams() *CacheServiceMetricsKeyEntriesGetParams { + + return &CacheServiceMetricsKeyEntriesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyEntriesGetParamsWithTimeout creates a new CacheServiceMetricsKeyEntriesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyEntriesGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyEntriesGetParams { + + return &CacheServiceMetricsKeyEntriesGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyEntriesGetParamsWithContext creates a new CacheServiceMetricsKeyEntriesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyEntriesGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyEntriesGetParams { + + return &CacheServiceMetricsKeyEntriesGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyEntriesGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyEntriesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyEntriesGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyEntriesGetParams { + + return &CacheServiceMetricsKeyEntriesGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyEntriesGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key entries get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyEntriesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyEntriesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyEntriesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyEntriesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key entries get params +func (o *CacheServiceMetricsKeyEntriesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyEntriesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_responses.go new file mode 100644 index 00000000000..761cddf0c24 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_entries_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyEntriesGetReader is a Reader for the CacheServiceMetricsKeyEntriesGet structure. +type CacheServiceMetricsKeyEntriesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyEntriesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyEntriesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyEntriesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyEntriesGetOK creates a CacheServiceMetricsKeyEntriesGetOK with default headers values +func NewCacheServiceMetricsKeyEntriesGetOK() *CacheServiceMetricsKeyEntriesGetOK { + return &CacheServiceMetricsKeyEntriesGetOK{} +} + +/*CacheServiceMetricsKeyEntriesGetOK handles this case with default header values. + +CacheServiceMetricsKeyEntriesGetOK cache service metrics key entries get o k +*/ +type CacheServiceMetricsKeyEntriesGetOK struct { + Payload int32 +} + +func (o *CacheServiceMetricsKeyEntriesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceMetricsKeyEntriesGetOK) 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 +} + +// NewCacheServiceMetricsKeyEntriesGetDefault creates a CacheServiceMetricsKeyEntriesGetDefault with default headers values +func NewCacheServiceMetricsKeyEntriesGetDefault(code int) *CacheServiceMetricsKeyEntriesGetDefault { + return &CacheServiceMetricsKeyEntriesGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyEntriesGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyEntriesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key entries get default response +func (o *CacheServiceMetricsKeyEntriesGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyEntriesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyEntriesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyEntriesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_parameters.go new file mode 100644 index 00000000000..70edfad576d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyHitRateGetParams creates a new CacheServiceMetricsKeyHitRateGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyHitRateGetParams() *CacheServiceMetricsKeyHitRateGetParams { + + return &CacheServiceMetricsKeyHitRateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyHitRateGetParamsWithTimeout creates a new CacheServiceMetricsKeyHitRateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyHitRateGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitRateGetParams { + + return &CacheServiceMetricsKeyHitRateGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyHitRateGetParamsWithContext creates a new CacheServiceMetricsKeyHitRateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyHitRateGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyHitRateGetParams { + + return &CacheServiceMetricsKeyHitRateGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyHitRateGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyHitRateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyHitRateGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitRateGetParams { + + return &CacheServiceMetricsKeyHitRateGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyHitRateGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key hit rate get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyHitRateGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitRateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyHitRateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitRateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key hit rate get params +func (o *CacheServiceMetricsKeyHitRateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyHitRateGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_responses.go new file mode 100644 index 00000000000..085c2d029ea --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hit_rate_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyHitRateGetReader is a Reader for the CacheServiceMetricsKeyHitRateGet structure. +type CacheServiceMetricsKeyHitRateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyHitRateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyHitRateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyHitRateGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyHitRateGetOK creates a CacheServiceMetricsKeyHitRateGetOK with default headers values +func NewCacheServiceMetricsKeyHitRateGetOK() *CacheServiceMetricsKeyHitRateGetOK { + return &CacheServiceMetricsKeyHitRateGetOK{} +} + +/*CacheServiceMetricsKeyHitRateGetOK handles this case with default header values. + +CacheServiceMetricsKeyHitRateGetOK cache service metrics key hit rate get o k +*/ +type CacheServiceMetricsKeyHitRateGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsKeyHitRateGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitRateGetOK) 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 +} + +// NewCacheServiceMetricsKeyHitRateGetDefault creates a CacheServiceMetricsKeyHitRateGetDefault with default headers values +func NewCacheServiceMetricsKeyHitRateGetDefault(code int) *CacheServiceMetricsKeyHitRateGetDefault { + return &CacheServiceMetricsKeyHitRateGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyHitRateGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyHitRateGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key hit rate get default response +func (o *CacheServiceMetricsKeyHitRateGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyHitRateGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitRateGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyHitRateGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_parameters.go new file mode 100644 index 00000000000..b3676b9556a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyHitsGetParams creates a new CacheServiceMetricsKeyHitsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyHitsGetParams() *CacheServiceMetricsKeyHitsGetParams { + + return &CacheServiceMetricsKeyHitsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyHitsGetParamsWithTimeout creates a new CacheServiceMetricsKeyHitsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyHitsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitsGetParams { + + return &CacheServiceMetricsKeyHitsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyHitsGetParamsWithContext creates a new CacheServiceMetricsKeyHitsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyHitsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyHitsGetParams { + + return &CacheServiceMetricsKeyHitsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyHitsGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyHitsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyHitsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitsGetParams { + + return &CacheServiceMetricsKeyHitsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyHitsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key hits get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyHitsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyHitsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key hits get params +func (o *CacheServiceMetricsKeyHitsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyHitsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_responses.go new file mode 100644 index 00000000000..53fcba56016 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyHitsGetReader is a Reader for the CacheServiceMetricsKeyHitsGet structure. +type CacheServiceMetricsKeyHitsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyHitsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyHitsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyHitsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyHitsGetOK creates a CacheServiceMetricsKeyHitsGetOK with default headers values +func NewCacheServiceMetricsKeyHitsGetOK() *CacheServiceMetricsKeyHitsGetOK { + return &CacheServiceMetricsKeyHitsGetOK{} +} + +/*CacheServiceMetricsKeyHitsGetOK handles this case with default header values. + +CacheServiceMetricsKeyHitsGetOK cache service metrics key hits get o k +*/ +type CacheServiceMetricsKeyHitsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsKeyHitsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitsGetOK) 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 +} + +// NewCacheServiceMetricsKeyHitsGetDefault creates a CacheServiceMetricsKeyHitsGetDefault with default headers values +func NewCacheServiceMetricsKeyHitsGetDefault(code int) *CacheServiceMetricsKeyHitsGetDefault { + return &CacheServiceMetricsKeyHitsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyHitsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyHitsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key hits get default response +func (o *CacheServiceMetricsKeyHitsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyHitsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyHitsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..26c3deceea3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetParams creates a new CacheServiceMetricsKeyHitsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyHitsMovingAvrageGetParams() *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyHitsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsKeyHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyHitsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsKeyHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyHitsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyHitsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyHitsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyHitsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key hits moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyHitsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyHitsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key hits moving avrage get params +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_responses.go new file mode 100644 index 00000000000..f42026380cd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_hits_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyHitsMovingAvrageGetReader is a Reader for the CacheServiceMetricsKeyHitsMovingAvrageGet structure. +type CacheServiceMetricsKeyHitsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyHitsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyHitsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetOK creates a CacheServiceMetricsKeyHitsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsKeyHitsMovingAvrageGetOK() *CacheServiceMetricsKeyHitsMovingAvrageGetOK { + return &CacheServiceMetricsKeyHitsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsKeyHitsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsKeyHitsMovingAvrageGetOK cache service metrics key hits moving avrage get o k +*/ +type CacheServiceMetricsKeyHitsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsKeyHitsMovingAvrageGetDefault creates a CacheServiceMetricsKeyHitsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsKeyHitsMovingAvrageGetDefault(code int) *CacheServiceMetricsKeyHitsMovingAvrageGetDefault { + return &CacheServiceMetricsKeyHitsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyHitsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyHitsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key hits moving avrage get default response +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyHitsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_parameters.go new file mode 100644 index 00000000000..970b44f210e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyRequestsGetParams creates a new CacheServiceMetricsKeyRequestsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyRequestsGetParams() *CacheServiceMetricsKeyRequestsGetParams { + + return &CacheServiceMetricsKeyRequestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyRequestsGetParamsWithTimeout creates a new CacheServiceMetricsKeyRequestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyRequestsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyRequestsGetParams { + + return &CacheServiceMetricsKeyRequestsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyRequestsGetParamsWithContext creates a new CacheServiceMetricsKeyRequestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyRequestsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyRequestsGetParams { + + return &CacheServiceMetricsKeyRequestsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyRequestsGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyRequestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyRequestsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyRequestsGetParams { + + return &CacheServiceMetricsKeyRequestsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyRequestsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key requests get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyRequestsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyRequestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyRequestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyRequestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key requests get params +func (o *CacheServiceMetricsKeyRequestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyRequestsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_responses.go new file mode 100644 index 00000000000..ba1b63a011a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyRequestsGetReader is a Reader for the CacheServiceMetricsKeyRequestsGet structure. +type CacheServiceMetricsKeyRequestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyRequestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyRequestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyRequestsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyRequestsGetOK creates a CacheServiceMetricsKeyRequestsGetOK with default headers values +func NewCacheServiceMetricsKeyRequestsGetOK() *CacheServiceMetricsKeyRequestsGetOK { + return &CacheServiceMetricsKeyRequestsGetOK{} +} + +/*CacheServiceMetricsKeyRequestsGetOK handles this case with default header values. + +CacheServiceMetricsKeyRequestsGetOK cache service metrics key requests get o k +*/ +type CacheServiceMetricsKeyRequestsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsKeyRequestsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsKeyRequestsGetOK) 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 +} + +// NewCacheServiceMetricsKeyRequestsGetDefault creates a CacheServiceMetricsKeyRequestsGetDefault with default headers values +func NewCacheServiceMetricsKeyRequestsGetDefault(code int) *CacheServiceMetricsKeyRequestsGetDefault { + return &CacheServiceMetricsKeyRequestsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyRequestsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyRequestsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key requests get default response +func (o *CacheServiceMetricsKeyRequestsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyRequestsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyRequestsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyRequestsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..c4e9094b4ad --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetParams creates a new CacheServiceMetricsKeyRequestsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetParams() *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyRequestsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsKeyRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyRequestsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsKeyRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyRequestsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsKeyRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsKeyRequestsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeyRequestsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key requests moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeyRequestsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeyRequestsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key requests moving avrage get params +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_responses.go new file mode 100644 index 00000000000..c590b548d60 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_requests_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeyRequestsMovingAvrageGetReader is a Reader for the CacheServiceMetricsKeyRequestsMovingAvrageGet structure. +type CacheServiceMetricsKeyRequestsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeyRequestsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeyRequestsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetOK creates a CacheServiceMetricsKeyRequestsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetOK() *CacheServiceMetricsKeyRequestsMovingAvrageGetOK { + return &CacheServiceMetricsKeyRequestsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsKeyRequestsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsKeyRequestsMovingAvrageGetOK cache service metrics key requests moving avrage get o k +*/ +type CacheServiceMetricsKeyRequestsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsKeyRequestsMovingAvrageGetDefault creates a CacheServiceMetricsKeyRequestsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsKeyRequestsMovingAvrageGetDefault(code int) *CacheServiceMetricsKeyRequestsMovingAvrageGetDefault { + return &CacheServiceMetricsKeyRequestsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeyRequestsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeyRequestsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key requests moving avrage get default response +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeyRequestsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_parameters.go new file mode 100644 index 00000000000..b6353e98160 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsKeySizeGetParams creates a new CacheServiceMetricsKeySizeGetParams object +// with the default values initialized. +func NewCacheServiceMetricsKeySizeGetParams() *CacheServiceMetricsKeySizeGetParams { + + return &CacheServiceMetricsKeySizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsKeySizeGetParamsWithTimeout creates a new CacheServiceMetricsKeySizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsKeySizeGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsKeySizeGetParams { + + return &CacheServiceMetricsKeySizeGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsKeySizeGetParamsWithContext creates a new CacheServiceMetricsKeySizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsKeySizeGetParamsWithContext(ctx context.Context) *CacheServiceMetricsKeySizeGetParams { + + return &CacheServiceMetricsKeySizeGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsKeySizeGetParamsWithHTTPClient creates a new CacheServiceMetricsKeySizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsKeySizeGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsKeySizeGetParams { + + return &CacheServiceMetricsKeySizeGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsKeySizeGetParams contains all the parameters to send to the API endpoint +for the cache service metrics key size get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsKeySizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsKeySizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) WithContext(ctx context.Context) *CacheServiceMetricsKeySizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsKeySizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics key size get params +func (o *CacheServiceMetricsKeySizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsKeySizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_responses.go new file mode 100644 index 00000000000..dea6e76ee6f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_key_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsKeySizeGetReader is a Reader for the CacheServiceMetricsKeySizeGet structure. +type CacheServiceMetricsKeySizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsKeySizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsKeySizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsKeySizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsKeySizeGetOK creates a CacheServiceMetricsKeySizeGetOK with default headers values +func NewCacheServiceMetricsKeySizeGetOK() *CacheServiceMetricsKeySizeGetOK { + return &CacheServiceMetricsKeySizeGetOK{} +} + +/*CacheServiceMetricsKeySizeGetOK handles this case with default header values. + +CacheServiceMetricsKeySizeGetOK cache service metrics key size get o k +*/ +type CacheServiceMetricsKeySizeGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsKeySizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsKeySizeGetOK) 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 +} + +// NewCacheServiceMetricsKeySizeGetDefault creates a CacheServiceMetricsKeySizeGetDefault with default headers values +func NewCacheServiceMetricsKeySizeGetDefault(code int) *CacheServiceMetricsKeySizeGetDefault { + return &CacheServiceMetricsKeySizeGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsKeySizeGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsKeySizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics key size get default response +func (o *CacheServiceMetricsKeySizeGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsKeySizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsKeySizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsKeySizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_parameters.go new file mode 100644 index 00000000000..17aa669899a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowCapacityGetParams creates a new CacheServiceMetricsRowCapacityGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowCapacityGetParams() *CacheServiceMetricsRowCapacityGetParams { + + return &CacheServiceMetricsRowCapacityGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowCapacityGetParamsWithTimeout creates a new CacheServiceMetricsRowCapacityGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowCapacityGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowCapacityGetParams { + + return &CacheServiceMetricsRowCapacityGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowCapacityGetParamsWithContext creates a new CacheServiceMetricsRowCapacityGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowCapacityGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowCapacityGetParams { + + return &CacheServiceMetricsRowCapacityGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowCapacityGetParamsWithHTTPClient creates a new CacheServiceMetricsRowCapacityGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowCapacityGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowCapacityGetParams { + + return &CacheServiceMetricsRowCapacityGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowCapacityGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row capacity get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowCapacityGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowCapacityGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowCapacityGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowCapacityGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row capacity get params +func (o *CacheServiceMetricsRowCapacityGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowCapacityGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_responses.go new file mode 100644 index 00000000000..53dec12fe7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_capacity_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowCapacityGetReader is a Reader for the CacheServiceMetricsRowCapacityGet structure. +type CacheServiceMetricsRowCapacityGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowCapacityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowCapacityGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowCapacityGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowCapacityGetOK creates a CacheServiceMetricsRowCapacityGetOK with default headers values +func NewCacheServiceMetricsRowCapacityGetOK() *CacheServiceMetricsRowCapacityGetOK { + return &CacheServiceMetricsRowCapacityGetOK{} +} + +/*CacheServiceMetricsRowCapacityGetOK handles this case with default header values. + +CacheServiceMetricsRowCapacityGetOK cache service metrics row capacity get o k +*/ +type CacheServiceMetricsRowCapacityGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsRowCapacityGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsRowCapacityGetOK) 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 +} + +// NewCacheServiceMetricsRowCapacityGetDefault creates a CacheServiceMetricsRowCapacityGetDefault with default headers values +func NewCacheServiceMetricsRowCapacityGetDefault(code int) *CacheServiceMetricsRowCapacityGetDefault { + return &CacheServiceMetricsRowCapacityGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowCapacityGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowCapacityGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row capacity get default response +func (o *CacheServiceMetricsRowCapacityGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowCapacityGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowCapacityGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowCapacityGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_parameters.go new file mode 100644 index 00000000000..7bd74511c87 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowEntriesGetParams creates a new CacheServiceMetricsRowEntriesGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowEntriesGetParams() *CacheServiceMetricsRowEntriesGetParams { + + return &CacheServiceMetricsRowEntriesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowEntriesGetParamsWithTimeout creates a new CacheServiceMetricsRowEntriesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowEntriesGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowEntriesGetParams { + + return &CacheServiceMetricsRowEntriesGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowEntriesGetParamsWithContext creates a new CacheServiceMetricsRowEntriesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowEntriesGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowEntriesGetParams { + + return &CacheServiceMetricsRowEntriesGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowEntriesGetParamsWithHTTPClient creates a new CacheServiceMetricsRowEntriesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowEntriesGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowEntriesGetParams { + + return &CacheServiceMetricsRowEntriesGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowEntriesGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row entries get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowEntriesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowEntriesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowEntriesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowEntriesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row entries get params +func (o *CacheServiceMetricsRowEntriesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowEntriesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_responses.go new file mode 100644 index 00000000000..bdf862a1658 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_entries_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowEntriesGetReader is a Reader for the CacheServiceMetricsRowEntriesGet structure. +type CacheServiceMetricsRowEntriesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowEntriesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowEntriesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowEntriesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowEntriesGetOK creates a CacheServiceMetricsRowEntriesGetOK with default headers values +func NewCacheServiceMetricsRowEntriesGetOK() *CacheServiceMetricsRowEntriesGetOK { + return &CacheServiceMetricsRowEntriesGetOK{} +} + +/*CacheServiceMetricsRowEntriesGetOK handles this case with default header values. + +CacheServiceMetricsRowEntriesGetOK cache service metrics row entries get o k +*/ +type CacheServiceMetricsRowEntriesGetOK struct { + Payload int32 +} + +func (o *CacheServiceMetricsRowEntriesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceMetricsRowEntriesGetOK) 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 +} + +// NewCacheServiceMetricsRowEntriesGetDefault creates a CacheServiceMetricsRowEntriesGetDefault with default headers values +func NewCacheServiceMetricsRowEntriesGetDefault(code int) *CacheServiceMetricsRowEntriesGetDefault { + return &CacheServiceMetricsRowEntriesGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowEntriesGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowEntriesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row entries get default response +func (o *CacheServiceMetricsRowEntriesGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowEntriesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowEntriesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowEntriesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_parameters.go new file mode 100644 index 00000000000..fc9f17031cc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowHitRateGetParams creates a new CacheServiceMetricsRowHitRateGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowHitRateGetParams() *CacheServiceMetricsRowHitRateGetParams { + + return &CacheServiceMetricsRowHitRateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowHitRateGetParamsWithTimeout creates a new CacheServiceMetricsRowHitRateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowHitRateGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitRateGetParams { + + return &CacheServiceMetricsRowHitRateGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowHitRateGetParamsWithContext creates a new CacheServiceMetricsRowHitRateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowHitRateGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowHitRateGetParams { + + return &CacheServiceMetricsRowHitRateGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowHitRateGetParamsWithHTTPClient creates a new CacheServiceMetricsRowHitRateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowHitRateGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitRateGetParams { + + return &CacheServiceMetricsRowHitRateGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowHitRateGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row hit rate get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowHitRateGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitRateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowHitRateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitRateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row hit rate get params +func (o *CacheServiceMetricsRowHitRateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowHitRateGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_responses.go new file mode 100644 index 00000000000..60be90938e0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hit_rate_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowHitRateGetReader is a Reader for the CacheServiceMetricsRowHitRateGet structure. +type CacheServiceMetricsRowHitRateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowHitRateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowHitRateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowHitRateGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowHitRateGetOK creates a CacheServiceMetricsRowHitRateGetOK with default headers values +func NewCacheServiceMetricsRowHitRateGetOK() *CacheServiceMetricsRowHitRateGetOK { + return &CacheServiceMetricsRowHitRateGetOK{} +} + +/*CacheServiceMetricsRowHitRateGetOK handles this case with default header values. + +CacheServiceMetricsRowHitRateGetOK cache service metrics row hit rate get o k +*/ +type CacheServiceMetricsRowHitRateGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsRowHitRateGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitRateGetOK) 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 +} + +// NewCacheServiceMetricsRowHitRateGetDefault creates a CacheServiceMetricsRowHitRateGetDefault with default headers values +func NewCacheServiceMetricsRowHitRateGetDefault(code int) *CacheServiceMetricsRowHitRateGetDefault { + return &CacheServiceMetricsRowHitRateGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowHitRateGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowHitRateGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row hit rate get default response +func (o *CacheServiceMetricsRowHitRateGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowHitRateGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitRateGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowHitRateGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_parameters.go new file mode 100644 index 00000000000..1acf29d3e3c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowHitsGetParams creates a new CacheServiceMetricsRowHitsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowHitsGetParams() *CacheServiceMetricsRowHitsGetParams { + + return &CacheServiceMetricsRowHitsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowHitsGetParamsWithTimeout creates a new CacheServiceMetricsRowHitsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowHitsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitsGetParams { + + return &CacheServiceMetricsRowHitsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowHitsGetParamsWithContext creates a new CacheServiceMetricsRowHitsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowHitsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowHitsGetParams { + + return &CacheServiceMetricsRowHitsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowHitsGetParamsWithHTTPClient creates a new CacheServiceMetricsRowHitsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowHitsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitsGetParams { + + return &CacheServiceMetricsRowHitsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowHitsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row hits get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowHitsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowHitsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row hits get params +func (o *CacheServiceMetricsRowHitsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowHitsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_responses.go new file mode 100644 index 00000000000..1384208cde1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowHitsGetReader is a Reader for the CacheServiceMetricsRowHitsGet structure. +type CacheServiceMetricsRowHitsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowHitsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowHitsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowHitsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowHitsGetOK creates a CacheServiceMetricsRowHitsGetOK with default headers values +func NewCacheServiceMetricsRowHitsGetOK() *CacheServiceMetricsRowHitsGetOK { + return &CacheServiceMetricsRowHitsGetOK{} +} + +/*CacheServiceMetricsRowHitsGetOK handles this case with default header values. + +CacheServiceMetricsRowHitsGetOK cache service metrics row hits get o k +*/ +type CacheServiceMetricsRowHitsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsRowHitsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitsGetOK) 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 +} + +// NewCacheServiceMetricsRowHitsGetDefault creates a CacheServiceMetricsRowHitsGetDefault with default headers values +func NewCacheServiceMetricsRowHitsGetDefault(code int) *CacheServiceMetricsRowHitsGetDefault { + return &CacheServiceMetricsRowHitsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowHitsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowHitsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row hits get default response +func (o *CacheServiceMetricsRowHitsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowHitsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowHitsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..18afd0fd65b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowHitsMovingAvrageGetParams creates a new CacheServiceMetricsRowHitsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowHitsMovingAvrageGetParams() *CacheServiceMetricsRowHitsMovingAvrageGetParams { + + return &CacheServiceMetricsRowHitsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsRowHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + + return &CacheServiceMetricsRowHitsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsRowHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + + return &CacheServiceMetricsRowHitsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsRowHitsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowHitsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + + return &CacheServiceMetricsRowHitsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowHitsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row hits moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowHitsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowHitsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row hits moving avrage get params +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowHitsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_responses.go new file mode 100644 index 00000000000..7a98d009d3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_hits_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowHitsMovingAvrageGetReader is a Reader for the CacheServiceMetricsRowHitsMovingAvrageGet structure. +type CacheServiceMetricsRowHitsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowHitsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowHitsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowHitsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowHitsMovingAvrageGetOK creates a CacheServiceMetricsRowHitsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsRowHitsMovingAvrageGetOK() *CacheServiceMetricsRowHitsMovingAvrageGetOK { + return &CacheServiceMetricsRowHitsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsRowHitsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsRowHitsMovingAvrageGetOK cache service metrics row hits moving avrage get o k +*/ +type CacheServiceMetricsRowHitsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsRowHitsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsRowHitsMovingAvrageGetDefault creates a CacheServiceMetricsRowHitsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsRowHitsMovingAvrageGetDefault(code int) *CacheServiceMetricsRowHitsMovingAvrageGetDefault { + return &CacheServiceMetricsRowHitsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowHitsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowHitsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row hits moving avrage get default response +func (o *CacheServiceMetricsRowHitsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowHitsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowHitsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowHitsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_parameters.go new file mode 100644 index 00000000000..39ec7fc852c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowRequestsGetParams creates a new CacheServiceMetricsRowRequestsGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowRequestsGetParams() *CacheServiceMetricsRowRequestsGetParams { + + return &CacheServiceMetricsRowRequestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowRequestsGetParamsWithTimeout creates a new CacheServiceMetricsRowRequestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowRequestsGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowRequestsGetParams { + + return &CacheServiceMetricsRowRequestsGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowRequestsGetParamsWithContext creates a new CacheServiceMetricsRowRequestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowRequestsGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowRequestsGetParams { + + return &CacheServiceMetricsRowRequestsGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowRequestsGetParamsWithHTTPClient creates a new CacheServiceMetricsRowRequestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowRequestsGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowRequestsGetParams { + + return &CacheServiceMetricsRowRequestsGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowRequestsGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row requests get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowRequestsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowRequestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowRequestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowRequestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row requests get params +func (o *CacheServiceMetricsRowRequestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowRequestsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_responses.go new file mode 100644 index 00000000000..7d16c2d0883 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowRequestsGetReader is a Reader for the CacheServiceMetricsRowRequestsGet structure. +type CacheServiceMetricsRowRequestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowRequestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowRequestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowRequestsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowRequestsGetOK creates a CacheServiceMetricsRowRequestsGetOK with default headers values +func NewCacheServiceMetricsRowRequestsGetOK() *CacheServiceMetricsRowRequestsGetOK { + return &CacheServiceMetricsRowRequestsGetOK{} +} + +/*CacheServiceMetricsRowRequestsGetOK handles this case with default header values. + +CacheServiceMetricsRowRequestsGetOK cache service metrics row requests get o k +*/ +type CacheServiceMetricsRowRequestsGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsRowRequestsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsRowRequestsGetOK) 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 +} + +// NewCacheServiceMetricsRowRequestsGetDefault creates a CacheServiceMetricsRowRequestsGetDefault with default headers values +func NewCacheServiceMetricsRowRequestsGetDefault(code int) *CacheServiceMetricsRowRequestsGetDefault { + return &CacheServiceMetricsRowRequestsGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowRequestsGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowRequestsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row requests get default response +func (o *CacheServiceMetricsRowRequestsGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowRequestsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowRequestsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowRequestsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_parameters.go new file mode 100644 index 00000000000..cba5fd020f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetParams creates a new CacheServiceMetricsRowRequestsMovingAvrageGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowRequestsMovingAvrageGetParams() *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsRowRequestsMovingAvrageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithTimeout creates a new CacheServiceMetricsRowRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsRowRequestsMovingAvrageGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithContext creates a new CacheServiceMetricsRowRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsRowRequestsMovingAvrageGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithHTTPClient creates a new CacheServiceMetricsRowRequestsMovingAvrageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowRequestsMovingAvrageGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + + return &CacheServiceMetricsRowRequestsMovingAvrageGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowRequestsMovingAvrageGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row requests moving avrage get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowRequestsMovingAvrageGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowRequestsMovingAvrageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row requests moving avrage get params +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_responses.go new file mode 100644 index 00000000000..c8a7daf2079 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_requests_moving_avrage_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowRequestsMovingAvrageGetReader is a Reader for the CacheServiceMetricsRowRequestsMovingAvrageGet structure. +type CacheServiceMetricsRowRequestsMovingAvrageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowRequestsMovingAvrageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowRequestsMovingAvrageGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetOK creates a CacheServiceMetricsRowRequestsMovingAvrageGetOK with default headers values +func NewCacheServiceMetricsRowRequestsMovingAvrageGetOK() *CacheServiceMetricsRowRequestsMovingAvrageGetOK { + return &CacheServiceMetricsRowRequestsMovingAvrageGetOK{} +} + +/*CacheServiceMetricsRowRequestsMovingAvrageGetOK handles this case with default header values. + +CacheServiceMetricsRowRequestsMovingAvrageGetOK cache service metrics row requests moving avrage get o k +*/ +type CacheServiceMetricsRowRequestsMovingAvrageGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCacheServiceMetricsRowRequestsMovingAvrageGetDefault creates a CacheServiceMetricsRowRequestsMovingAvrageGetDefault with default headers values +func NewCacheServiceMetricsRowRequestsMovingAvrageGetDefault(code int) *CacheServiceMetricsRowRequestsMovingAvrageGetDefault { + return &CacheServiceMetricsRowRequestsMovingAvrageGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowRequestsMovingAvrageGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowRequestsMovingAvrageGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row requests moving avrage get default response +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowRequestsMovingAvrageGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_parameters.go new file mode 100644 index 00000000000..acce4cf80e5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceMetricsRowSizeGetParams creates a new CacheServiceMetricsRowSizeGetParams object +// with the default values initialized. +func NewCacheServiceMetricsRowSizeGetParams() *CacheServiceMetricsRowSizeGetParams { + + return &CacheServiceMetricsRowSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceMetricsRowSizeGetParamsWithTimeout creates a new CacheServiceMetricsRowSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceMetricsRowSizeGetParamsWithTimeout(timeout time.Duration) *CacheServiceMetricsRowSizeGetParams { + + return &CacheServiceMetricsRowSizeGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceMetricsRowSizeGetParamsWithContext creates a new CacheServiceMetricsRowSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceMetricsRowSizeGetParamsWithContext(ctx context.Context) *CacheServiceMetricsRowSizeGetParams { + + return &CacheServiceMetricsRowSizeGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceMetricsRowSizeGetParamsWithHTTPClient creates a new CacheServiceMetricsRowSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceMetricsRowSizeGetParamsWithHTTPClient(client *http.Client) *CacheServiceMetricsRowSizeGetParams { + + return &CacheServiceMetricsRowSizeGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceMetricsRowSizeGetParams contains all the parameters to send to the API endpoint +for the cache service metrics row size get operation typically these are written to a http.Request +*/ +type CacheServiceMetricsRowSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) WithTimeout(timeout time.Duration) *CacheServiceMetricsRowSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) WithContext(ctx context.Context) *CacheServiceMetricsRowSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) WithHTTPClient(client *http.Client) *CacheServiceMetricsRowSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service metrics row size get params +func (o *CacheServiceMetricsRowSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceMetricsRowSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_responses.go new file mode 100644 index 00000000000..0da78a52368 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_metrics_row_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceMetricsRowSizeGetReader is a Reader for the CacheServiceMetricsRowSizeGet structure. +type CacheServiceMetricsRowSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceMetricsRowSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceMetricsRowSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceMetricsRowSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceMetricsRowSizeGetOK creates a CacheServiceMetricsRowSizeGetOK with default headers values +func NewCacheServiceMetricsRowSizeGetOK() *CacheServiceMetricsRowSizeGetOK { + return &CacheServiceMetricsRowSizeGetOK{} +} + +/*CacheServiceMetricsRowSizeGetOK handles this case with default header values. + +CacheServiceMetricsRowSizeGetOK cache service metrics row size get o k +*/ +type CacheServiceMetricsRowSizeGetOK struct { + Payload interface{} +} + +func (o *CacheServiceMetricsRowSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CacheServiceMetricsRowSizeGetOK) 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 +} + +// NewCacheServiceMetricsRowSizeGetDefault creates a CacheServiceMetricsRowSizeGetDefault with default headers values +func NewCacheServiceMetricsRowSizeGetDefault(code int) *CacheServiceMetricsRowSizeGetDefault { + return &CacheServiceMetricsRowSizeGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceMetricsRowSizeGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceMetricsRowSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service metrics row size get default response +func (o *CacheServiceMetricsRowSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceMetricsRowSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceMetricsRowSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceMetricsRowSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_parameters.go new file mode 100644 index 00000000000..240866d91dc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceRowCacheCapacityPostParams creates a new CacheServiceRowCacheCapacityPostParams object +// with the default values initialized. +func NewCacheServiceRowCacheCapacityPostParams() *CacheServiceRowCacheCapacityPostParams { + var () + return &CacheServiceRowCacheCapacityPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceRowCacheCapacityPostParamsWithTimeout creates a new CacheServiceRowCacheCapacityPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceRowCacheCapacityPostParamsWithTimeout(timeout time.Duration) *CacheServiceRowCacheCapacityPostParams { + var () + return &CacheServiceRowCacheCapacityPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceRowCacheCapacityPostParamsWithContext creates a new CacheServiceRowCacheCapacityPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceRowCacheCapacityPostParamsWithContext(ctx context.Context) *CacheServiceRowCacheCapacityPostParams { + var () + return &CacheServiceRowCacheCapacityPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceRowCacheCapacityPostParamsWithHTTPClient creates a new CacheServiceRowCacheCapacityPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceRowCacheCapacityPostParamsWithHTTPClient(client *http.Client) *CacheServiceRowCacheCapacityPostParams { + var () + return &CacheServiceRowCacheCapacityPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceRowCacheCapacityPostParams contains all the parameters to send to the API endpoint +for the cache service row cache capacity post operation typically these are written to a http.Request +*/ +type CacheServiceRowCacheCapacityPostParams struct { + + /*Capacity + row cache capacity in mb + + */ + Capacity string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) WithTimeout(timeout time.Duration) *CacheServiceRowCacheCapacityPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) WithContext(ctx context.Context) *CacheServiceRowCacheCapacityPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) WithHTTPClient(client *http.Client) *CacheServiceRowCacheCapacityPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCapacity adds the capacity to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) WithCapacity(capacity string) *CacheServiceRowCacheCapacityPostParams { + o.SetCapacity(capacity) + return o +} + +// SetCapacity adds the capacity to the cache service row cache capacity post params +func (o *CacheServiceRowCacheCapacityPostParams) SetCapacity(capacity string) { + o.Capacity = capacity +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceRowCacheCapacityPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param capacity + qrCapacity := o.Capacity + qCapacity := qrCapacity + if qCapacity != "" { + if err := r.SetQueryParam("capacity", qCapacity); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_responses.go new file mode 100644 index 00000000000..f2f7e1b4d94 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_capacity_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceRowCacheCapacityPostReader is a Reader for the CacheServiceRowCacheCapacityPost structure. +type CacheServiceRowCacheCapacityPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceRowCacheCapacityPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceRowCacheCapacityPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceRowCacheCapacityPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceRowCacheCapacityPostOK creates a CacheServiceRowCacheCapacityPostOK with default headers values +func NewCacheServiceRowCacheCapacityPostOK() *CacheServiceRowCacheCapacityPostOK { + return &CacheServiceRowCacheCapacityPostOK{} +} + +/*CacheServiceRowCacheCapacityPostOK handles this case with default header values. + +CacheServiceRowCacheCapacityPostOK cache service row cache capacity post o k +*/ +type CacheServiceRowCacheCapacityPostOK struct { +} + +func (o *CacheServiceRowCacheCapacityPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceRowCacheCapacityPostDefault creates a CacheServiceRowCacheCapacityPostDefault with default headers values +func NewCacheServiceRowCacheCapacityPostDefault(code int) *CacheServiceRowCacheCapacityPostDefault { + return &CacheServiceRowCacheCapacityPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceRowCacheCapacityPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceRowCacheCapacityPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service row cache capacity post default response +func (o *CacheServiceRowCacheCapacityPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceRowCacheCapacityPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceRowCacheCapacityPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceRowCacheCapacityPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_parameters.go new file mode 100644 index 00000000000..0e998a49cfd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceRowCacheKeysToSaveGetParams creates a new CacheServiceRowCacheKeysToSaveGetParams object +// with the default values initialized. +func NewCacheServiceRowCacheKeysToSaveGetParams() *CacheServiceRowCacheKeysToSaveGetParams { + + return &CacheServiceRowCacheKeysToSaveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceRowCacheKeysToSaveGetParamsWithTimeout creates a new CacheServiceRowCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceRowCacheKeysToSaveGetParamsWithTimeout(timeout time.Duration) *CacheServiceRowCacheKeysToSaveGetParams { + + return &CacheServiceRowCacheKeysToSaveGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceRowCacheKeysToSaveGetParamsWithContext creates a new CacheServiceRowCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceRowCacheKeysToSaveGetParamsWithContext(ctx context.Context) *CacheServiceRowCacheKeysToSaveGetParams { + + return &CacheServiceRowCacheKeysToSaveGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceRowCacheKeysToSaveGetParamsWithHTTPClient creates a new CacheServiceRowCacheKeysToSaveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceRowCacheKeysToSaveGetParamsWithHTTPClient(client *http.Client) *CacheServiceRowCacheKeysToSaveGetParams { + + return &CacheServiceRowCacheKeysToSaveGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceRowCacheKeysToSaveGetParams contains all the parameters to send to the API endpoint +for the cache service row cache keys to save get operation typically these are written to a http.Request +*/ +type CacheServiceRowCacheKeysToSaveGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) WithTimeout(timeout time.Duration) *CacheServiceRowCacheKeysToSaveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) WithContext(ctx context.Context) *CacheServiceRowCacheKeysToSaveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) WithHTTPClient(client *http.Client) *CacheServiceRowCacheKeysToSaveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service row cache keys to save get params +func (o *CacheServiceRowCacheKeysToSaveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceRowCacheKeysToSaveGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_responses.go new file mode 100644 index 00000000000..e3a3713403b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceRowCacheKeysToSaveGetReader is a Reader for the CacheServiceRowCacheKeysToSaveGet structure. +type CacheServiceRowCacheKeysToSaveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceRowCacheKeysToSaveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceRowCacheKeysToSaveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceRowCacheKeysToSaveGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceRowCacheKeysToSaveGetOK creates a CacheServiceRowCacheKeysToSaveGetOK with default headers values +func NewCacheServiceRowCacheKeysToSaveGetOK() *CacheServiceRowCacheKeysToSaveGetOK { + return &CacheServiceRowCacheKeysToSaveGetOK{} +} + +/*CacheServiceRowCacheKeysToSaveGetOK handles this case with default header values. + +CacheServiceRowCacheKeysToSaveGetOK cache service row cache keys to save get o k +*/ +type CacheServiceRowCacheKeysToSaveGetOK struct { + Payload int32 +} + +func (o *CacheServiceRowCacheKeysToSaveGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceRowCacheKeysToSaveGetOK) 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 +} + +// NewCacheServiceRowCacheKeysToSaveGetDefault creates a CacheServiceRowCacheKeysToSaveGetDefault with default headers values +func NewCacheServiceRowCacheKeysToSaveGetDefault(code int) *CacheServiceRowCacheKeysToSaveGetDefault { + return &CacheServiceRowCacheKeysToSaveGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceRowCacheKeysToSaveGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceRowCacheKeysToSaveGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service row cache keys to save get default response +func (o *CacheServiceRowCacheKeysToSaveGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceRowCacheKeysToSaveGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceRowCacheKeysToSaveGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceRowCacheKeysToSaveGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_parameters.go new file mode 100644 index 00000000000..0d73e21bf1a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceRowCacheKeysToSavePostParams creates a new CacheServiceRowCacheKeysToSavePostParams object +// with the default values initialized. +func NewCacheServiceRowCacheKeysToSavePostParams() *CacheServiceRowCacheKeysToSavePostParams { + var () + return &CacheServiceRowCacheKeysToSavePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceRowCacheKeysToSavePostParamsWithTimeout creates a new CacheServiceRowCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceRowCacheKeysToSavePostParamsWithTimeout(timeout time.Duration) *CacheServiceRowCacheKeysToSavePostParams { + var () + return &CacheServiceRowCacheKeysToSavePostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceRowCacheKeysToSavePostParamsWithContext creates a new CacheServiceRowCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceRowCacheKeysToSavePostParamsWithContext(ctx context.Context) *CacheServiceRowCacheKeysToSavePostParams { + var () + return &CacheServiceRowCacheKeysToSavePostParams{ + + Context: ctx, + } +} + +// NewCacheServiceRowCacheKeysToSavePostParamsWithHTTPClient creates a new CacheServiceRowCacheKeysToSavePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceRowCacheKeysToSavePostParamsWithHTTPClient(client *http.Client) *CacheServiceRowCacheKeysToSavePostParams { + var () + return &CacheServiceRowCacheKeysToSavePostParams{ + HTTPClient: client, + } +} + +/*CacheServiceRowCacheKeysToSavePostParams contains all the parameters to send to the API endpoint +for the cache service row cache keys to save post operation typically these are written to a http.Request +*/ +type CacheServiceRowCacheKeysToSavePostParams struct { + + /*Rckts + row cache keys to save + + */ + Rckts int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) WithTimeout(timeout time.Duration) *CacheServiceRowCacheKeysToSavePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) WithContext(ctx context.Context) *CacheServiceRowCacheKeysToSavePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) WithHTTPClient(client *http.Client) *CacheServiceRowCacheKeysToSavePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRckts adds the rckts to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) WithRckts(rckts int32) *CacheServiceRowCacheKeysToSavePostParams { + o.SetRckts(rckts) + return o +} + +// SetRckts adds the rckts to the cache service row cache keys to save post params +func (o *CacheServiceRowCacheKeysToSavePostParams) SetRckts(rckts int32) { + o.Rckts = rckts +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceRowCacheKeysToSavePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param rckts + qrRckts := o.Rckts + qRckts := swag.FormatInt32(qrRckts) + if qRckts != "" { + if err := r.SetQueryParam("rckts", qRckts); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_responses.go new file mode 100644 index 00000000000..2e260dc615f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_keys_to_save_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceRowCacheKeysToSavePostReader is a Reader for the CacheServiceRowCacheKeysToSavePost structure. +type CacheServiceRowCacheKeysToSavePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceRowCacheKeysToSavePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceRowCacheKeysToSavePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceRowCacheKeysToSavePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceRowCacheKeysToSavePostOK creates a CacheServiceRowCacheKeysToSavePostOK with default headers values +func NewCacheServiceRowCacheKeysToSavePostOK() *CacheServiceRowCacheKeysToSavePostOK { + return &CacheServiceRowCacheKeysToSavePostOK{} +} + +/*CacheServiceRowCacheKeysToSavePostOK handles this case with default header values. + +CacheServiceRowCacheKeysToSavePostOK cache service row cache keys to save post o k +*/ +type CacheServiceRowCacheKeysToSavePostOK struct { +} + +func (o *CacheServiceRowCacheKeysToSavePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceRowCacheKeysToSavePostDefault creates a CacheServiceRowCacheKeysToSavePostDefault with default headers values +func NewCacheServiceRowCacheKeysToSavePostDefault(code int) *CacheServiceRowCacheKeysToSavePostDefault { + return &CacheServiceRowCacheKeysToSavePostDefault{ + _statusCode: code, + } +} + +/*CacheServiceRowCacheKeysToSavePostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceRowCacheKeysToSavePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service row cache keys to save post default response +func (o *CacheServiceRowCacheKeysToSavePostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceRowCacheKeysToSavePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceRowCacheKeysToSavePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceRowCacheKeysToSavePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_parameters.go new file mode 100644 index 00000000000..a82bf0708b5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceRowCacheSavePeriodGetParams creates a new CacheServiceRowCacheSavePeriodGetParams object +// with the default values initialized. +func NewCacheServiceRowCacheSavePeriodGetParams() *CacheServiceRowCacheSavePeriodGetParams { + + return &CacheServiceRowCacheSavePeriodGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceRowCacheSavePeriodGetParamsWithTimeout creates a new CacheServiceRowCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceRowCacheSavePeriodGetParamsWithTimeout(timeout time.Duration) *CacheServiceRowCacheSavePeriodGetParams { + + return &CacheServiceRowCacheSavePeriodGetParams{ + + timeout: timeout, + } +} + +// NewCacheServiceRowCacheSavePeriodGetParamsWithContext creates a new CacheServiceRowCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceRowCacheSavePeriodGetParamsWithContext(ctx context.Context) *CacheServiceRowCacheSavePeriodGetParams { + + return &CacheServiceRowCacheSavePeriodGetParams{ + + Context: ctx, + } +} + +// NewCacheServiceRowCacheSavePeriodGetParamsWithHTTPClient creates a new CacheServiceRowCacheSavePeriodGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceRowCacheSavePeriodGetParamsWithHTTPClient(client *http.Client) *CacheServiceRowCacheSavePeriodGetParams { + + return &CacheServiceRowCacheSavePeriodGetParams{ + HTTPClient: client, + } +} + +/*CacheServiceRowCacheSavePeriodGetParams contains all the parameters to send to the API endpoint +for the cache service row cache save period get operation typically these are written to a http.Request +*/ +type CacheServiceRowCacheSavePeriodGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) WithTimeout(timeout time.Duration) *CacheServiceRowCacheSavePeriodGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) WithContext(ctx context.Context) *CacheServiceRowCacheSavePeriodGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) WithHTTPClient(client *http.Client) *CacheServiceRowCacheSavePeriodGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service row cache save period get params +func (o *CacheServiceRowCacheSavePeriodGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceRowCacheSavePeriodGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_responses.go new file mode 100644 index 00000000000..1a25ca09d6a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceRowCacheSavePeriodGetReader is a Reader for the CacheServiceRowCacheSavePeriodGet structure. +type CacheServiceRowCacheSavePeriodGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceRowCacheSavePeriodGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceRowCacheSavePeriodGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceRowCacheSavePeriodGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceRowCacheSavePeriodGetOK creates a CacheServiceRowCacheSavePeriodGetOK with default headers values +func NewCacheServiceRowCacheSavePeriodGetOK() *CacheServiceRowCacheSavePeriodGetOK { + return &CacheServiceRowCacheSavePeriodGetOK{} +} + +/*CacheServiceRowCacheSavePeriodGetOK handles this case with default header values. + +CacheServiceRowCacheSavePeriodGetOK cache service row cache save period get o k +*/ +type CacheServiceRowCacheSavePeriodGetOK struct { + Payload int32 +} + +func (o *CacheServiceRowCacheSavePeriodGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CacheServiceRowCacheSavePeriodGetOK) 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 +} + +// NewCacheServiceRowCacheSavePeriodGetDefault creates a CacheServiceRowCacheSavePeriodGetDefault with default headers values +func NewCacheServiceRowCacheSavePeriodGetDefault(code int) *CacheServiceRowCacheSavePeriodGetDefault { + return &CacheServiceRowCacheSavePeriodGetDefault{ + _statusCode: code, + } +} + +/*CacheServiceRowCacheSavePeriodGetDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceRowCacheSavePeriodGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service row cache save period get default response +func (o *CacheServiceRowCacheSavePeriodGetDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceRowCacheSavePeriodGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceRowCacheSavePeriodGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceRowCacheSavePeriodGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_parameters.go new file mode 100644 index 00000000000..be276b010a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceRowCacheSavePeriodPostParams creates a new CacheServiceRowCacheSavePeriodPostParams object +// with the default values initialized. +func NewCacheServiceRowCacheSavePeriodPostParams() *CacheServiceRowCacheSavePeriodPostParams { + var () + return &CacheServiceRowCacheSavePeriodPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceRowCacheSavePeriodPostParamsWithTimeout creates a new CacheServiceRowCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceRowCacheSavePeriodPostParamsWithTimeout(timeout time.Duration) *CacheServiceRowCacheSavePeriodPostParams { + var () + return &CacheServiceRowCacheSavePeriodPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceRowCacheSavePeriodPostParamsWithContext creates a new CacheServiceRowCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceRowCacheSavePeriodPostParamsWithContext(ctx context.Context) *CacheServiceRowCacheSavePeriodPostParams { + var () + return &CacheServiceRowCacheSavePeriodPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceRowCacheSavePeriodPostParamsWithHTTPClient creates a new CacheServiceRowCacheSavePeriodPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceRowCacheSavePeriodPostParamsWithHTTPClient(client *http.Client) *CacheServiceRowCacheSavePeriodPostParams { + var () + return &CacheServiceRowCacheSavePeriodPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceRowCacheSavePeriodPostParams contains all the parameters to send to the API endpoint +for the cache service row cache save period post operation typically these are written to a http.Request +*/ +type CacheServiceRowCacheSavePeriodPostParams struct { + + /*Period + row cache save period in seconds + + */ + Period int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) WithTimeout(timeout time.Duration) *CacheServiceRowCacheSavePeriodPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) WithContext(ctx context.Context) *CacheServiceRowCacheSavePeriodPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) WithHTTPClient(client *http.Client) *CacheServiceRowCacheSavePeriodPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeriod adds the period to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) WithPeriod(period int32) *CacheServiceRowCacheSavePeriodPostParams { + o.SetPeriod(period) + return o +} + +// SetPeriod adds the period to the cache service row cache save period post params +func (o *CacheServiceRowCacheSavePeriodPostParams) SetPeriod(period int32) { + o.Period = period +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceRowCacheSavePeriodPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param period + qrPeriod := o.Period + qPeriod := swag.FormatInt32(qrPeriod) + if qPeriod != "" { + if err := r.SetQueryParam("period", qPeriod); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_responses.go new file mode 100644 index 00000000000..8e8cf85b572 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_row_cache_save_period_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceRowCacheSavePeriodPostReader is a Reader for the CacheServiceRowCacheSavePeriodPost structure. +type CacheServiceRowCacheSavePeriodPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceRowCacheSavePeriodPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceRowCacheSavePeriodPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceRowCacheSavePeriodPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceRowCacheSavePeriodPostOK creates a CacheServiceRowCacheSavePeriodPostOK with default headers values +func NewCacheServiceRowCacheSavePeriodPostOK() *CacheServiceRowCacheSavePeriodPostOK { + return &CacheServiceRowCacheSavePeriodPostOK{} +} + +/*CacheServiceRowCacheSavePeriodPostOK handles this case with default header values. + +CacheServiceRowCacheSavePeriodPostOK cache service row cache save period post o k +*/ +type CacheServiceRowCacheSavePeriodPostOK struct { +} + +func (o *CacheServiceRowCacheSavePeriodPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceRowCacheSavePeriodPostDefault creates a CacheServiceRowCacheSavePeriodPostDefault with default headers values +func NewCacheServiceRowCacheSavePeriodPostDefault(code int) *CacheServiceRowCacheSavePeriodPostDefault { + return &CacheServiceRowCacheSavePeriodPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceRowCacheSavePeriodPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceRowCacheSavePeriodPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service row cache save period post default response +func (o *CacheServiceRowCacheSavePeriodPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceRowCacheSavePeriodPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceRowCacheSavePeriodPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceRowCacheSavePeriodPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_parameters.go new file mode 100644 index 00000000000..506c4ebf620 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCacheServiceSaveCachesPostParams creates a new CacheServiceSaveCachesPostParams object +// with the default values initialized. +func NewCacheServiceSaveCachesPostParams() *CacheServiceSaveCachesPostParams { + + return &CacheServiceSaveCachesPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCacheServiceSaveCachesPostParamsWithTimeout creates a new CacheServiceSaveCachesPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCacheServiceSaveCachesPostParamsWithTimeout(timeout time.Duration) *CacheServiceSaveCachesPostParams { + + return &CacheServiceSaveCachesPostParams{ + + timeout: timeout, + } +} + +// NewCacheServiceSaveCachesPostParamsWithContext creates a new CacheServiceSaveCachesPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCacheServiceSaveCachesPostParamsWithContext(ctx context.Context) *CacheServiceSaveCachesPostParams { + + return &CacheServiceSaveCachesPostParams{ + + Context: ctx, + } +} + +// NewCacheServiceSaveCachesPostParamsWithHTTPClient creates a new CacheServiceSaveCachesPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCacheServiceSaveCachesPostParamsWithHTTPClient(client *http.Client) *CacheServiceSaveCachesPostParams { + + return &CacheServiceSaveCachesPostParams{ + HTTPClient: client, + } +} + +/*CacheServiceSaveCachesPostParams contains all the parameters to send to the API endpoint +for the cache service save caches post operation typically these are written to a http.Request +*/ +type CacheServiceSaveCachesPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) WithTimeout(timeout time.Duration) *CacheServiceSaveCachesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) WithContext(ctx context.Context) *CacheServiceSaveCachesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) WithHTTPClient(client *http.Client) *CacheServiceSaveCachesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the cache service save caches post params +func (o *CacheServiceSaveCachesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CacheServiceSaveCachesPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_responses.go new file mode 100644 index 00000000000..72e06bf247f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/cache_service_save_caches_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CacheServiceSaveCachesPostReader is a Reader for the CacheServiceSaveCachesPost structure. +type CacheServiceSaveCachesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CacheServiceSaveCachesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCacheServiceSaveCachesPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCacheServiceSaveCachesPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCacheServiceSaveCachesPostOK creates a CacheServiceSaveCachesPostOK with default headers values +func NewCacheServiceSaveCachesPostOK() *CacheServiceSaveCachesPostOK { + return &CacheServiceSaveCachesPostOK{} +} + +/*CacheServiceSaveCachesPostOK handles this case with default header values. + +CacheServiceSaveCachesPostOK cache service save caches post o k +*/ +type CacheServiceSaveCachesPostOK struct { +} + +func (o *CacheServiceSaveCachesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCacheServiceSaveCachesPostDefault creates a CacheServiceSaveCachesPostDefault with default headers values +func NewCacheServiceSaveCachesPostDefault(code int) *CacheServiceSaveCachesPostDefault { + return &CacheServiceSaveCachesPostDefault{ + _statusCode: code, + } +} + +/*CacheServiceSaveCachesPostDefault handles this case with default header values. + +internal server error +*/ +type CacheServiceSaveCachesPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the cache service save caches post default response +func (o *CacheServiceSaveCachesPostDefault) Code() int { + return o._statusCode +} + +func (o *CacheServiceSaveCachesPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CacheServiceSaveCachesPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CacheServiceSaveCachesPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_parameters.go new file mode 100644 index 00000000000..008b031bd8e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_parameters.go @@ -0,0 +1,225 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCollectdByPluginidGetParams creates a new CollectdByPluginidGetParams object +// with the default values initialized. +func NewCollectdByPluginidGetParams() *CollectdByPluginidGetParams { + var () + return &CollectdByPluginidGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCollectdByPluginidGetParamsWithTimeout creates a new CollectdByPluginidGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCollectdByPluginidGetParamsWithTimeout(timeout time.Duration) *CollectdByPluginidGetParams { + var () + return &CollectdByPluginidGetParams{ + + timeout: timeout, + } +} + +// NewCollectdByPluginidGetParamsWithContext creates a new CollectdByPluginidGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCollectdByPluginidGetParamsWithContext(ctx context.Context) *CollectdByPluginidGetParams { + var () + return &CollectdByPluginidGetParams{ + + Context: ctx, + } +} + +// NewCollectdByPluginidGetParamsWithHTTPClient creates a new CollectdByPluginidGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCollectdByPluginidGetParamsWithHTTPClient(client *http.Client) *CollectdByPluginidGetParams { + var () + return &CollectdByPluginidGetParams{ + HTTPClient: client, + } +} + +/*CollectdByPluginidGetParams contains all the parameters to send to the API endpoint +for the collectd by pluginid get operation typically these are written to a http.Request +*/ +type CollectdByPluginidGetParams struct { + + /*Instance + The plugin instance + + */ + Instance *string + /*Pluginid + The plugin ID + + */ + Pluginid string + /*Type + The plugin type + + */ + Type string + /*TypeInstance + The plugin type instance + + */ + TypeInstance *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithTimeout(timeout time.Duration) *CollectdByPluginidGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithContext(ctx context.Context) *CollectdByPluginidGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithHTTPClient(client *http.Client) *CollectdByPluginidGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInstance adds the instance to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithInstance(instance *string) *CollectdByPluginidGetParams { + o.SetInstance(instance) + return o +} + +// SetInstance adds the instance to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetInstance(instance *string) { + o.Instance = instance +} + +// WithPluginid adds the pluginid to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithPluginid(pluginid string) *CollectdByPluginidGetParams { + o.SetPluginid(pluginid) + return o +} + +// SetPluginid adds the pluginid to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetPluginid(pluginid string) { + o.Pluginid = pluginid +} + +// WithType adds the typeVar to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithType(typeVar string) *CollectdByPluginidGetParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetType(typeVar string) { + o.Type = typeVar +} + +// WithTypeInstance adds the typeInstance to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) WithTypeInstance(typeInstance *string) *CollectdByPluginidGetParams { + o.SetTypeInstance(typeInstance) + return o +} + +// SetTypeInstance adds the typeInstance to the collectd by pluginid get params +func (o *CollectdByPluginidGetParams) SetTypeInstance(typeInstance *string) { + o.TypeInstance = typeInstance +} + +// WriteToRequest writes these params to a swagger request +func (o *CollectdByPluginidGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Instance != nil { + + // query param instance + var qrInstance string + if o.Instance != nil { + qrInstance = *o.Instance + } + qInstance := qrInstance + if qInstance != "" { + if err := r.SetQueryParam("instance", qInstance); err != nil { + return err + } + } + + } + + // path param pluginid + if err := r.SetPathParam("pluginid", o.Pluginid); err != nil { + return err + } + + // query param type + qrType := o.Type + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + if o.TypeInstance != nil { + + // query param type_instance + var qrTypeInstance string + if o.TypeInstance != nil { + qrTypeInstance = *o.TypeInstance + } + qTypeInstance := qrTypeInstance + if qTypeInstance != "" { + if err := r.SetQueryParam("type_instance", qTypeInstance); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_responses.go new file mode 100644 index 00000000000..d0e7e261839 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CollectdByPluginidGetReader is a Reader for the CollectdByPluginidGet structure. +type CollectdByPluginidGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CollectdByPluginidGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCollectdByPluginidGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCollectdByPluginidGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCollectdByPluginidGetOK creates a CollectdByPluginidGetOK with default headers values +func NewCollectdByPluginidGetOK() *CollectdByPluginidGetOK { + return &CollectdByPluginidGetOK{} +} + +/*CollectdByPluginidGetOK handles this case with default header values. + +CollectdByPluginidGetOK collectd by pluginid get o k +*/ +type CollectdByPluginidGetOK struct { + Payload []*models.CollectdValue +} + +func (o *CollectdByPluginidGetOK) GetPayload() []*models.CollectdValue { + return o.Payload +} + +func (o *CollectdByPluginidGetOK) 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 +} + +// NewCollectdByPluginidGetDefault creates a CollectdByPluginidGetDefault with default headers values +func NewCollectdByPluginidGetDefault(code int) *CollectdByPluginidGetDefault { + return &CollectdByPluginidGetDefault{ + _statusCode: code, + } +} + +/*CollectdByPluginidGetDefault handles this case with default header values. + +internal server error +*/ +type CollectdByPluginidGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the collectd by pluginid get default response +func (o *CollectdByPluginidGetDefault) Code() int { + return o._statusCode +} + +func (o *CollectdByPluginidGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CollectdByPluginidGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CollectdByPluginidGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_parameters.go new file mode 100644 index 00000000000..4f06f2d8a2e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_parameters.go @@ -0,0 +1,265 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCollectdByPluginidPostParams creates a new CollectdByPluginidPostParams object +// with the default values initialized. +func NewCollectdByPluginidPostParams() *CollectdByPluginidPostParams { + var () + return &CollectdByPluginidPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCollectdByPluginidPostParamsWithTimeout creates a new CollectdByPluginidPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCollectdByPluginidPostParamsWithTimeout(timeout time.Duration) *CollectdByPluginidPostParams { + var () + return &CollectdByPluginidPostParams{ + + timeout: timeout, + } +} + +// NewCollectdByPluginidPostParamsWithContext creates a new CollectdByPluginidPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCollectdByPluginidPostParamsWithContext(ctx context.Context) *CollectdByPluginidPostParams { + var () + return &CollectdByPluginidPostParams{ + + Context: ctx, + } +} + +// NewCollectdByPluginidPostParamsWithHTTPClient creates a new CollectdByPluginidPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCollectdByPluginidPostParamsWithHTTPClient(client *http.Client) *CollectdByPluginidPostParams { + var () + return &CollectdByPluginidPostParams{ + HTTPClient: client, + } +} + +/*CollectdByPluginidPostParams contains all the parameters to send to the API endpoint +for the collectd by pluginid post operation typically these are written to a http.Request +*/ +type CollectdByPluginidPostParams struct { + + /*Enable + set to true to enable all, anything else or omit to disable + + */ + Enable *bool + /*Instance + The plugin instance typically #CPU indicating per CPU metric. Regex are supported. Omit for all + + */ + Instance *string + /*Pluginid + The plugin ID, describe the component the metric belongs to. Examples are cache, thrift, etc'. Regex are supported.The plugin ID, describe the component the metric belong to. Examples are: cache, thrift etc'. regex are supported + + */ + Pluginid string + /*Type + The plugin type, the type of the information. Examples are total_operations, bytes, total_operations, etc'. Regex are supported. Omit for all + + */ + Type *string + /*TypeInstance + The plugin type instance, the specific metric. Exampls are total_writes, total_size, zones, etc'. Regex are supported, Omit for all + + */ + TypeInstance *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithTimeout(timeout time.Duration) *CollectdByPluginidPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithContext(ctx context.Context) *CollectdByPluginidPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithHTTPClient(client *http.Client) *CollectdByPluginidPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnable adds the enable to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithEnable(enable *bool) *CollectdByPluginidPostParams { + o.SetEnable(enable) + return o +} + +// SetEnable adds the enable to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetEnable(enable *bool) { + o.Enable = enable +} + +// WithInstance adds the instance to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithInstance(instance *string) *CollectdByPluginidPostParams { + o.SetInstance(instance) + return o +} + +// SetInstance adds the instance to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetInstance(instance *string) { + o.Instance = instance +} + +// WithPluginid adds the pluginid to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithPluginid(pluginid string) *CollectdByPluginidPostParams { + o.SetPluginid(pluginid) + return o +} + +// SetPluginid adds the pluginid to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetPluginid(pluginid string) { + o.Pluginid = pluginid +} + +// WithType adds the typeVar to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithType(typeVar *string) *CollectdByPluginidPostParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetType(typeVar *string) { + o.Type = typeVar +} + +// WithTypeInstance adds the typeInstance to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) WithTypeInstance(typeInstance *string) *CollectdByPluginidPostParams { + o.SetTypeInstance(typeInstance) + return o +} + +// SetTypeInstance adds the typeInstance to the collectd by pluginid post params +func (o *CollectdByPluginidPostParams) SetTypeInstance(typeInstance *string) { + o.TypeInstance = typeInstance +} + +// WriteToRequest writes these params to a swagger request +func (o *CollectdByPluginidPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Enable != nil { + + // query param enable + var qrEnable bool + if o.Enable != nil { + qrEnable = *o.Enable + } + qEnable := swag.FormatBool(qrEnable) + if qEnable != "" { + if err := r.SetQueryParam("enable", qEnable); err != nil { + return err + } + } + + } + + if o.Instance != nil { + + // query param instance + var qrInstance string + if o.Instance != nil { + qrInstance = *o.Instance + } + qInstance := qrInstance + if qInstance != "" { + if err := r.SetQueryParam("instance", qInstance); err != nil { + return err + } + } + + } + + // path param pluginid + if err := r.SetPathParam("pluginid", o.Pluginid); err != nil { + return err + } + + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + + if o.TypeInstance != nil { + + // query param type_instance + var qrTypeInstance string + if o.TypeInstance != nil { + qrTypeInstance = *o.TypeInstance + } + qTypeInstance := qrTypeInstance + if qTypeInstance != "" { + if err := r.SetQueryParam("type_instance", qTypeInstance); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_responses.go new file mode 100644 index 00000000000..3fc7f58b9bb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_by_pluginid_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CollectdByPluginidPostReader is a Reader for the CollectdByPluginidPost structure. +type CollectdByPluginidPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CollectdByPluginidPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCollectdByPluginidPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCollectdByPluginidPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCollectdByPluginidPostOK creates a CollectdByPluginidPostOK with default headers values +func NewCollectdByPluginidPostOK() *CollectdByPluginidPostOK { + return &CollectdByPluginidPostOK{} +} + +/*CollectdByPluginidPostOK handles this case with default header values. + +CollectdByPluginidPostOK collectd by pluginid post o k +*/ +type CollectdByPluginidPostOK struct { +} + +func (o *CollectdByPluginidPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCollectdByPluginidPostDefault creates a CollectdByPluginidPostDefault with default headers values +func NewCollectdByPluginidPostDefault(code int) *CollectdByPluginidPostDefault { + return &CollectdByPluginidPostDefault{ + _statusCode: code, + } +} + +/*CollectdByPluginidPostDefault handles this case with default header values. + +internal server error +*/ +type CollectdByPluginidPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the collectd by pluginid post default response +func (o *CollectdByPluginidPostDefault) Code() int { + return o._statusCode +} + +func (o *CollectdByPluginidPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CollectdByPluginidPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CollectdByPluginidPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_parameters.go new file mode 100644 index 00000000000..1cdd1f8066c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCollectdGetParams creates a new CollectdGetParams object +// with the default values initialized. +func NewCollectdGetParams() *CollectdGetParams { + + return &CollectdGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCollectdGetParamsWithTimeout creates a new CollectdGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCollectdGetParamsWithTimeout(timeout time.Duration) *CollectdGetParams { + + return &CollectdGetParams{ + + timeout: timeout, + } +} + +// NewCollectdGetParamsWithContext creates a new CollectdGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCollectdGetParamsWithContext(ctx context.Context) *CollectdGetParams { + + return &CollectdGetParams{ + + Context: ctx, + } +} + +// NewCollectdGetParamsWithHTTPClient creates a new CollectdGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCollectdGetParamsWithHTTPClient(client *http.Client) *CollectdGetParams { + + return &CollectdGetParams{ + HTTPClient: client, + } +} + +/*CollectdGetParams contains all the parameters to send to the API endpoint +for the collectd get operation typically these are written to a http.Request +*/ +type CollectdGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the collectd get params +func (o *CollectdGetParams) WithTimeout(timeout time.Duration) *CollectdGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the collectd get params +func (o *CollectdGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the collectd get params +func (o *CollectdGetParams) WithContext(ctx context.Context) *CollectdGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the collectd get params +func (o *CollectdGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the collectd get params +func (o *CollectdGetParams) WithHTTPClient(client *http.Client) *CollectdGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the collectd get params +func (o *CollectdGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CollectdGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_responses.go new file mode 100644 index 00000000000..7c78b90fa3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CollectdGetReader is a Reader for the CollectdGet structure. +type CollectdGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CollectdGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCollectdGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCollectdGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCollectdGetOK creates a CollectdGetOK with default headers values +func NewCollectdGetOK() *CollectdGetOK { + return &CollectdGetOK{} +} + +/*CollectdGetOK handles this case with default header values. + +CollectdGetOK collectd get o k +*/ +type CollectdGetOK struct { + Payload []*models.CollectdMetricStatus +} + +func (o *CollectdGetOK) GetPayload() []*models.CollectdMetricStatus { + return o.Payload +} + +func (o *CollectdGetOK) 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 +} + +// NewCollectdGetDefault creates a CollectdGetDefault with default headers values +func NewCollectdGetDefault(code int) *CollectdGetDefault { + return &CollectdGetDefault{ + _statusCode: code, + } +} + +/*CollectdGetDefault handles this case with default header values. + +internal server error +*/ +type CollectdGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the collectd get default response +func (o *CollectdGetDefault) Code() int { + return o._statusCode +} + +func (o *CollectdGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CollectdGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CollectdGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_parameters.go new file mode 100644 index 00000000000..d9faa2b72e4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCollectdPostParams creates a new CollectdPostParams object +// with the default values initialized. +func NewCollectdPostParams() *CollectdPostParams { + var () + return &CollectdPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCollectdPostParamsWithTimeout creates a new CollectdPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCollectdPostParamsWithTimeout(timeout time.Duration) *CollectdPostParams { + var () + return &CollectdPostParams{ + + timeout: timeout, + } +} + +// NewCollectdPostParamsWithContext creates a new CollectdPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCollectdPostParamsWithContext(ctx context.Context) *CollectdPostParams { + var () + return &CollectdPostParams{ + + Context: ctx, + } +} + +// NewCollectdPostParamsWithHTTPClient creates a new CollectdPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCollectdPostParamsWithHTTPClient(client *http.Client) *CollectdPostParams { + var () + return &CollectdPostParams{ + HTTPClient: client, + } +} + +/*CollectdPostParams contains all the parameters to send to the API endpoint +for the collectd post operation typically these are written to a http.Request +*/ +type CollectdPostParams struct { + + /*Enable + set to true to enable all, anything else or omit to disable + + */ + Enable *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the collectd post params +func (o *CollectdPostParams) WithTimeout(timeout time.Duration) *CollectdPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the collectd post params +func (o *CollectdPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the collectd post params +func (o *CollectdPostParams) WithContext(ctx context.Context) *CollectdPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the collectd post params +func (o *CollectdPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the collectd post params +func (o *CollectdPostParams) WithHTTPClient(client *http.Client) *CollectdPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the collectd post params +func (o *CollectdPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnable adds the enable to the collectd post params +func (o *CollectdPostParams) WithEnable(enable *bool) *CollectdPostParams { + o.SetEnable(enable) + return o +} + +// SetEnable adds the enable to the collectd post params +func (o *CollectdPostParams) SetEnable(enable *bool) { + o.Enable = enable +} + +// WriteToRequest writes these params to a swagger request +func (o *CollectdPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Enable != nil { + + // query param enable + var qrEnable bool + if o.Enable != nil { + qrEnable = *o.Enable + } + qEnable := swag.FormatBool(qrEnable) + if qEnable != "" { + if err := r.SetQueryParam("enable", qEnable); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_responses.go new file mode 100644 index 00000000000..847968841a5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/collectd_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CollectdPostReader is a Reader for the CollectdPost structure. +type CollectdPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CollectdPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCollectdPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCollectdPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCollectdPostOK creates a CollectdPostOK with default headers values +func NewCollectdPostOK() *CollectdPostOK { + return &CollectdPostOK{} +} + +/*CollectdPostOK handles this case with default header values. + +CollectdPostOK collectd post o k +*/ +type CollectdPostOK struct { +} + +func (o *CollectdPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCollectdPostDefault creates a CollectdPostDefault with default headers values +func NewCollectdPostDefault(code int) *CollectdPostDefault { + return &CollectdPostDefault{ + _statusCode: code, + } +} + +/*CollectdPostDefault handles this case with default header values. + +internal server error +*/ +type CollectdPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the collectd post default response +func (o *CollectdPostDefault) Code() int { + return o._statusCode +} + +func (o *CollectdPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CollectdPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CollectdPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_parameters.go new file mode 100644 index 00000000000..fe1fec917f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyAutocompactionByNameGetParams creates a new ColumnFamilyAutocompactionByNameGetParams object +// with the default values initialized. +func NewColumnFamilyAutocompactionByNameGetParams() *ColumnFamilyAutocompactionByNameGetParams { + var () + return &ColumnFamilyAutocompactionByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyAutocompactionByNameGetParamsWithTimeout creates a new ColumnFamilyAutocompactionByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyAutocompactionByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyAutocompactionByNameGetParams { + var () + return &ColumnFamilyAutocompactionByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyAutocompactionByNameGetParamsWithContext creates a new ColumnFamilyAutocompactionByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyAutocompactionByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyAutocompactionByNameGetParams { + var () + return &ColumnFamilyAutocompactionByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyAutocompactionByNameGetParamsWithHTTPClient creates a new ColumnFamilyAutocompactionByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyAutocompactionByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyAutocompactionByNameGetParams { + var () + return &ColumnFamilyAutocompactionByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyAutocompactionByNameGetParams contains all the parameters to send to the API endpoint +for the column family autocompaction by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyAutocompactionByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyAutocompactionByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyAutocompactionByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyAutocompactionByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) WithName(name string) *ColumnFamilyAutocompactionByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family autocompaction by name get params +func (o *ColumnFamilyAutocompactionByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyAutocompactionByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_responses.go new file mode 100644 index 00000000000..6026d95b909 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_autocompaction_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyAutocompactionByNameGetReader is a Reader for the ColumnFamilyAutocompactionByNameGet structure. +type ColumnFamilyAutocompactionByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyAutocompactionByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyAutocompactionByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyAutocompactionByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyAutocompactionByNameGetOK creates a ColumnFamilyAutocompactionByNameGetOK with default headers values +func NewColumnFamilyAutocompactionByNameGetOK() *ColumnFamilyAutocompactionByNameGetOK { + return &ColumnFamilyAutocompactionByNameGetOK{} +} + +/*ColumnFamilyAutocompactionByNameGetOK handles this case with default header values. + +ColumnFamilyAutocompactionByNameGetOK column family autocompaction by name get o k +*/ +type ColumnFamilyAutocompactionByNameGetOK struct { + Payload bool +} + +func (o *ColumnFamilyAutocompactionByNameGetOK) GetPayload() bool { + return o.Payload +} + +func (o *ColumnFamilyAutocompactionByNameGetOK) 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 +} + +// NewColumnFamilyAutocompactionByNameGetDefault creates a ColumnFamilyAutocompactionByNameGetDefault with default headers values +func NewColumnFamilyAutocompactionByNameGetDefault(code int) *ColumnFamilyAutocompactionByNameGetDefault { + return &ColumnFamilyAutocompactionByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyAutocompactionByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyAutocompactionByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family autocompaction by name get default response +func (o *ColumnFamilyAutocompactionByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyAutocompactionByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyAutocompactionByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyAutocompactionByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_parameters.go new file mode 100644 index 00000000000..fa1bd727f05 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyBuiltIndexesByNameGetParams creates a new ColumnFamilyBuiltIndexesByNameGetParams object +// with the default values initialized. +func NewColumnFamilyBuiltIndexesByNameGetParams() *ColumnFamilyBuiltIndexesByNameGetParams { + var () + return &ColumnFamilyBuiltIndexesByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyBuiltIndexesByNameGetParamsWithTimeout creates a new ColumnFamilyBuiltIndexesByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyBuiltIndexesByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyBuiltIndexesByNameGetParams { + var () + return &ColumnFamilyBuiltIndexesByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyBuiltIndexesByNameGetParamsWithContext creates a new ColumnFamilyBuiltIndexesByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyBuiltIndexesByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyBuiltIndexesByNameGetParams { + var () + return &ColumnFamilyBuiltIndexesByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyBuiltIndexesByNameGetParamsWithHTTPClient creates a new ColumnFamilyBuiltIndexesByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyBuiltIndexesByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyBuiltIndexesByNameGetParams { + var () + return &ColumnFamilyBuiltIndexesByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyBuiltIndexesByNameGetParams contains all the parameters to send to the API endpoint +for the column family built indexes by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyBuiltIndexesByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyBuiltIndexesByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyBuiltIndexesByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyBuiltIndexesByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) WithName(name string) *ColumnFamilyBuiltIndexesByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family built indexes by name get params +func (o *ColumnFamilyBuiltIndexesByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyBuiltIndexesByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_responses.go new file mode 100644 index 00000000000..8da0269e154 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_built_indexes_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyBuiltIndexesByNameGetReader is a Reader for the ColumnFamilyBuiltIndexesByNameGet structure. +type ColumnFamilyBuiltIndexesByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyBuiltIndexesByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyBuiltIndexesByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyBuiltIndexesByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyBuiltIndexesByNameGetOK creates a ColumnFamilyBuiltIndexesByNameGetOK with default headers values +func NewColumnFamilyBuiltIndexesByNameGetOK() *ColumnFamilyBuiltIndexesByNameGetOK { + return &ColumnFamilyBuiltIndexesByNameGetOK{} +} + +/*ColumnFamilyBuiltIndexesByNameGetOK handles this case with default header values. + +ColumnFamilyBuiltIndexesByNameGetOK column family built indexes by name get o k +*/ +type ColumnFamilyBuiltIndexesByNameGetOK struct { + Payload []string +} + +func (o *ColumnFamilyBuiltIndexesByNameGetOK) GetPayload() []string { + return o.Payload +} + +func (o *ColumnFamilyBuiltIndexesByNameGetOK) 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 +} + +// NewColumnFamilyBuiltIndexesByNameGetDefault creates a ColumnFamilyBuiltIndexesByNameGetDefault with default headers values +func NewColumnFamilyBuiltIndexesByNameGetDefault(code int) *ColumnFamilyBuiltIndexesByNameGetDefault { + return &ColumnFamilyBuiltIndexesByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyBuiltIndexesByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyBuiltIndexesByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family built indexes by name get default response +func (o *ColumnFamilyBuiltIndexesByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyBuiltIndexesByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyBuiltIndexesByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyBuiltIndexesByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_parameters.go new file mode 100644 index 00000000000..c1e8aa08b3a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_parameters.go @@ -0,0 +1,187 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCompactionByNamePostParams creates a new ColumnFamilyCompactionByNamePostParams object +// with the default values initialized. +func NewColumnFamilyCompactionByNamePostParams() *ColumnFamilyCompactionByNamePostParams { + var () + return &ColumnFamilyCompactionByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCompactionByNamePostParamsWithTimeout creates a new ColumnFamilyCompactionByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCompactionByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyCompactionByNamePostParams { + var () + return &ColumnFamilyCompactionByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCompactionByNamePostParamsWithContext creates a new ColumnFamilyCompactionByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCompactionByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyCompactionByNamePostParams { + var () + return &ColumnFamilyCompactionByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCompactionByNamePostParamsWithHTTPClient creates a new ColumnFamilyCompactionByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCompactionByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyCompactionByNamePostParams { + var () + return &ColumnFamilyCompactionByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCompactionByNamePostParams contains all the parameters to send to the API endpoint +for the column family compaction by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyCompactionByNamePostParams struct { + + /*Maximum + The maximum number of sstables in queue before compaction kicks off + + */ + Maximum int32 + /*Minimum + The minimum number of sstables in queue before compaction kicks off + + */ + Minimum int32 + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyCompactionByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyCompactionByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyCompactionByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithMaximum adds the maximum to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithMaximum(maximum int32) *ColumnFamilyCompactionByNamePostParams { + o.SetMaximum(maximum) + return o +} + +// SetMaximum adds the maximum to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetMaximum(maximum int32) { + o.Maximum = maximum +} + +// WithMinimum adds the minimum to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithMinimum(minimum int32) *ColumnFamilyCompactionByNamePostParams { + o.SetMinimum(minimum) + return o +} + +// SetMinimum adds the minimum to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetMinimum(minimum int32) { + o.Minimum = minimum +} + +// WithName adds the name to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) WithName(name string) *ColumnFamilyCompactionByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family compaction by name post params +func (o *ColumnFamilyCompactionByNamePostParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCompactionByNamePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param maximum + qrMaximum := o.Maximum + qMaximum := swag.FormatInt32(qrMaximum) + if qMaximum != "" { + if err := r.SetQueryParam("maximum", qMaximum); err != nil { + return err + } + } + + // query param minimum + qrMinimum := o.Minimum + qMinimum := swag.FormatInt32(qrMinimum) + if qMinimum != "" { + if err := r.SetQueryParam("minimum", qMinimum); 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_responses.go new file mode 100644 index 00000000000..d25cd060e12 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_by_name_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCompactionByNamePostReader is a Reader for the ColumnFamilyCompactionByNamePost structure. +type ColumnFamilyCompactionByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCompactionByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCompactionByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCompactionByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCompactionByNamePostOK creates a ColumnFamilyCompactionByNamePostOK with default headers values +func NewColumnFamilyCompactionByNamePostOK() *ColumnFamilyCompactionByNamePostOK { + return &ColumnFamilyCompactionByNamePostOK{} +} + +/*ColumnFamilyCompactionByNamePostOK handles this case with default header values. + +ColumnFamilyCompactionByNamePostOK column family compaction by name post o k +*/ +type ColumnFamilyCompactionByNamePostOK struct { + Payload string +} + +func (o *ColumnFamilyCompactionByNamePostOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyCompactionByNamePostOK) 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 +} + +// NewColumnFamilyCompactionByNamePostDefault creates a ColumnFamilyCompactionByNamePostDefault with default headers values +func NewColumnFamilyCompactionByNamePostDefault(code int) *ColumnFamilyCompactionByNamePostDefault { + return &ColumnFamilyCompactionByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCompactionByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCompactionByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family compaction by name post default response +func (o *ColumnFamilyCompactionByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCompactionByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCompactionByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCompactionByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_parameters.go new file mode 100644 index 00000000000..c336e495d23 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCompactionStrategyByNameGetParams creates a new ColumnFamilyCompactionStrategyByNameGetParams object +// with the default values initialized. +func NewColumnFamilyCompactionStrategyByNameGetParams() *ColumnFamilyCompactionStrategyByNameGetParams { + var () + return &ColumnFamilyCompactionStrategyByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCompactionStrategyByNameGetParamsWithTimeout creates a new ColumnFamilyCompactionStrategyByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCompactionStrategyByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyCompactionStrategyByNameGetParams { + var () + return &ColumnFamilyCompactionStrategyByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCompactionStrategyByNameGetParamsWithContext creates a new ColumnFamilyCompactionStrategyByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCompactionStrategyByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyCompactionStrategyByNameGetParams { + var () + return &ColumnFamilyCompactionStrategyByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCompactionStrategyByNameGetParamsWithHTTPClient creates a new ColumnFamilyCompactionStrategyByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCompactionStrategyByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyCompactionStrategyByNameGetParams { + var () + return &ColumnFamilyCompactionStrategyByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCompactionStrategyByNameGetParams contains all the parameters to send to the API endpoint +for the column family compaction strategy by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyCompactionStrategyByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyCompactionStrategyByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyCompactionStrategyByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyCompactionStrategyByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) WithName(name string) *ColumnFamilyCompactionStrategyByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family compaction strategy by name get params +func (o *ColumnFamilyCompactionStrategyByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCompactionStrategyByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_responses.go new file mode 100644 index 00000000000..28795a5a537 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCompactionStrategyByNameGetReader is a Reader for the ColumnFamilyCompactionStrategyByNameGet structure. +type ColumnFamilyCompactionStrategyByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCompactionStrategyByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCompactionStrategyByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCompactionStrategyByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCompactionStrategyByNameGetOK creates a ColumnFamilyCompactionStrategyByNameGetOK with default headers values +func NewColumnFamilyCompactionStrategyByNameGetOK() *ColumnFamilyCompactionStrategyByNameGetOK { + return &ColumnFamilyCompactionStrategyByNameGetOK{} +} + +/*ColumnFamilyCompactionStrategyByNameGetOK handles this case with default header values. + +ColumnFamilyCompactionStrategyByNameGetOK column family compaction strategy by name get o k +*/ +type ColumnFamilyCompactionStrategyByNameGetOK struct { + Payload string +} + +func (o *ColumnFamilyCompactionStrategyByNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyCompactionStrategyByNameGetOK) 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 +} + +// NewColumnFamilyCompactionStrategyByNameGetDefault creates a ColumnFamilyCompactionStrategyByNameGetDefault with default headers values +func NewColumnFamilyCompactionStrategyByNameGetDefault(code int) *ColumnFamilyCompactionStrategyByNameGetDefault { + return &ColumnFamilyCompactionStrategyByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCompactionStrategyByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCompactionStrategyByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family compaction strategy by name get default response +func (o *ColumnFamilyCompactionStrategyByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCompactionStrategyByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCompactionStrategyByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCompactionStrategyByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_parameters.go new file mode 100644 index 00000000000..256d0f63b21 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCompactionStrategyByNamePostParams creates a new ColumnFamilyCompactionStrategyByNamePostParams object +// with the default values initialized. +func NewColumnFamilyCompactionStrategyByNamePostParams() *ColumnFamilyCompactionStrategyByNamePostParams { + var () + return &ColumnFamilyCompactionStrategyByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCompactionStrategyByNamePostParamsWithTimeout creates a new ColumnFamilyCompactionStrategyByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCompactionStrategyByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyCompactionStrategyByNamePostParams { + var () + return &ColumnFamilyCompactionStrategyByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCompactionStrategyByNamePostParamsWithContext creates a new ColumnFamilyCompactionStrategyByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCompactionStrategyByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyCompactionStrategyByNamePostParams { + var () + return &ColumnFamilyCompactionStrategyByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCompactionStrategyByNamePostParamsWithHTTPClient creates a new ColumnFamilyCompactionStrategyByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCompactionStrategyByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyCompactionStrategyByNamePostParams { + var () + return &ColumnFamilyCompactionStrategyByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCompactionStrategyByNamePostParams contains all the parameters to send to the API endpoint +for the column family compaction strategy by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyCompactionStrategyByNamePostParams struct { + + /*ClassName + The class name + + */ + ClassName string + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyCompactionStrategyByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyCompactionStrategyByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyCompactionStrategyByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClassName adds the className to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WithClassName(className string) *ColumnFamilyCompactionStrategyByNamePostParams { + o.SetClassName(className) + return o +} + +// SetClassName adds the className to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) SetClassName(className string) { + o.ClassName = className +} + +// WithName adds the name to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WithName(name string) *ColumnFamilyCompactionStrategyByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family compaction strategy by name post params +func (o *ColumnFamilyCompactionStrategyByNamePostParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCompactionStrategyByNamePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param class_name + qrClassName := o.ClassName + qClassName := qrClassName + if qClassName != "" { + if err := r.SetQueryParam("class_name", qClassName); 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_responses.go new file mode 100644 index 00000000000..ffcc4a49709 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compaction_strategy_by_name_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCompactionStrategyByNamePostReader is a Reader for the ColumnFamilyCompactionStrategyByNamePost structure. +type ColumnFamilyCompactionStrategyByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCompactionStrategyByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCompactionStrategyByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCompactionStrategyByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCompactionStrategyByNamePostOK creates a ColumnFamilyCompactionStrategyByNamePostOK with default headers values +func NewColumnFamilyCompactionStrategyByNamePostOK() *ColumnFamilyCompactionStrategyByNamePostOK { + return &ColumnFamilyCompactionStrategyByNamePostOK{} +} + +/*ColumnFamilyCompactionStrategyByNamePostOK handles this case with default header values. + +ColumnFamilyCompactionStrategyByNamePostOK column family compaction strategy by name post o k +*/ +type ColumnFamilyCompactionStrategyByNamePostOK struct { +} + +func (o *ColumnFamilyCompactionStrategyByNamePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyCompactionStrategyByNamePostDefault creates a ColumnFamilyCompactionStrategyByNamePostDefault with default headers values +func NewColumnFamilyCompactionStrategyByNamePostDefault(code int) *ColumnFamilyCompactionStrategyByNamePostDefault { + return &ColumnFamilyCompactionStrategyByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCompactionStrategyByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCompactionStrategyByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family compaction strategy by name post default response +func (o *ColumnFamilyCompactionStrategyByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCompactionStrategyByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCompactionStrategyByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCompactionStrategyByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_parameters.go new file mode 100644 index 00000000000..5ff1e621754 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCompressionParametersByNameGetParams creates a new ColumnFamilyCompressionParametersByNameGetParams object +// with the default values initialized. +func NewColumnFamilyCompressionParametersByNameGetParams() *ColumnFamilyCompressionParametersByNameGetParams { + var () + return &ColumnFamilyCompressionParametersByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCompressionParametersByNameGetParamsWithTimeout creates a new ColumnFamilyCompressionParametersByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCompressionParametersByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyCompressionParametersByNameGetParams { + var () + return &ColumnFamilyCompressionParametersByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCompressionParametersByNameGetParamsWithContext creates a new ColumnFamilyCompressionParametersByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCompressionParametersByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyCompressionParametersByNameGetParams { + var () + return &ColumnFamilyCompressionParametersByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCompressionParametersByNameGetParamsWithHTTPClient creates a new ColumnFamilyCompressionParametersByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCompressionParametersByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyCompressionParametersByNameGetParams { + var () + return &ColumnFamilyCompressionParametersByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCompressionParametersByNameGetParams contains all the parameters to send to the API endpoint +for the column family compression parameters by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyCompressionParametersByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyCompressionParametersByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyCompressionParametersByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyCompressionParametersByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) WithName(name string) *ColumnFamilyCompressionParametersByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family compression parameters by name get params +func (o *ColumnFamilyCompressionParametersByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCompressionParametersByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_responses.go new file mode 100644 index 00000000000..64d77dc36b3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCompressionParametersByNameGetReader is a Reader for the ColumnFamilyCompressionParametersByNameGet structure. +type ColumnFamilyCompressionParametersByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCompressionParametersByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCompressionParametersByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCompressionParametersByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCompressionParametersByNameGetOK creates a ColumnFamilyCompressionParametersByNameGetOK with default headers values +func NewColumnFamilyCompressionParametersByNameGetOK() *ColumnFamilyCompressionParametersByNameGetOK { + return &ColumnFamilyCompressionParametersByNameGetOK{} +} + +/*ColumnFamilyCompressionParametersByNameGetOK handles this case with default header values. + +ColumnFamilyCompressionParametersByNameGetOK column family compression parameters by name get o k +*/ +type ColumnFamilyCompressionParametersByNameGetOK struct { + Payload []*models.Mapper +} + +func (o *ColumnFamilyCompressionParametersByNameGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *ColumnFamilyCompressionParametersByNameGetOK) 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 +} + +// NewColumnFamilyCompressionParametersByNameGetDefault creates a ColumnFamilyCompressionParametersByNameGetDefault with default headers values +func NewColumnFamilyCompressionParametersByNameGetDefault(code int) *ColumnFamilyCompressionParametersByNameGetDefault { + return &ColumnFamilyCompressionParametersByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCompressionParametersByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCompressionParametersByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family compression parameters by name get default response +func (o *ColumnFamilyCompressionParametersByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCompressionParametersByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCompressionParametersByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCompressionParametersByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_parameters.go new file mode 100644 index 00000000000..c7e0408c5be --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCompressionParametersByNamePostParams creates a new ColumnFamilyCompressionParametersByNamePostParams object +// with the default values initialized. +func NewColumnFamilyCompressionParametersByNamePostParams() *ColumnFamilyCompressionParametersByNamePostParams { + var () + return &ColumnFamilyCompressionParametersByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCompressionParametersByNamePostParamsWithTimeout creates a new ColumnFamilyCompressionParametersByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCompressionParametersByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyCompressionParametersByNamePostParams { + var () + return &ColumnFamilyCompressionParametersByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCompressionParametersByNamePostParamsWithContext creates a new ColumnFamilyCompressionParametersByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCompressionParametersByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyCompressionParametersByNamePostParams { + var () + return &ColumnFamilyCompressionParametersByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCompressionParametersByNamePostParamsWithHTTPClient creates a new ColumnFamilyCompressionParametersByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCompressionParametersByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyCompressionParametersByNamePostParams { + var () + return &ColumnFamilyCompressionParametersByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCompressionParametersByNamePostParams contains all the parameters to send to the API endpoint +for the column family compression parameters by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyCompressionParametersByNamePostParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + /*Opts + The options to set + + */ + Opts string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyCompressionParametersByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyCompressionParametersByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyCompressionParametersByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) WithName(name string) *ColumnFamilyCompressionParametersByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) SetName(name string) { + o.Name = name +} + +// WithOpts adds the opts to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) WithOpts(opts string) *ColumnFamilyCompressionParametersByNamePostParams { + o.SetOpts(opts) + return o +} + +// SetOpts adds the opts to the column family compression parameters by name post params +func (o *ColumnFamilyCompressionParametersByNamePostParams) SetOpts(opts string) { + o.Opts = opts +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCompressionParametersByNamePostParams) 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 + } + + // query param opts + qrOpts := o.Opts + qOpts := qrOpts + if qOpts != "" { + if err := r.SetQueryParam("opts", qOpts); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_responses.go new file mode 100644 index 00000000000..b82179dda84 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_compression_parameters_by_name_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCompressionParametersByNamePostReader is a Reader for the ColumnFamilyCompressionParametersByNamePost structure. +type ColumnFamilyCompressionParametersByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCompressionParametersByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCompressionParametersByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCompressionParametersByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCompressionParametersByNamePostOK creates a ColumnFamilyCompressionParametersByNamePostOK with default headers values +func NewColumnFamilyCompressionParametersByNamePostOK() *ColumnFamilyCompressionParametersByNamePostOK { + return &ColumnFamilyCompressionParametersByNamePostOK{} +} + +/*ColumnFamilyCompressionParametersByNamePostOK handles this case with default header values. + +ColumnFamilyCompressionParametersByNamePostOK column family compression parameters by name post o k +*/ +type ColumnFamilyCompressionParametersByNamePostOK struct { +} + +func (o *ColumnFamilyCompressionParametersByNamePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyCompressionParametersByNamePostDefault creates a ColumnFamilyCompressionParametersByNamePostDefault with default headers values +func NewColumnFamilyCompressionParametersByNamePostDefault(code int) *ColumnFamilyCompressionParametersByNamePostDefault { + return &ColumnFamilyCompressionParametersByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCompressionParametersByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCompressionParametersByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family compression parameters by name post default response +func (o *ColumnFamilyCompressionParametersByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCompressionParametersByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCompressionParametersByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCompressionParametersByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_parameters.go new file mode 100644 index 00000000000..d92af8664ad --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyCrcCheckChanceByNamePostParams creates a new ColumnFamilyCrcCheckChanceByNamePostParams object +// with the default values initialized. +func NewColumnFamilyCrcCheckChanceByNamePostParams() *ColumnFamilyCrcCheckChanceByNamePostParams { + var () + return &ColumnFamilyCrcCheckChanceByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyCrcCheckChanceByNamePostParamsWithTimeout creates a new ColumnFamilyCrcCheckChanceByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyCrcCheckChanceByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyCrcCheckChanceByNamePostParams { + var () + return &ColumnFamilyCrcCheckChanceByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyCrcCheckChanceByNamePostParamsWithContext creates a new ColumnFamilyCrcCheckChanceByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyCrcCheckChanceByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyCrcCheckChanceByNamePostParams { + var () + return &ColumnFamilyCrcCheckChanceByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyCrcCheckChanceByNamePostParamsWithHTTPClient creates a new ColumnFamilyCrcCheckChanceByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyCrcCheckChanceByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyCrcCheckChanceByNamePostParams { + var () + return &ColumnFamilyCrcCheckChanceByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyCrcCheckChanceByNamePostParams contains all the parameters to send to the API endpoint +for the column family crc check chance by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyCrcCheckChanceByNamePostParams struct { + + /*CheckChance + CRC check chance + + */ + CheckChance string + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyCrcCheckChanceByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyCrcCheckChanceByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyCrcCheckChanceByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCheckChance adds the checkChance to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WithCheckChance(checkChance string) *ColumnFamilyCrcCheckChanceByNamePostParams { + o.SetCheckChance(checkChance) + return o +} + +// SetCheckChance adds the checkChance to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) SetCheckChance(checkChance string) { + o.CheckChance = checkChance +} + +// WithName adds the name to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WithName(name string) *ColumnFamilyCrcCheckChanceByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family crc check chance by name post params +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyCrcCheckChanceByNamePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param check_chance + qrCheckChance := o.CheckChance + qCheckChance := qrCheckChance + if qCheckChance != "" { + if err := r.SetQueryParam("check_chance", qCheckChance); 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_responses.go new file mode 100644 index 00000000000..012e297e9b0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_crc_check_chance_by_name_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyCrcCheckChanceByNamePostReader is a Reader for the ColumnFamilyCrcCheckChanceByNamePost structure. +type ColumnFamilyCrcCheckChanceByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyCrcCheckChanceByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyCrcCheckChanceByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyCrcCheckChanceByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyCrcCheckChanceByNamePostOK creates a ColumnFamilyCrcCheckChanceByNamePostOK with default headers values +func NewColumnFamilyCrcCheckChanceByNamePostOK() *ColumnFamilyCrcCheckChanceByNamePostOK { + return &ColumnFamilyCrcCheckChanceByNamePostOK{} +} + +/*ColumnFamilyCrcCheckChanceByNamePostOK handles this case with default header values. + +ColumnFamilyCrcCheckChanceByNamePostOK column family crc check chance by name post o k +*/ +type ColumnFamilyCrcCheckChanceByNamePostOK struct { +} + +func (o *ColumnFamilyCrcCheckChanceByNamePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyCrcCheckChanceByNamePostDefault creates a ColumnFamilyCrcCheckChanceByNamePostDefault with default headers values +func NewColumnFamilyCrcCheckChanceByNamePostDefault(code int) *ColumnFamilyCrcCheckChanceByNamePostDefault { + return &ColumnFamilyCrcCheckChanceByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyCrcCheckChanceByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyCrcCheckChanceByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family crc check chance by name post default response +func (o *ColumnFamilyCrcCheckChanceByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyCrcCheckChanceByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyCrcCheckChanceByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyCrcCheckChanceByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_parameters.go new file mode 100644 index 00000000000..a7a3d612c76 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyDroppableRatioByNameGetParams creates a new ColumnFamilyDroppableRatioByNameGetParams object +// with the default values initialized. +func NewColumnFamilyDroppableRatioByNameGetParams() *ColumnFamilyDroppableRatioByNameGetParams { + var () + return &ColumnFamilyDroppableRatioByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyDroppableRatioByNameGetParamsWithTimeout creates a new ColumnFamilyDroppableRatioByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyDroppableRatioByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyDroppableRatioByNameGetParams { + var () + return &ColumnFamilyDroppableRatioByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyDroppableRatioByNameGetParamsWithContext creates a new ColumnFamilyDroppableRatioByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyDroppableRatioByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyDroppableRatioByNameGetParams { + var () + return &ColumnFamilyDroppableRatioByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyDroppableRatioByNameGetParamsWithHTTPClient creates a new ColumnFamilyDroppableRatioByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyDroppableRatioByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyDroppableRatioByNameGetParams { + var () + return &ColumnFamilyDroppableRatioByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyDroppableRatioByNameGetParams contains all the parameters to send to the API endpoint +for the column family droppable ratio by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyDroppableRatioByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyDroppableRatioByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyDroppableRatioByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyDroppableRatioByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) WithName(name string) *ColumnFamilyDroppableRatioByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family droppable ratio by name get params +func (o *ColumnFamilyDroppableRatioByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyDroppableRatioByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_responses.go new file mode 100644 index 00000000000..5cbdfb5a960 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_droppable_ratio_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyDroppableRatioByNameGetReader is a Reader for the ColumnFamilyDroppableRatioByNameGet structure. +type ColumnFamilyDroppableRatioByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyDroppableRatioByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyDroppableRatioByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyDroppableRatioByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyDroppableRatioByNameGetOK creates a ColumnFamilyDroppableRatioByNameGetOK with default headers values +func NewColumnFamilyDroppableRatioByNameGetOK() *ColumnFamilyDroppableRatioByNameGetOK { + return &ColumnFamilyDroppableRatioByNameGetOK{} +} + +/*ColumnFamilyDroppableRatioByNameGetOK handles this case with default header values. + +ColumnFamilyDroppableRatioByNameGetOK column family droppable ratio by name get o k +*/ +type ColumnFamilyDroppableRatioByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyDroppableRatioByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyDroppableRatioByNameGetOK) 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 +} + +// NewColumnFamilyDroppableRatioByNameGetDefault creates a ColumnFamilyDroppableRatioByNameGetDefault with default headers values +func NewColumnFamilyDroppableRatioByNameGetDefault(code int) *ColumnFamilyDroppableRatioByNameGetDefault { + return &ColumnFamilyDroppableRatioByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyDroppableRatioByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyDroppableRatioByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family droppable ratio by name get default response +func (o *ColumnFamilyDroppableRatioByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyDroppableRatioByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyDroppableRatioByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyDroppableRatioByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_parameters.go new file mode 100644 index 00000000000..3a45b070f96 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyEstimateKeysByNameGetParams creates a new ColumnFamilyEstimateKeysByNameGetParams object +// with the default values initialized. +func NewColumnFamilyEstimateKeysByNameGetParams() *ColumnFamilyEstimateKeysByNameGetParams { + var () + return &ColumnFamilyEstimateKeysByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyEstimateKeysByNameGetParamsWithTimeout creates a new ColumnFamilyEstimateKeysByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyEstimateKeysByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyEstimateKeysByNameGetParams { + var () + return &ColumnFamilyEstimateKeysByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyEstimateKeysByNameGetParamsWithContext creates a new ColumnFamilyEstimateKeysByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyEstimateKeysByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyEstimateKeysByNameGetParams { + var () + return &ColumnFamilyEstimateKeysByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyEstimateKeysByNameGetParamsWithHTTPClient creates a new ColumnFamilyEstimateKeysByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyEstimateKeysByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyEstimateKeysByNameGetParams { + var () + return &ColumnFamilyEstimateKeysByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyEstimateKeysByNameGetParams contains all the parameters to send to the API endpoint +for the column family estimate keys by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyEstimateKeysByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyEstimateKeysByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyEstimateKeysByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyEstimateKeysByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) WithName(name string) *ColumnFamilyEstimateKeysByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family estimate keys by name get params +func (o *ColumnFamilyEstimateKeysByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyEstimateKeysByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_responses.go new file mode 100644 index 00000000000..a4a28fb7943 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_estimate_keys_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyEstimateKeysByNameGetReader is a Reader for the ColumnFamilyEstimateKeysByNameGet structure. +type ColumnFamilyEstimateKeysByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyEstimateKeysByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyEstimateKeysByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyEstimateKeysByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyEstimateKeysByNameGetOK creates a ColumnFamilyEstimateKeysByNameGetOK with default headers values +func NewColumnFamilyEstimateKeysByNameGetOK() *ColumnFamilyEstimateKeysByNameGetOK { + return &ColumnFamilyEstimateKeysByNameGetOK{} +} + +/*ColumnFamilyEstimateKeysByNameGetOK handles this case with default header values. + +ColumnFamilyEstimateKeysByNameGetOK column family estimate keys by name get o k +*/ +type ColumnFamilyEstimateKeysByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyEstimateKeysByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyEstimateKeysByNameGetOK) 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 +} + +// NewColumnFamilyEstimateKeysByNameGetDefault creates a ColumnFamilyEstimateKeysByNameGetDefault with default headers values +func NewColumnFamilyEstimateKeysByNameGetDefault(code int) *ColumnFamilyEstimateKeysByNameGetDefault { + return &ColumnFamilyEstimateKeysByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyEstimateKeysByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyEstimateKeysByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family estimate keys by name get default response +func (o *ColumnFamilyEstimateKeysByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyEstimateKeysByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyEstimateKeysByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyEstimateKeysByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_parameters.go new file mode 100644 index 00000000000..8bc68add8a1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyGetParams creates a new ColumnFamilyGetParams object +// with the default values initialized. +func NewColumnFamilyGetParams() *ColumnFamilyGetParams { + + return &ColumnFamilyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyGetParamsWithTimeout creates a new ColumnFamilyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyGetParams { + + return &ColumnFamilyGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyGetParamsWithContext creates a new ColumnFamilyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyGetParamsWithContext(ctx context.Context) *ColumnFamilyGetParams { + + return &ColumnFamilyGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyGetParamsWithHTTPClient creates a new ColumnFamilyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyGetParams { + + return &ColumnFamilyGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyGetParams contains all the parameters to send to the API endpoint +for the column family get operation typically these are written to a http.Request +*/ +type ColumnFamilyGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family get params +func (o *ColumnFamilyGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family get params +func (o *ColumnFamilyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family get params +func (o *ColumnFamilyGetParams) WithContext(ctx context.Context) *ColumnFamilyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family get params +func (o *ColumnFamilyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family get params +func (o *ColumnFamilyGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family get params +func (o *ColumnFamilyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_responses.go new file mode 100644 index 00000000000..c0f32bec307 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyGetReader is a Reader for the ColumnFamilyGet structure. +type ColumnFamilyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyGetOK creates a ColumnFamilyGetOK with default headers values +func NewColumnFamilyGetOK() *ColumnFamilyGetOK { + return &ColumnFamilyGetOK{} +} + +/*ColumnFamilyGetOK handles this case with default header values. + +ColumnFamilyGetOK column family get o k +*/ +type ColumnFamilyGetOK struct { + Payload []*models.ColumnFamilyInfo +} + +func (o *ColumnFamilyGetOK) GetPayload() []*models.ColumnFamilyInfo { + return o.Payload +} + +func (o *ColumnFamilyGetOK) 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 +} + +// NewColumnFamilyGetDefault creates a ColumnFamilyGetDefault with default headers values +func NewColumnFamilyGetDefault(code int) *ColumnFamilyGetDefault { + return &ColumnFamilyGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family get default response +func (o *ColumnFamilyGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_parameters.go new file mode 100644 index 00000000000..ac87f6dd359 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyLoadSstableByNamePostParams creates a new ColumnFamilyLoadSstableByNamePostParams object +// with the default values initialized. +func NewColumnFamilyLoadSstableByNamePostParams() *ColumnFamilyLoadSstableByNamePostParams { + var () + return &ColumnFamilyLoadSstableByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyLoadSstableByNamePostParamsWithTimeout creates a new ColumnFamilyLoadSstableByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyLoadSstableByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyLoadSstableByNamePostParams { + var () + return &ColumnFamilyLoadSstableByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyLoadSstableByNamePostParamsWithContext creates a new ColumnFamilyLoadSstableByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyLoadSstableByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyLoadSstableByNamePostParams { + var () + return &ColumnFamilyLoadSstableByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyLoadSstableByNamePostParamsWithHTTPClient creates a new ColumnFamilyLoadSstableByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyLoadSstableByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyLoadSstableByNamePostParams { + var () + return &ColumnFamilyLoadSstableByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyLoadSstableByNamePostParams contains all the parameters to send to the API endpoint +for the column family load sstable by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyLoadSstableByNamePostParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyLoadSstableByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyLoadSstableByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyLoadSstableByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) WithName(name string) *ColumnFamilyLoadSstableByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family load sstable by name post params +func (o *ColumnFamilyLoadSstableByNamePostParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyLoadSstableByNamePostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_responses.go new file mode 100644 index 00000000000..20b5e71757c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_load_sstable_by_name_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyLoadSstableByNamePostReader is a Reader for the ColumnFamilyLoadSstableByNamePost structure. +type ColumnFamilyLoadSstableByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyLoadSstableByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyLoadSstableByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyLoadSstableByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyLoadSstableByNamePostOK creates a ColumnFamilyLoadSstableByNamePostOK with default headers values +func NewColumnFamilyLoadSstableByNamePostOK() *ColumnFamilyLoadSstableByNamePostOK { + return &ColumnFamilyLoadSstableByNamePostOK{} +} + +/*ColumnFamilyLoadSstableByNamePostOK handles this case with default header values. + +ColumnFamilyLoadSstableByNamePostOK column family load sstable by name post o k +*/ +type ColumnFamilyLoadSstableByNamePostOK struct { + Payload string +} + +func (o *ColumnFamilyLoadSstableByNamePostOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyLoadSstableByNamePostOK) 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 +} + +// NewColumnFamilyLoadSstableByNamePostDefault creates a ColumnFamilyLoadSstableByNamePostDefault with default headers values +func NewColumnFamilyLoadSstableByNamePostDefault(code int) *ColumnFamilyLoadSstableByNamePostDefault { + return &ColumnFamilyLoadSstableByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyLoadSstableByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyLoadSstableByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family load sstable by name post default response +func (o *ColumnFamilyLoadSstableByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyLoadSstableByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyLoadSstableByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyLoadSstableByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_parameters.go new file mode 100644 index 00000000000..cd8e82e583e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMajorCompactionByNamePostParams creates a new ColumnFamilyMajorCompactionByNamePostParams object +// with the default values initialized. +func NewColumnFamilyMajorCompactionByNamePostParams() *ColumnFamilyMajorCompactionByNamePostParams { + var () + return &ColumnFamilyMajorCompactionByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMajorCompactionByNamePostParamsWithTimeout creates a new ColumnFamilyMajorCompactionByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMajorCompactionByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyMajorCompactionByNamePostParams { + var () + return &ColumnFamilyMajorCompactionByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMajorCompactionByNamePostParamsWithContext creates a new ColumnFamilyMajorCompactionByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMajorCompactionByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyMajorCompactionByNamePostParams { + var () + return &ColumnFamilyMajorCompactionByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMajorCompactionByNamePostParamsWithHTTPClient creates a new ColumnFamilyMajorCompactionByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMajorCompactionByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyMajorCompactionByNamePostParams { + var () + return &ColumnFamilyMajorCompactionByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMajorCompactionByNamePostParams contains all the parameters to send to the API endpoint +for the column family major compaction by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyMajorCompactionByNamePostParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + /*SplitOutput + true if the output of the major compaction should be split in several sstables + + */ + SplitOutput *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyMajorCompactionByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyMajorCompactionByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyMajorCompactionByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) WithName(name string) *ColumnFamilyMajorCompactionByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) SetName(name string) { + o.Name = name +} + +// WithSplitOutput adds the splitOutput to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) WithSplitOutput(splitOutput *bool) *ColumnFamilyMajorCompactionByNamePostParams { + o.SetSplitOutput(splitOutput) + return o +} + +// SetSplitOutput adds the splitOutput to the column family major compaction by name post params +func (o *ColumnFamilyMajorCompactionByNamePostParams) SetSplitOutput(splitOutput *bool) { + o.SplitOutput = splitOutput +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMajorCompactionByNamePostParams) 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.SplitOutput != nil { + + // query param split_output + var qrSplitOutput bool + if o.SplitOutput != nil { + qrSplitOutput = *o.SplitOutput + } + qSplitOutput := swag.FormatBool(qrSplitOutput) + if qSplitOutput != "" { + if err := r.SetQueryParam("split_output", qSplitOutput); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_responses.go new file mode 100644 index 00000000000..46ca648c753 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_major_compaction_by_name_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMajorCompactionByNamePostReader is a Reader for the ColumnFamilyMajorCompactionByNamePost structure. +type ColumnFamilyMajorCompactionByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMajorCompactionByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMajorCompactionByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMajorCompactionByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMajorCompactionByNamePostOK creates a ColumnFamilyMajorCompactionByNamePostOK with default headers values +func NewColumnFamilyMajorCompactionByNamePostOK() *ColumnFamilyMajorCompactionByNamePostOK { + return &ColumnFamilyMajorCompactionByNamePostOK{} +} + +/*ColumnFamilyMajorCompactionByNamePostOK handles this case with default header values. + +ColumnFamilyMajorCompactionByNamePostOK column family major compaction by name post o k +*/ +type ColumnFamilyMajorCompactionByNamePostOK struct { + Payload string +} + +func (o *ColumnFamilyMajorCompactionByNamePostOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyMajorCompactionByNamePostOK) 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 +} + +// NewColumnFamilyMajorCompactionByNamePostDefault creates a ColumnFamilyMajorCompactionByNamePostDefault with default headers values +func NewColumnFamilyMajorCompactionByNamePostDefault(code int) *ColumnFamilyMajorCompactionByNamePostDefault { + return &ColumnFamilyMajorCompactionByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMajorCompactionByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMajorCompactionByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family major compaction by name post default response +func (o *ColumnFamilyMajorCompactionByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMajorCompactionByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMajorCompactionByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMajorCompactionByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_parameters.go new file mode 100644 index 00000000000..d99f2a4c4da --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMaximumCompactionByNameGetParams creates a new ColumnFamilyMaximumCompactionByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMaximumCompactionByNameGetParams() *ColumnFamilyMaximumCompactionByNameGetParams { + var () + return &ColumnFamilyMaximumCompactionByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMaximumCompactionByNameGetParamsWithTimeout creates a new ColumnFamilyMaximumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMaximumCompactionByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMaximumCompactionByNameGetParams { + var () + return &ColumnFamilyMaximumCompactionByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMaximumCompactionByNameGetParamsWithContext creates a new ColumnFamilyMaximumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMaximumCompactionByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMaximumCompactionByNameGetParams { + var () + return &ColumnFamilyMaximumCompactionByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMaximumCompactionByNameGetParamsWithHTTPClient creates a new ColumnFamilyMaximumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMaximumCompactionByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMaximumCompactionByNameGetParams { + var () + return &ColumnFamilyMaximumCompactionByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMaximumCompactionByNameGetParams contains all the parameters to send to the API endpoint +for the column family maximum compaction by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMaximumCompactionByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMaximumCompactionByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMaximumCompactionByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMaximumCompactionByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) WithName(name string) *ColumnFamilyMaximumCompactionByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family maximum compaction by name get params +func (o *ColumnFamilyMaximumCompactionByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMaximumCompactionByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_responses.go new file mode 100644 index 00000000000..cf19b0ee99c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMaximumCompactionByNameGetReader is a Reader for the ColumnFamilyMaximumCompactionByNameGet structure. +type ColumnFamilyMaximumCompactionByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMaximumCompactionByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMaximumCompactionByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMaximumCompactionByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMaximumCompactionByNameGetOK creates a ColumnFamilyMaximumCompactionByNameGetOK with default headers values +func NewColumnFamilyMaximumCompactionByNameGetOK() *ColumnFamilyMaximumCompactionByNameGetOK { + return &ColumnFamilyMaximumCompactionByNameGetOK{} +} + +/*ColumnFamilyMaximumCompactionByNameGetOK handles this case with default header values. + +ColumnFamilyMaximumCompactionByNameGetOK column family maximum compaction by name get o k +*/ +type ColumnFamilyMaximumCompactionByNameGetOK struct { + Payload string +} + +func (o *ColumnFamilyMaximumCompactionByNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyMaximumCompactionByNameGetOK) 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 +} + +// NewColumnFamilyMaximumCompactionByNameGetDefault creates a ColumnFamilyMaximumCompactionByNameGetDefault with default headers values +func NewColumnFamilyMaximumCompactionByNameGetDefault(code int) *ColumnFamilyMaximumCompactionByNameGetDefault { + return &ColumnFamilyMaximumCompactionByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMaximumCompactionByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMaximumCompactionByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family maximum compaction by name get default response +func (o *ColumnFamilyMaximumCompactionByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMaximumCompactionByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMaximumCompactionByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMaximumCompactionByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_parameters.go new file mode 100644 index 00000000000..357c2592175 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMaximumCompactionByNamePostParams creates a new ColumnFamilyMaximumCompactionByNamePostParams object +// with the default values initialized. +func NewColumnFamilyMaximumCompactionByNamePostParams() *ColumnFamilyMaximumCompactionByNamePostParams { + var () + return &ColumnFamilyMaximumCompactionByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMaximumCompactionByNamePostParamsWithTimeout creates a new ColumnFamilyMaximumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMaximumCompactionByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyMaximumCompactionByNamePostParams { + var () + return &ColumnFamilyMaximumCompactionByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMaximumCompactionByNamePostParamsWithContext creates a new ColumnFamilyMaximumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMaximumCompactionByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyMaximumCompactionByNamePostParams { + var () + return &ColumnFamilyMaximumCompactionByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMaximumCompactionByNamePostParamsWithHTTPClient creates a new ColumnFamilyMaximumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMaximumCompactionByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyMaximumCompactionByNamePostParams { + var () + return &ColumnFamilyMaximumCompactionByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMaximumCompactionByNamePostParams contains all the parameters to send to the API endpoint +for the column family maximum compaction by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyMaximumCompactionByNamePostParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + /*Value + The maximum number of sstables in queue before compaction kicks off + + */ + Value int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyMaximumCompactionByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyMaximumCompactionByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyMaximumCompactionByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) WithName(name string) *ColumnFamilyMaximumCompactionByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) SetName(name string) { + o.Name = name +} + +// WithValue adds the value to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) WithValue(value int32) *ColumnFamilyMaximumCompactionByNamePostParams { + o.SetValue(value) + return o +} + +// SetValue adds the value to the column family maximum compaction by name post params +func (o *ColumnFamilyMaximumCompactionByNamePostParams) SetValue(value int32) { + o.Value = value +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMaximumCompactionByNamePostParams) 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 + } + + // query param value + qrValue := o.Value + qValue := swag.FormatInt32(qrValue) + if qValue != "" { + if err := r.SetQueryParam("value", qValue); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_responses.go new file mode 100644 index 00000000000..3fe1f46fdfe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_maximum_compaction_by_name_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMaximumCompactionByNamePostReader is a Reader for the ColumnFamilyMaximumCompactionByNamePost structure. +type ColumnFamilyMaximumCompactionByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMaximumCompactionByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMaximumCompactionByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMaximumCompactionByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMaximumCompactionByNamePostOK creates a ColumnFamilyMaximumCompactionByNamePostOK with default headers values +func NewColumnFamilyMaximumCompactionByNamePostOK() *ColumnFamilyMaximumCompactionByNamePostOK { + return &ColumnFamilyMaximumCompactionByNamePostOK{} +} + +/*ColumnFamilyMaximumCompactionByNamePostOK handles this case with default header values. + +ColumnFamilyMaximumCompactionByNamePostOK column family maximum compaction by name post o k +*/ +type ColumnFamilyMaximumCompactionByNamePostOK struct { + Payload string +} + +func (o *ColumnFamilyMaximumCompactionByNamePostOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyMaximumCompactionByNamePostOK) 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 +} + +// NewColumnFamilyMaximumCompactionByNamePostDefault creates a ColumnFamilyMaximumCompactionByNamePostDefault with default headers values +func NewColumnFamilyMaximumCompactionByNamePostDefault(code int) *ColumnFamilyMaximumCompactionByNamePostDefault { + return &ColumnFamilyMaximumCompactionByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMaximumCompactionByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMaximumCompactionByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family maximum compaction by name post default response +func (o *ColumnFamilyMaximumCompactionByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMaximumCompactionByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMaximumCompactionByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMaximumCompactionByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_parameters.go new file mode 100644 index 00000000000..2dc7f18a3aa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams() *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables live data size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics all memtables live data size by name get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_responses.go new file mode 100644 index 00000000000..b0737a15fac --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGet structure. +type ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK creates a ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK() *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK { + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK column family metrics all memtables live data size by name get o k +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault creates a ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault(code int) *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault { + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables live data size by name get default response +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_parameters.go new file mode 100644 index 00000000000..22b28a4700f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams() *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables live data size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables live data size get params +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_responses.go new file mode 100644 index 00000000000..e8110cd8bf1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_live_data_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesLiveDataSizeGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesLiveDataSizeGet structure. +type ColumnFamilyMetricsAllMemtablesLiveDataSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK creates a ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK() *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK { + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK column family metrics all memtables live data size get o k +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault creates a ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault(code int) *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault { + return &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables live data size get default response +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_parameters.go new file mode 100644 index 00000000000..c467a6ebb96 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams() *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables off heap size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics all memtables off heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_responses.go new file mode 100644 index 00000000000..e752dcae3d0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGet structure. +type ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK creates a ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK() *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK { + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK column family metrics all memtables off heap size by name get o k +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault creates a ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault(code int) *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault { + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables off heap size by name get default response +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_parameters.go new file mode 100644 index 00000000000..52c1154a9e2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams() *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables off heap size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables off heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_responses.go new file mode 100644 index 00000000000..8e0160dcab5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_off_heap_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesOffHeapSizeGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesOffHeapSizeGet structure. +type ColumnFamilyMetricsAllMemtablesOffHeapSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK creates a ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK() *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK { + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK column family metrics all memtables off heap size get o k +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault creates a ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault(code int) *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault { + return &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables off heap size get default response +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_parameters.go new file mode 100644 index 00000000000..ccd4e15ff65 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams() *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables on heap size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics all memtables on heap size by name get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_responses.go new file mode 100644 index 00000000000..b15564081c9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGet structure. +type ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK creates a ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK() *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK { + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK column family metrics all memtables on heap size by name get o k +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault creates a ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault(code int) *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault { + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables on heap size by name get default response +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_parameters.go new file mode 100644 index 00000000000..6d560dd8963 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams() *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithContext creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics all memtables on heap size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics all memtables on heap size get params +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_responses.go new file mode 100644 index 00000000000..0f7552d455f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_all_memtables_on_heap_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsAllMemtablesOnHeapSizeGetReader is a Reader for the ColumnFamilyMetricsAllMemtablesOnHeapSizeGet structure. +type ColumnFamilyMetricsAllMemtablesOnHeapSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK creates a ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK with default headers values +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK() *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK { + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK{} +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK column family metrics all memtables on heap size get o k +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK) 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 +} + +// NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault creates a ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault with default headers values +func NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault(code int) *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault { + return &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics all memtables on heap size get default response +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_parameters.go new file mode 100644 index 00000000000..05861f319ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams() *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter disk space used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics bloom filter disk space used by name get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_responses.go new file mode 100644 index 00000000000..61d79fc6928 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetReader is a Reader for the ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGet structure. +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK creates a ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK() *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK { + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK column family metrics bloom filter disk space used by name get o k +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault creates a ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault(code int) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault { + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter disk space used by name get default response +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_parameters.go new file mode 100644 index 00000000000..a6d4bbce361 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams() *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter disk space used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter disk space used get params +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_responses.go new file mode 100644 index 00000000000..7f44ffebebf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_disk_space_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetReader is a Reader for the ColumnFamilyMetricsBloomFilterDiskSpaceUsedGet structure. +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK creates a ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK() *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK { + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK column family metrics bloom filter disk space used get o k +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault creates a ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault(code int) *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault { + return &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter disk space used get default response +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_parameters.go new file mode 100644 index 00000000000..e204aa50ec6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams creates a new ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams() *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter false positives by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) WithName(name string) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics bloom filter false positives by name get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_responses.go new file mode 100644 index 00000000000..186529c8663 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetReader is a Reader for the ColumnFamilyMetricsBloomFilterFalsePositivesByNameGet structure. +type ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK creates a ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK() *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK { + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK column family metrics bloom filter false positives by name get o k +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault creates a ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault(code int) *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault { + return &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter false positives by name get default response +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_parameters.go new file mode 100644 index 00000000000..caedab59740 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetParams creates a new ColumnFamilyMetricsBloomFilterFalsePositivesGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetParams() *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter false positives get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter false positives get params +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_responses.go new file mode 100644 index 00000000000..1c81d6ce170 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_positives_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterFalsePositivesGetReader is a Reader for the ColumnFamilyMetricsBloomFilterFalsePositivesGet structure. +type ColumnFamilyMetricsBloomFilterFalsePositivesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterFalsePositivesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterFalsePositivesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetOK creates a ColumnFamilyMetricsBloomFilterFalsePositivesGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetOK() *ColumnFamilyMetricsBloomFilterFalsePositivesGetOK { + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterFalsePositivesGetOK column family metrics bloom filter false positives get o k +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterFalsePositivesGetDefault creates a ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterFalsePositivesGetDefault(code int) *ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault { + return &ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter false positives get default response +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_parameters.go new file mode 100644 index 00000000000..107887b9b94 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams creates a new ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams() *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter false ratio by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) WithName(name string) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_responses.go new file mode 100644 index 00000000000..76188788aa7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterFalseRatioByNameGetReader is a Reader for the ColumnFamilyMetricsBloomFilterFalseRatioByNameGet structure. +type ColumnFamilyMetricsBloomFilterFalseRatioByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK creates a ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK() *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK { + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK column family metrics bloom filter false ratio by name get o k +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault creates a ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault(code int) *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault { + return &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter false ratio by name get default response +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_parameters.go new file mode 100644 index 00000000000..ccbcc77a47a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetParams creates a new ColumnFamilyMetricsBloomFilterFalseRatioGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterFalseRatioGetParams() *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsBloomFilterFalseRatioGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsBloomFilterFalseRatioGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsBloomFilterFalseRatioGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterFalseRatioGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsBloomFilterFalseRatioGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter false ratio get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterFalseRatioGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter false ratio get params +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_responses.go new file mode 100644 index 00000000000..efca6ab4654 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_false_ratio_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterFalseRatioGetReader is a Reader for the ColumnFamilyMetricsBloomFilterFalseRatioGet structure. +type ColumnFamilyMetricsBloomFilterFalseRatioGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterFalseRatioGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterFalseRatioGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetOK creates a ColumnFamilyMetricsBloomFilterFalseRatioGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterFalseRatioGetOK() *ColumnFamilyMetricsBloomFilterFalseRatioGetOK { + return &ColumnFamilyMetricsBloomFilterFalseRatioGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterFalseRatioGetOK column family metrics bloom filter false ratio get o k +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterFalseRatioGetDefault creates a ColumnFamilyMetricsBloomFilterFalseRatioGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterFalseRatioGetDefault(code int) *ColumnFamilyMetricsBloomFilterFalseRatioGetDefault { + return &ColumnFamilyMetricsBloomFilterFalseRatioGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterFalseRatioGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterFalseRatioGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter false ratio get default response +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterFalseRatioGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_parameters.go new file mode 100644 index 00000000000..7490deaf0d7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams() *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter off heap memory used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics bloom filter off heap memory used by name get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_responses.go new file mode 100644 index 00000000000..89f1bfb3ae5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetReader is a Reader for the ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGet structure. +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK creates a ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK() *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK { + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK column family metrics bloom filter off heap memory used by name get o k +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault creates a ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault(code int) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault { + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter off heap memory used by name get default response +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_parameters.go new file mode 100644 index 00000000000..2db00aef361 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams() *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithContext creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics bloom filter off heap memory used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics bloom filter off heap memory used get params +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_responses.go new file mode 100644 index 00000000000..c7bdce84be4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_bloom_filter_off_heap_memory_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetReader is a Reader for the ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGet structure. +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK creates a ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK with default headers values +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK() *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK { + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK{} +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK column family metrics bloom filter off heap memory used get o k +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK) 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 +} + +// NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault creates a ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault with default headers values +func NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault(code int) *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault { + return &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics bloom filter off heap memory used get default response +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_parameters.go new file mode 100644 index 00000000000..9627f323665 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasCommitByNameGetParams creates a new ColumnFamilyMetricsCasCommitByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasCommitByNameGetParams() *ColumnFamilyMetricsCasCommitByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasCommitByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasCommitByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasCommitByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasCommitByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasCommitByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasCommitByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasCommitByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasCommitByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasCommitByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasCommitByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas commit by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasCommitByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasCommitByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas commit by name get params +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasCommitByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_responses.go new file mode 100644 index 00000000000..3d6f7e13182 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasCommitByNameGetReader is a Reader for the ColumnFamilyMetricsCasCommitByNameGet structure. +type ColumnFamilyMetricsCasCommitByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasCommitByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasCommitByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasCommitByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasCommitByNameGetOK creates a ColumnFamilyMetricsCasCommitByNameGetOK with default headers values +func NewColumnFamilyMetricsCasCommitByNameGetOK() *ColumnFamilyMetricsCasCommitByNameGetOK { + return &ColumnFamilyMetricsCasCommitByNameGetOK{} +} + +/*ColumnFamilyMetricsCasCommitByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasCommitByNameGetOK column family metrics cas commit by name get o k +*/ +type ColumnFamilyMetricsCasCommitByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsCasCommitByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasCommitByNameGetOK) 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 +} + +// NewColumnFamilyMetricsCasCommitByNameGetDefault creates a ColumnFamilyMetricsCasCommitByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasCommitByNameGetDefault(code int) *ColumnFamilyMetricsCasCommitByNameGetDefault { + return &ColumnFamilyMetricsCasCommitByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasCommitByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasCommitByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas commit by name get default response +func (o *ColumnFamilyMetricsCasCommitByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasCommitByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasCommitByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasCommitByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..304a7f7851d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas commit estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas commit estimated histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..402fd923617 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK column family metrics cas commit estimated histogram by name get o k +*/ +type ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas commit estimated histogram by name get default response +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..058bfc75001 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas commit estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas commit estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..6d8b0c1ca38 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_commit_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK column family metrics cas commit estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas commit estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_parameters.go new file mode 100644 index 00000000000..d56986dab2c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasPrepareByNameGetParams creates a new ColumnFamilyMetricsCasPrepareByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasPrepareByNameGetParams() *ColumnFamilyMetricsCasPrepareByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasPrepareByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasPrepareByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasPrepareByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasPrepareByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasPrepareByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasPrepareByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasPrepareByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasPrepareByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasPrepareByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasPrepareByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas prepare by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasPrepareByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasPrepareByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas prepare by name get params +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasPrepareByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_responses.go new file mode 100644 index 00000000000..fb387198fe1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasPrepareByNameGetReader is a Reader for the ColumnFamilyMetricsCasPrepareByNameGet structure. +type ColumnFamilyMetricsCasPrepareByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasPrepareByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasPrepareByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasPrepareByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasPrepareByNameGetOK creates a ColumnFamilyMetricsCasPrepareByNameGetOK with default headers values +func NewColumnFamilyMetricsCasPrepareByNameGetOK() *ColumnFamilyMetricsCasPrepareByNameGetOK { + return &ColumnFamilyMetricsCasPrepareByNameGetOK{} +} + +/*ColumnFamilyMetricsCasPrepareByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasPrepareByNameGetOK column family metrics cas prepare by name get o k +*/ +type ColumnFamilyMetricsCasPrepareByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsCasPrepareByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasPrepareByNameGetOK) 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 +} + +// NewColumnFamilyMetricsCasPrepareByNameGetDefault creates a ColumnFamilyMetricsCasPrepareByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasPrepareByNameGetDefault(code int) *ColumnFamilyMetricsCasPrepareByNameGetDefault { + return &ColumnFamilyMetricsCasPrepareByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasPrepareByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasPrepareByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas prepare by name get default response +func (o *ColumnFamilyMetricsCasPrepareByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasPrepareByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasPrepareByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasPrepareByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..872320c7696 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas prepare estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas prepare estimated histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..883cc6dfe38 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK column family metrics cas prepare estimated histogram by name get o k +*/ +type ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas prepare estimated histogram by name get default response +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..bda3400a479 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas prepare estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas prepare estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..69752963c0f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_prepare_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK column family metrics cas prepare estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas prepare estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_parameters.go new file mode 100644 index 00000000000..7c3b73a19ea --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasProposeByNameGetParams creates a new ColumnFamilyMetricsCasProposeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasProposeByNameGetParams() *ColumnFamilyMetricsCasProposeByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasProposeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasProposeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasProposeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasProposeByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasProposeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasProposeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasProposeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasProposeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasProposeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasProposeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas propose by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasProposeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasProposeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas propose by name get params +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasProposeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_responses.go new file mode 100644 index 00000000000..39f36c9f772 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasProposeByNameGetReader is a Reader for the ColumnFamilyMetricsCasProposeByNameGet structure. +type ColumnFamilyMetricsCasProposeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasProposeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasProposeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasProposeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasProposeByNameGetOK creates a ColumnFamilyMetricsCasProposeByNameGetOK with default headers values +func NewColumnFamilyMetricsCasProposeByNameGetOK() *ColumnFamilyMetricsCasProposeByNameGetOK { + return &ColumnFamilyMetricsCasProposeByNameGetOK{} +} + +/*ColumnFamilyMetricsCasProposeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasProposeByNameGetOK column family metrics cas propose by name get o k +*/ +type ColumnFamilyMetricsCasProposeByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsCasProposeByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasProposeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsCasProposeByNameGetDefault creates a ColumnFamilyMetricsCasProposeByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasProposeByNameGetDefault(code int) *ColumnFamilyMetricsCasProposeByNameGetDefault { + return &ColumnFamilyMetricsCasProposeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasProposeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasProposeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas propose by name get default response +func (o *ColumnFamilyMetricsCasProposeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasProposeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasProposeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasProposeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..8b146ffe90d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas propose estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas propose estimated histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..b3ca718255a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK column family metrics cas propose estimated histogram by name get o k +*/ +type ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas propose estimated histogram by name get default response +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..49c35ae9c2c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics cas propose estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics cas propose estimated recent histogram by name get params +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..7269d31c5f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_cas_propose_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK column family metrics cas propose estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics cas propose estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..5619a2de284 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams creates a new ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams() *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics col update time delta histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics col update time delta histogram by name get params +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..1e1bb3cad45 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_col_update_time_delta_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGet structure. +type ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK creates a ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK() *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK { + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK column family metrics col update time delta histogram by name get o k +*/ +type ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault creates a ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault(code int) *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault { + return &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics col update time delta histogram by name get default response +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_parameters.go new file mode 100644 index 00000000000..f55d52961f1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams() *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics compression metadata off heap memory used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics compression metadata off heap memory used by name get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_responses.go new file mode 100644 index 00000000000..55b5c802391 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetReader is a Reader for the ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGet structure. +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK creates a ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK() *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK { + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK column family metrics compression metadata off heap memory used by name get o k +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault creates a ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault(code int) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault { + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics compression metadata off heap memory used by name get default response +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_parameters.go new file mode 100644 index 00000000000..2fbccb70718 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams() *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithContext creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics compression metadata off heap memory used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics compression metadata off heap memory used get params +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_responses.go new file mode 100644 index 00000000000..33c89fb71da --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_metadata_off_heap_memory_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetReader is a Reader for the ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGet structure. +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK creates a ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK with default headers values +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK() *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK { + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK{} +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK column family metrics compression metadata off heap memory used get o k +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK) 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 +} + +// NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault creates a ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault with default headers values +func NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault(code int) *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault { + return &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics compression metadata off heap memory used get default response +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_parameters.go new file mode 100644 index 00000000000..deefcd7ba09 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCompressionRatioByNameGetParams creates a new ColumnFamilyMetricsCompressionRatioByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCompressionRatioByNameGetParams() *ColumnFamilyMetricsCompressionRatioByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionRatioByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsCompressionRatioByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionRatioByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithContext creates a new ColumnFamilyMetricsCompressionRatioByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionRatioByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCompressionRatioByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCompressionRatioByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + var () + return &ColumnFamilyMetricsCompressionRatioByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCompressionRatioByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics compression ratio by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCompressionRatioByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) WithName(name string) *ColumnFamilyMetricsCompressionRatioByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics compression ratio by name get params +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCompressionRatioByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_responses.go new file mode 100644 index 00000000000..768b501e898 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCompressionRatioByNameGetReader is a Reader for the ColumnFamilyMetricsCompressionRatioByNameGet structure. +type ColumnFamilyMetricsCompressionRatioByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCompressionRatioByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCompressionRatioByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCompressionRatioByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCompressionRatioByNameGetOK creates a ColumnFamilyMetricsCompressionRatioByNameGetOK with default headers values +func NewColumnFamilyMetricsCompressionRatioByNameGetOK() *ColumnFamilyMetricsCompressionRatioByNameGetOK { + return &ColumnFamilyMetricsCompressionRatioByNameGetOK{} +} + +/*ColumnFamilyMetricsCompressionRatioByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsCompressionRatioByNameGetOK column family metrics compression ratio by name get o k +*/ +type ColumnFamilyMetricsCompressionRatioByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsCompressionRatioByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionRatioByNameGetOK) 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 +} + +// NewColumnFamilyMetricsCompressionRatioByNameGetDefault creates a ColumnFamilyMetricsCompressionRatioByNameGetDefault with default headers values +func NewColumnFamilyMetricsCompressionRatioByNameGetDefault(code int) *ColumnFamilyMetricsCompressionRatioByNameGetDefault { + return &ColumnFamilyMetricsCompressionRatioByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCompressionRatioByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCompressionRatioByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics compression ratio by name get default response +func (o *ColumnFamilyMetricsCompressionRatioByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCompressionRatioByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionRatioByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCompressionRatioByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_parameters.go new file mode 100644 index 00000000000..3e67993e36e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCompressionRatioGetParams creates a new ColumnFamilyMetricsCompressionRatioGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCompressionRatioGetParams() *ColumnFamilyMetricsCompressionRatioGetParams { + + return &ColumnFamilyMetricsCompressionRatioGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCompressionRatioGetParamsWithTimeout creates a new ColumnFamilyMetricsCompressionRatioGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCompressionRatioGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionRatioGetParams { + + return &ColumnFamilyMetricsCompressionRatioGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCompressionRatioGetParamsWithContext creates a new ColumnFamilyMetricsCompressionRatioGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCompressionRatioGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCompressionRatioGetParams { + + return &ColumnFamilyMetricsCompressionRatioGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCompressionRatioGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCompressionRatioGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCompressionRatioGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionRatioGetParams { + + return &ColumnFamilyMetricsCompressionRatioGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCompressionRatioGetParams contains all the parameters to send to the API endpoint +for the column family metrics compression ratio get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCompressionRatioGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCompressionRatioGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCompressionRatioGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCompressionRatioGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics compression ratio get params +func (o *ColumnFamilyMetricsCompressionRatioGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCompressionRatioGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_responses.go new file mode 100644 index 00000000000..e88ff879e3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_compression_ratio_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCompressionRatioGetReader is a Reader for the ColumnFamilyMetricsCompressionRatioGet structure. +type ColumnFamilyMetricsCompressionRatioGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCompressionRatioGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCompressionRatioGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCompressionRatioGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCompressionRatioGetOK creates a ColumnFamilyMetricsCompressionRatioGetOK with default headers values +func NewColumnFamilyMetricsCompressionRatioGetOK() *ColumnFamilyMetricsCompressionRatioGetOK { + return &ColumnFamilyMetricsCompressionRatioGetOK{} +} + +/*ColumnFamilyMetricsCompressionRatioGetOK handles this case with default header values. + +ColumnFamilyMetricsCompressionRatioGetOK column family metrics compression ratio get o k +*/ +type ColumnFamilyMetricsCompressionRatioGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsCompressionRatioGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionRatioGetOK) 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 +} + +// NewColumnFamilyMetricsCompressionRatioGetDefault creates a ColumnFamilyMetricsCompressionRatioGetDefault with default headers values +func NewColumnFamilyMetricsCompressionRatioGetDefault(code int) *ColumnFamilyMetricsCompressionRatioGetDefault { + return &ColumnFamilyMetricsCompressionRatioGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCompressionRatioGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCompressionRatioGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics compression ratio get default response +func (o *ColumnFamilyMetricsCompressionRatioGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCompressionRatioGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCompressionRatioGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCompressionRatioGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_parameters.go new file mode 100644 index 00000000000..3d2e0698a4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCoordinatorReadGetParams creates a new ColumnFamilyMetricsCoordinatorReadGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCoordinatorReadGetParams() *ColumnFamilyMetricsCoordinatorReadGetParams { + + return &ColumnFamilyMetricsCoordinatorReadGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCoordinatorReadGetParamsWithTimeout creates a new ColumnFamilyMetricsCoordinatorReadGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCoordinatorReadGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCoordinatorReadGetParams { + + return &ColumnFamilyMetricsCoordinatorReadGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCoordinatorReadGetParamsWithContext creates a new ColumnFamilyMetricsCoordinatorReadGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCoordinatorReadGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCoordinatorReadGetParams { + + return &ColumnFamilyMetricsCoordinatorReadGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCoordinatorReadGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCoordinatorReadGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCoordinatorReadGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCoordinatorReadGetParams { + + return &ColumnFamilyMetricsCoordinatorReadGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCoordinatorReadGetParams contains all the parameters to send to the API endpoint +for the column family metrics coordinator read get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCoordinatorReadGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCoordinatorReadGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCoordinatorReadGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCoordinatorReadGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics coordinator read get params +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCoordinatorReadGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_responses.go new file mode 100644 index 00000000000..a7ee65b54ec --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_read_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCoordinatorReadGetReader is a Reader for the ColumnFamilyMetricsCoordinatorReadGet structure. +type ColumnFamilyMetricsCoordinatorReadGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCoordinatorReadGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCoordinatorReadGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCoordinatorReadGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCoordinatorReadGetOK creates a ColumnFamilyMetricsCoordinatorReadGetOK with default headers values +func NewColumnFamilyMetricsCoordinatorReadGetOK() *ColumnFamilyMetricsCoordinatorReadGetOK { + return &ColumnFamilyMetricsCoordinatorReadGetOK{} +} + +/*ColumnFamilyMetricsCoordinatorReadGetOK handles this case with default header values. + +ColumnFamilyMetricsCoordinatorReadGetOK column family metrics coordinator read get o k +*/ +type ColumnFamilyMetricsCoordinatorReadGetOK struct { +} + +func (o *ColumnFamilyMetricsCoordinatorReadGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCoordinatorReadGetDefault creates a ColumnFamilyMetricsCoordinatorReadGetDefault with default headers values +func NewColumnFamilyMetricsCoordinatorReadGetDefault(code int) *ColumnFamilyMetricsCoordinatorReadGetDefault { + return &ColumnFamilyMetricsCoordinatorReadGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCoordinatorReadGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCoordinatorReadGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics coordinator read get default response +func (o *ColumnFamilyMetricsCoordinatorReadGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCoordinatorReadGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCoordinatorReadGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCoordinatorReadGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_parameters.go new file mode 100644 index 00000000000..66bf166f8c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsCoordinatorScanGetParams creates a new ColumnFamilyMetricsCoordinatorScanGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsCoordinatorScanGetParams() *ColumnFamilyMetricsCoordinatorScanGetParams { + + return &ColumnFamilyMetricsCoordinatorScanGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsCoordinatorScanGetParamsWithTimeout creates a new ColumnFamilyMetricsCoordinatorScanGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsCoordinatorScanGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsCoordinatorScanGetParams { + + return &ColumnFamilyMetricsCoordinatorScanGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsCoordinatorScanGetParamsWithContext creates a new ColumnFamilyMetricsCoordinatorScanGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsCoordinatorScanGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsCoordinatorScanGetParams { + + return &ColumnFamilyMetricsCoordinatorScanGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsCoordinatorScanGetParamsWithHTTPClient creates a new ColumnFamilyMetricsCoordinatorScanGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsCoordinatorScanGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsCoordinatorScanGetParams { + + return &ColumnFamilyMetricsCoordinatorScanGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsCoordinatorScanGetParams contains all the parameters to send to the API endpoint +for the column family metrics coordinator scan get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsCoordinatorScanGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsCoordinatorScanGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsCoordinatorScanGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsCoordinatorScanGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics coordinator scan get params +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsCoordinatorScanGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_responses.go new file mode 100644 index 00000000000..130b778cbd9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_coordinator_scan_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsCoordinatorScanGetReader is a Reader for the ColumnFamilyMetricsCoordinatorScanGet structure. +type ColumnFamilyMetricsCoordinatorScanGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsCoordinatorScanGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsCoordinatorScanGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsCoordinatorScanGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsCoordinatorScanGetOK creates a ColumnFamilyMetricsCoordinatorScanGetOK with default headers values +func NewColumnFamilyMetricsCoordinatorScanGetOK() *ColumnFamilyMetricsCoordinatorScanGetOK { + return &ColumnFamilyMetricsCoordinatorScanGetOK{} +} + +/*ColumnFamilyMetricsCoordinatorScanGetOK handles this case with default header values. + +ColumnFamilyMetricsCoordinatorScanGetOK column family metrics coordinator scan get o k +*/ +type ColumnFamilyMetricsCoordinatorScanGetOK struct { +} + +func (o *ColumnFamilyMetricsCoordinatorScanGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsCoordinatorScanGetDefault creates a ColumnFamilyMetricsCoordinatorScanGetDefault with default headers values +func NewColumnFamilyMetricsCoordinatorScanGetDefault(code int) *ColumnFamilyMetricsCoordinatorScanGetDefault { + return &ColumnFamilyMetricsCoordinatorScanGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsCoordinatorScanGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsCoordinatorScanGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics coordinator scan get default response +func (o *ColumnFamilyMetricsCoordinatorScanGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsCoordinatorScanGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsCoordinatorScanGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsCoordinatorScanGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..3bb8b0ccf98 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams creates a new ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams() *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics estimated column count histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics estimated column count histogram by name get params +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..7e051af92c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_column_count_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGet structure. +type ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK creates a ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK() *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK { + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK column family metrics estimated column count histogram by name get o k +*/ +type ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault creates a ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault(code int) *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault { + return &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics estimated column count histogram by name get default response +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_parameters.go new file mode 100644 index 00000000000..3d0eeb5a428 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetParams creates a new ColumnFamilyMetricsEstimatedRowCountByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsEstimatedRowCountByNameGetParams() *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowCountByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsEstimatedRowCountByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowCountByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithContext creates a new ColumnFamilyMetricsEstimatedRowCountByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowCountByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsEstimatedRowCountByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsEstimatedRowCountByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowCountByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsEstimatedRowCountByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics estimated row count by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsEstimatedRowCountByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) WithName(name string) *ColumnFamilyMetricsEstimatedRowCountByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics estimated row count by name get params +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_responses.go new file mode 100644 index 00000000000..37c536589f6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_count_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsEstimatedRowCountByNameGetReader is a Reader for the ColumnFamilyMetricsEstimatedRowCountByNameGet structure. +type ColumnFamilyMetricsEstimatedRowCountByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsEstimatedRowCountByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsEstimatedRowCountByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetOK creates a ColumnFamilyMetricsEstimatedRowCountByNameGetOK with default headers values +func NewColumnFamilyMetricsEstimatedRowCountByNameGetOK() *ColumnFamilyMetricsEstimatedRowCountByNameGetOK { + return &ColumnFamilyMetricsEstimatedRowCountByNameGetOK{} +} + +/*ColumnFamilyMetricsEstimatedRowCountByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsEstimatedRowCountByNameGetOK column family metrics estimated row count by name get o k +*/ +type ColumnFamilyMetricsEstimatedRowCountByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetOK) 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 +} + +// NewColumnFamilyMetricsEstimatedRowCountByNameGetDefault creates a ColumnFamilyMetricsEstimatedRowCountByNameGetDefault with default headers values +func NewColumnFamilyMetricsEstimatedRowCountByNameGetDefault(code int) *ColumnFamilyMetricsEstimatedRowCountByNameGetDefault { + return &ColumnFamilyMetricsEstimatedRowCountByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsEstimatedRowCountByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsEstimatedRowCountByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics estimated row count by name get default response +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsEstimatedRowCountByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..e7d400a4479 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams creates a new ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams() *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics estimated row size histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics estimated row size histogram by name get params +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..6374a8bd4f1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_estimated_row_size_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGet structure. +type ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK creates a ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK() *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK { + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK column family metrics estimated row size histogram by name get o k +*/ +type ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault creates a ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault(code int) *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault { + return &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics estimated row size histogram by name get default response +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_parameters.go new file mode 100644 index 00000000000..3c5f1862e9a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams() *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + var () + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics index summary off heap memory used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics index summary off heap memory used by name get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_responses.go new file mode 100644 index 00000000000..7977dd83e47 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetReader is a Reader for the ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGet structure. +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK creates a ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK() *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK { + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK column family metrics index summary off heap memory used by name get o k +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault creates a ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault(code int) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault { + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics index summary off heap memory used by name get default response +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_parameters.go new file mode 100644 index 00000000000..d822b89c2e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams() *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithContext creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics index summary off heap memory used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics index summary off heap memory used get params +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_responses.go new file mode 100644 index 00000000000..87555a6c99b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_index_summary_off_heap_memory_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetReader is a Reader for the ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGet structure. +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK creates a ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK with default headers values +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK() *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK { + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK{} +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK column family metrics index summary off heap memory used get o k +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK) 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 +} + +// NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault creates a ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault with default headers values +func NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault(code int) *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault { + return &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics index summary off heap memory used get default response +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_parameters.go new file mode 100644 index 00000000000..e676fcb0f93 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetParams creates a new ColumnFamilyMetricsKeyCacheHitRateByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetParams() *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + var () + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsKeyCacheHitRateByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + var () + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithContext creates a new ColumnFamilyMetricsKeyCacheHitRateByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + var () + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsKeyCacheHitRateByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + var () + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsKeyCacheHitRateByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics key cache hit rate by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsKeyCacheHitRateByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) WithName(name string) *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics key cache hit rate by name get params +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_responses.go new file mode 100644 index 00000000000..9728ed0d675 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_key_cache_hit_rate_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsKeyCacheHitRateByNameGetReader is a Reader for the ColumnFamilyMetricsKeyCacheHitRateByNameGet structure. +type ColumnFamilyMetricsKeyCacheHitRateByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsKeyCacheHitRateByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsKeyCacheHitRateByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetOK creates a ColumnFamilyMetricsKeyCacheHitRateByNameGetOK with default headers values +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetOK() *ColumnFamilyMetricsKeyCacheHitRateByNameGetOK { + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetOK{} +} + +/*ColumnFamilyMetricsKeyCacheHitRateByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsKeyCacheHitRateByNameGetOK column family metrics key cache hit rate by name get o k +*/ +type ColumnFamilyMetricsKeyCacheHitRateByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetOK) 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 +} + +// NewColumnFamilyMetricsKeyCacheHitRateByNameGetDefault creates a ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault with default headers values +func NewColumnFamilyMetricsKeyCacheHitRateByNameGetDefault(code int) *ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault { + return &ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics key cache hit rate by name get default response +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_parameters.go new file mode 100644 index 00000000000..81c13d22779 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams creates a new ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams() *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics live disk space used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics live disk space used by name get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_responses.go new file mode 100644 index 00000000000..5ce3cd31f3e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetReader is a Reader for the ColumnFamilyMetricsLiveDiskSpaceUsedByNameGet structure. +type ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK creates a ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK() *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK { + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK column family metrics live disk space used by name get o k +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault creates a ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault(code int) *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault { + return &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics live disk space used by name get default response +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_parameters.go new file mode 100644 index 00000000000..e4b5af30057 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetParams creates a new ColumnFamilyMetricsLiveDiskSpaceUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetParams() *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsLiveDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithContext creates a new ColumnFamilyMetricsLiveDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsLiveDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics live disk space used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics live disk space used get params +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_responses.go new file mode 100644 index 00000000000..9fda7fc06c5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_disk_space_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsLiveDiskSpaceUsedGetReader is a Reader for the ColumnFamilyMetricsLiveDiskSpaceUsedGet structure. +type ColumnFamilyMetricsLiveDiskSpaceUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsLiveDiskSpaceUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsLiveDiskSpaceUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetOK creates a ColumnFamilyMetricsLiveDiskSpaceUsedGetOK with default headers values +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetOK() *ColumnFamilyMetricsLiveDiskSpaceUsedGetOK { + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetOK{} +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsLiveDiskSpaceUsedGetOK column family metrics live disk space used get o k +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetOK) 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 +} + +// NewColumnFamilyMetricsLiveDiskSpaceUsedGetDefault creates a ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault with default headers values +func NewColumnFamilyMetricsLiveDiskSpaceUsedGetDefault(code int) *ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault { + return &ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics live disk space used get default response +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..4d9e1b76fd5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetParams creates a new ColumnFamilyMetricsLiveScannedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetParams() *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsLiveScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsLiveScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsLiveScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsLiveScannedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics live scanned histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsLiveScannedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics live scanned histogram by name get params +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..32d2304df39 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_scanned_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsLiveScannedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsLiveScannedHistogramByNameGet structure. +type ColumnFamilyMetricsLiveScannedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsLiveScannedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsLiveScannedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetOK creates a ColumnFamilyMetricsLiveScannedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetOK() *ColumnFamilyMetricsLiveScannedHistogramByNameGetOK { + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsLiveScannedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsLiveScannedHistogramByNameGetOK column family metrics live scanned histogram by name get o k +*/ +type ColumnFamilyMetricsLiveScannedHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsLiveScannedHistogramByNameGetDefault creates a ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsLiveScannedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault { + return &ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics live scanned histogram by name get default response +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_parameters.go new file mode 100644 index 00000000000..644401e021a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetParams creates a new ColumnFamilyMetricsLiveSsTableCountByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsLiveSsTableCountByNameGetParams() *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + var () + return &ColumnFamilyMetricsLiveSsTableCountByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsLiveSsTableCountByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + var () + return &ColumnFamilyMetricsLiveSsTableCountByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithContext creates a new ColumnFamilyMetricsLiveSsTableCountByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + var () + return &ColumnFamilyMetricsLiveSsTableCountByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsLiveSsTableCountByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsLiveSsTableCountByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + var () + return &ColumnFamilyMetricsLiveSsTableCountByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsLiveSsTableCountByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics live ss table count by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsLiveSsTableCountByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) WithName(name string) *ColumnFamilyMetricsLiveSsTableCountByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics live ss table count by name get params +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_responses.go new file mode 100644 index 00000000000..76aa612f9f4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsLiveSsTableCountByNameGetReader is a Reader for the ColumnFamilyMetricsLiveSsTableCountByNameGet structure. +type ColumnFamilyMetricsLiveSsTableCountByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsLiveSsTableCountByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsLiveSsTableCountByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetOK creates a ColumnFamilyMetricsLiveSsTableCountByNameGetOK with default headers values +func NewColumnFamilyMetricsLiveSsTableCountByNameGetOK() *ColumnFamilyMetricsLiveSsTableCountByNameGetOK { + return &ColumnFamilyMetricsLiveSsTableCountByNameGetOK{} +} + +/*ColumnFamilyMetricsLiveSsTableCountByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsLiveSsTableCountByNameGetOK column family metrics live ss table count by name get o k +*/ +type ColumnFamilyMetricsLiveSsTableCountByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetOK) 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 +} + +// NewColumnFamilyMetricsLiveSsTableCountByNameGetDefault creates a ColumnFamilyMetricsLiveSsTableCountByNameGetDefault with default headers values +func NewColumnFamilyMetricsLiveSsTableCountByNameGetDefault(code int) *ColumnFamilyMetricsLiveSsTableCountByNameGetDefault { + return &ColumnFamilyMetricsLiveSsTableCountByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsLiveSsTableCountByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsLiveSsTableCountByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics live ss table count by name get default response +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsLiveSsTableCountByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_parameters.go new file mode 100644 index 00000000000..985e6e39668 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsLiveSsTableCountGetParams creates a new ColumnFamilyMetricsLiveSsTableCountGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsLiveSsTableCountGetParams() *ColumnFamilyMetricsLiveSsTableCountGetParams { + + return &ColumnFamilyMetricsLiveSsTableCountGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountGetParamsWithTimeout creates a new ColumnFamilyMetricsLiveSsTableCountGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsLiveSsTableCountGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveSsTableCountGetParams { + + return &ColumnFamilyMetricsLiveSsTableCountGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountGetParamsWithContext creates a new ColumnFamilyMetricsLiveSsTableCountGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsLiveSsTableCountGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsLiveSsTableCountGetParams { + + return &ColumnFamilyMetricsLiveSsTableCountGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsLiveSsTableCountGetParamsWithHTTPClient creates a new ColumnFamilyMetricsLiveSsTableCountGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsLiveSsTableCountGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveSsTableCountGetParams { + + return &ColumnFamilyMetricsLiveSsTableCountGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsLiveSsTableCountGetParams contains all the parameters to send to the API endpoint +for the column family metrics live ss table count get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsLiveSsTableCountGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsLiveSsTableCountGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsLiveSsTableCountGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsLiveSsTableCountGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics live ss table count get params +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsLiveSsTableCountGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_responses.go new file mode 100644 index 00000000000..0364db22b61 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_live_ss_table_count_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsLiveSsTableCountGetReader is a Reader for the ColumnFamilyMetricsLiveSsTableCountGet structure. +type ColumnFamilyMetricsLiveSsTableCountGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsLiveSsTableCountGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsLiveSsTableCountGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsLiveSsTableCountGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsLiveSsTableCountGetOK creates a ColumnFamilyMetricsLiveSsTableCountGetOK with default headers values +func NewColumnFamilyMetricsLiveSsTableCountGetOK() *ColumnFamilyMetricsLiveSsTableCountGetOK { + return &ColumnFamilyMetricsLiveSsTableCountGetOK{} +} + +/*ColumnFamilyMetricsLiveSsTableCountGetOK handles this case with default header values. + +ColumnFamilyMetricsLiveSsTableCountGetOK column family metrics live ss table count get o k +*/ +type ColumnFamilyMetricsLiveSsTableCountGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsLiveSsTableCountGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveSsTableCountGetOK) 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 +} + +// NewColumnFamilyMetricsLiveSsTableCountGetDefault creates a ColumnFamilyMetricsLiveSsTableCountGetDefault with default headers values +func NewColumnFamilyMetricsLiveSsTableCountGetDefault(code int) *ColumnFamilyMetricsLiveSsTableCountGetDefault { + return &ColumnFamilyMetricsLiveSsTableCountGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsLiveSsTableCountGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsLiveSsTableCountGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics live ss table count get default response +func (o *ColumnFamilyMetricsLiveSsTableCountGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsLiveSsTableCountGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsLiveSsTableCountGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsLiveSsTableCountGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_parameters.go new file mode 100644 index 00000000000..e0e1e7bd0c5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMaxRowSizeByNameGetParams creates a new ColumnFamilyMetricsMaxRowSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMaxRowSizeByNameGetParams() *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMaxRowSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMaxRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMaxRowSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMaxRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMaxRowSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMaxRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMaxRowSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMaxRowSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMaxRowSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics max row size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMaxRowSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMaxRowSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics max row size by name get params +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_responses.go new file mode 100644 index 00000000000..b22d5f2a58e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMaxRowSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMaxRowSizeByNameGet structure. +type ColumnFamilyMetricsMaxRowSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMaxRowSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMaxRowSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMaxRowSizeByNameGetOK creates a ColumnFamilyMetricsMaxRowSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMaxRowSizeByNameGetOK() *ColumnFamilyMetricsMaxRowSizeByNameGetOK { + return &ColumnFamilyMetricsMaxRowSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMaxRowSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMaxRowSizeByNameGetOK column family metrics max row size by name get o k +*/ +type ColumnFamilyMetricsMaxRowSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMaxRowSizeByNameGetDefault creates a ColumnFamilyMetricsMaxRowSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMaxRowSizeByNameGetDefault(code int) *ColumnFamilyMetricsMaxRowSizeByNameGetDefault { + return &ColumnFamilyMetricsMaxRowSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMaxRowSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMaxRowSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics max row size by name get default response +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMaxRowSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_parameters.go new file mode 100644 index 00000000000..faa4632e820 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMaxRowSizeGetParams creates a new ColumnFamilyMetricsMaxRowSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMaxRowSizeGetParams() *ColumnFamilyMetricsMaxRowSizeGetParams { + + return &ColumnFamilyMetricsMaxRowSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMaxRowSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMaxRowSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMaxRowSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMaxRowSizeGetParams { + + return &ColumnFamilyMetricsMaxRowSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMaxRowSizeGetParamsWithContext creates a new ColumnFamilyMetricsMaxRowSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMaxRowSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMaxRowSizeGetParams { + + return &ColumnFamilyMetricsMaxRowSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMaxRowSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMaxRowSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMaxRowSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMaxRowSizeGetParams { + + return &ColumnFamilyMetricsMaxRowSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMaxRowSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics max row size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMaxRowSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMaxRowSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMaxRowSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMaxRowSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics max row size get params +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMaxRowSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_responses.go new file mode 100644 index 00000000000..84d5c6e9cee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_max_row_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMaxRowSizeGetReader is a Reader for the ColumnFamilyMetricsMaxRowSizeGet structure. +type ColumnFamilyMetricsMaxRowSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMaxRowSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMaxRowSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMaxRowSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMaxRowSizeGetOK creates a ColumnFamilyMetricsMaxRowSizeGetOK with default headers values +func NewColumnFamilyMetricsMaxRowSizeGetOK() *ColumnFamilyMetricsMaxRowSizeGetOK { + return &ColumnFamilyMetricsMaxRowSizeGetOK{} +} + +/*ColumnFamilyMetricsMaxRowSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMaxRowSizeGetOK column family metrics max row size get o k +*/ +type ColumnFamilyMetricsMaxRowSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMaxRowSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMaxRowSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMaxRowSizeGetDefault creates a ColumnFamilyMetricsMaxRowSizeGetDefault with default headers values +func NewColumnFamilyMetricsMaxRowSizeGetDefault(code int) *ColumnFamilyMetricsMaxRowSizeGetDefault { + return &ColumnFamilyMetricsMaxRowSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMaxRowSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMaxRowSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics max row size get default response +func (o *ColumnFamilyMetricsMaxRowSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMaxRowSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMaxRowSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMaxRowSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_parameters.go new file mode 100644 index 00000000000..156ee3cb6e5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMeanRowSizeByNameGetParams creates a new ColumnFamilyMetricsMeanRowSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMeanRowSizeByNameGetParams() *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMeanRowSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMeanRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMeanRowSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMeanRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMeanRowSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMeanRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMeanRowSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMeanRowSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMeanRowSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics mean row size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMeanRowSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMeanRowSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics mean row size by name get params +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_responses.go new file mode 100644 index 00000000000..85e89e27c83 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMeanRowSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMeanRowSizeByNameGet structure. +type ColumnFamilyMetricsMeanRowSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMeanRowSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMeanRowSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMeanRowSizeByNameGetOK creates a ColumnFamilyMetricsMeanRowSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMeanRowSizeByNameGetOK() *ColumnFamilyMetricsMeanRowSizeByNameGetOK { + return &ColumnFamilyMetricsMeanRowSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMeanRowSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMeanRowSizeByNameGetOK column family metrics mean row size by name get o k +*/ +type ColumnFamilyMetricsMeanRowSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMeanRowSizeByNameGetDefault creates a ColumnFamilyMetricsMeanRowSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMeanRowSizeByNameGetDefault(code int) *ColumnFamilyMetricsMeanRowSizeByNameGetDefault { + return &ColumnFamilyMetricsMeanRowSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMeanRowSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMeanRowSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics mean row size by name get default response +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMeanRowSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_parameters.go new file mode 100644 index 00000000000..f72aaa4954a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMeanRowSizeGetParams creates a new ColumnFamilyMetricsMeanRowSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMeanRowSizeGetParams() *ColumnFamilyMetricsMeanRowSizeGetParams { + + return &ColumnFamilyMetricsMeanRowSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMeanRowSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMeanRowSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMeanRowSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMeanRowSizeGetParams { + + return &ColumnFamilyMetricsMeanRowSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMeanRowSizeGetParamsWithContext creates a new ColumnFamilyMetricsMeanRowSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMeanRowSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMeanRowSizeGetParams { + + return &ColumnFamilyMetricsMeanRowSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMeanRowSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMeanRowSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMeanRowSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMeanRowSizeGetParams { + + return &ColumnFamilyMetricsMeanRowSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMeanRowSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics mean row size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMeanRowSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMeanRowSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMeanRowSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMeanRowSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics mean row size get params +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMeanRowSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_responses.go new file mode 100644 index 00000000000..f7cdd1e6b9c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_mean_row_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMeanRowSizeGetReader is a Reader for the ColumnFamilyMetricsMeanRowSizeGet structure. +type ColumnFamilyMetricsMeanRowSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMeanRowSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMeanRowSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMeanRowSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMeanRowSizeGetOK creates a ColumnFamilyMetricsMeanRowSizeGetOK with default headers values +func NewColumnFamilyMetricsMeanRowSizeGetOK() *ColumnFamilyMetricsMeanRowSizeGetOK { + return &ColumnFamilyMetricsMeanRowSizeGetOK{} +} + +/*ColumnFamilyMetricsMeanRowSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMeanRowSizeGetOK column family metrics mean row size get o k +*/ +type ColumnFamilyMetricsMeanRowSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMeanRowSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMeanRowSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMeanRowSizeGetDefault creates a ColumnFamilyMetricsMeanRowSizeGetDefault with default headers values +func NewColumnFamilyMetricsMeanRowSizeGetDefault(code int) *ColumnFamilyMetricsMeanRowSizeGetDefault { + return &ColumnFamilyMetricsMeanRowSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMeanRowSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMeanRowSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics mean row size get default response +func (o *ColumnFamilyMetricsMeanRowSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMeanRowSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMeanRowSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMeanRowSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_parameters.go new file mode 100644 index 00000000000..af81ac4884a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetParams creates a new ColumnFamilyMetricsMemtableColumnsCountByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetParams() *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableColumnsCountByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithContext creates a new ColumnFamilyMetricsMemtableColumnsCountByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableColumnsCountByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableColumnsCountByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable columns count by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableColumnsCountByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) WithName(name string) *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics memtable columns count by name get params +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_responses.go new file mode 100644 index 00000000000..fdc434e5d00 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableColumnsCountByNameGetReader is a Reader for the ColumnFamilyMetricsMemtableColumnsCountByNameGet structure. +type ColumnFamilyMetricsMemtableColumnsCountByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableColumnsCountByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableColumnsCountByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetOK creates a ColumnFamilyMetricsMemtableColumnsCountByNameGetOK with default headers values +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetOK() *ColumnFamilyMetricsMemtableColumnsCountByNameGetOK { + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetOK{} +} + +/*ColumnFamilyMetricsMemtableColumnsCountByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableColumnsCountByNameGetOK column family metrics memtable columns count by name get o k +*/ +type ColumnFamilyMetricsMemtableColumnsCountByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableColumnsCountByNameGetDefault creates a ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault with default headers values +func NewColumnFamilyMetricsMemtableColumnsCountByNameGetDefault(code int) *ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault { + return &ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable columns count by name get default response +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_parameters.go new file mode 100644 index 00000000000..462a1ce5ea8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableColumnsCountGetParams creates a new ColumnFamilyMetricsMemtableColumnsCountGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableColumnsCountGetParams() *ColumnFamilyMetricsMemtableColumnsCountGetParams { + + return &ColumnFamilyMetricsMemtableColumnsCountGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableColumnsCountGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + + return &ColumnFamilyMetricsMemtableColumnsCountGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithContext creates a new ColumnFamilyMetricsMemtableColumnsCountGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + + return &ColumnFamilyMetricsMemtableColumnsCountGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableColumnsCountGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableColumnsCountGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + + return &ColumnFamilyMetricsMemtableColumnsCountGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableColumnsCountGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable columns count get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableColumnsCountGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableColumnsCountGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable columns count get params +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableColumnsCountGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_responses.go new file mode 100644 index 00000000000..32aceb56549 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_columns_count_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableColumnsCountGetReader is a Reader for the ColumnFamilyMetricsMemtableColumnsCountGet structure. +type ColumnFamilyMetricsMemtableColumnsCountGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableColumnsCountGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableColumnsCountGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableColumnsCountGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableColumnsCountGetOK creates a ColumnFamilyMetricsMemtableColumnsCountGetOK with default headers values +func NewColumnFamilyMetricsMemtableColumnsCountGetOK() *ColumnFamilyMetricsMemtableColumnsCountGetOK { + return &ColumnFamilyMetricsMemtableColumnsCountGetOK{} +} + +/*ColumnFamilyMetricsMemtableColumnsCountGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableColumnsCountGetOK column family metrics memtable columns count get o k +*/ +type ColumnFamilyMetricsMemtableColumnsCountGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableColumnsCountGetDefault creates a ColumnFamilyMetricsMemtableColumnsCountGetDefault with default headers values +func NewColumnFamilyMetricsMemtableColumnsCountGetDefault(code int) *ColumnFamilyMetricsMemtableColumnsCountGetDefault { + return &ColumnFamilyMetricsMemtableColumnsCountGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableColumnsCountGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableColumnsCountGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable columns count get default response +func (o *ColumnFamilyMetricsMemtableColumnsCountGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableColumnsCountGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_parameters.go new file mode 100644 index 00000000000..f43fc103ee2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams creates a new ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams() *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable live data size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics memtable live data size by name get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_responses.go new file mode 100644 index 00000000000..dd742571121 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableLiveDataSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMemtableLiveDataSizeByNameGet structure. +type ColumnFamilyMetricsMemtableLiveDataSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK creates a ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK() *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK { + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK column family metrics memtable live data size by name get o k +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault creates a ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault(code int) *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault { + return &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable live data size by name get default response +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_parameters.go new file mode 100644 index 00000000000..2dff1999412 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetParams creates a new ColumnFamilyMetricsMemtableLiveDataSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableLiveDataSizeGetParams() *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + + return &ColumnFamilyMetricsMemtableLiveDataSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + + return &ColumnFamilyMetricsMemtableLiveDataSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithContext creates a new ColumnFamilyMetricsMemtableLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + + return &ColumnFamilyMetricsMemtableLiveDataSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableLiveDataSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableLiveDataSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + + return &ColumnFamilyMetricsMemtableLiveDataSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable live data size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableLiveDataSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable live data size get params +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_responses.go new file mode 100644 index 00000000000..2ccca5ead0f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_live_data_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableLiveDataSizeGetReader is a Reader for the ColumnFamilyMetricsMemtableLiveDataSizeGet structure. +type ColumnFamilyMetricsMemtableLiveDataSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableLiveDataSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableLiveDataSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetOK creates a ColumnFamilyMetricsMemtableLiveDataSizeGetOK with default headers values +func NewColumnFamilyMetricsMemtableLiveDataSizeGetOK() *ColumnFamilyMetricsMemtableLiveDataSizeGetOK { + return &ColumnFamilyMetricsMemtableLiveDataSizeGetOK{} +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableLiveDataSizeGetOK column family metrics memtable live data size get o k +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableLiveDataSizeGetDefault creates a ColumnFamilyMetricsMemtableLiveDataSizeGetDefault with default headers values +func NewColumnFamilyMetricsMemtableLiveDataSizeGetDefault(code int) *ColumnFamilyMetricsMemtableLiveDataSizeGetDefault { + return &ColumnFamilyMetricsMemtableLiveDataSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableLiveDataSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableLiveDataSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable live data size get default response +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableLiveDataSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_parameters.go new file mode 100644 index 00000000000..89a98907334 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams creates a new ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams() *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable off heap size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics memtable off heap size by name get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_responses.go new file mode 100644 index 00000000000..86d529089ac --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableOffHeapSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMemtableOffHeapSizeByNameGet structure. +type ColumnFamilyMetricsMemtableOffHeapSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK creates a ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK() *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK { + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK column family metrics memtable off heap size by name get o k +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault creates a ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault(code int) *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault { + return &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable off heap size by name get default response +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_parameters.go new file mode 100644 index 00000000000..4da78e63bf1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetParams creates a new ColumnFamilyMetricsMemtableOffHeapSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableOffHeapSizeGetParams() *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOffHeapSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOffHeapSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithContext creates a new ColumnFamilyMetricsMemtableOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOffHeapSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableOffHeapSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableOffHeapSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOffHeapSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable off heap size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOffHeapSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable off heap size get params +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_responses.go new file mode 100644 index 00000000000..a5edcea4724 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_off_heap_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableOffHeapSizeGetReader is a Reader for the ColumnFamilyMetricsMemtableOffHeapSizeGet structure. +type ColumnFamilyMetricsMemtableOffHeapSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableOffHeapSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableOffHeapSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetOK creates a ColumnFamilyMetricsMemtableOffHeapSizeGetOK with default headers values +func NewColumnFamilyMetricsMemtableOffHeapSizeGetOK() *ColumnFamilyMetricsMemtableOffHeapSizeGetOK { + return &ColumnFamilyMetricsMemtableOffHeapSizeGetOK{} +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableOffHeapSizeGetOK column family metrics memtable off heap size get o k +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableOffHeapSizeGetDefault creates a ColumnFamilyMetricsMemtableOffHeapSizeGetDefault with default headers values +func NewColumnFamilyMetricsMemtableOffHeapSizeGetDefault(code int) *ColumnFamilyMetricsMemtableOffHeapSizeGetDefault { + return &ColumnFamilyMetricsMemtableOffHeapSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableOffHeapSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableOffHeapSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable off heap size get default response +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableOffHeapSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_parameters.go new file mode 100644 index 00000000000..b3faaed5ce8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams creates a new ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams() *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable on heap size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics memtable on heap size by name get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_responses.go new file mode 100644 index 00000000000..04de408cd17 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableOnHeapSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMemtableOnHeapSizeByNameGet structure. +type ColumnFamilyMetricsMemtableOnHeapSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK creates a ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK() *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK { + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK column family metrics memtable on heap size by name get o k +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault creates a ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault(code int) *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault { + return &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable on heap size by name get default response +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_parameters.go new file mode 100644 index 00000000000..283eb40e73d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetParams creates a new ColumnFamilyMetricsMemtableOnHeapSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableOnHeapSizeGetParams() *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOnHeapSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOnHeapSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithContext creates a new ColumnFamilyMetricsMemtableOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOnHeapSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableOnHeapSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableOnHeapSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + + return &ColumnFamilyMetricsMemtableOnHeapSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable on heap size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableOnHeapSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable on heap size get params +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_responses.go new file mode 100644 index 00000000000..479bad6396b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_on_heap_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableOnHeapSizeGetReader is a Reader for the ColumnFamilyMetricsMemtableOnHeapSizeGet structure. +type ColumnFamilyMetricsMemtableOnHeapSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableOnHeapSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableOnHeapSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetOK creates a ColumnFamilyMetricsMemtableOnHeapSizeGetOK with default headers values +func NewColumnFamilyMetricsMemtableOnHeapSizeGetOK() *ColumnFamilyMetricsMemtableOnHeapSizeGetOK { + return &ColumnFamilyMetricsMemtableOnHeapSizeGetOK{} +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableOnHeapSizeGetOK column family metrics memtable on heap size get o k +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableOnHeapSizeGetDefault creates a ColumnFamilyMetricsMemtableOnHeapSizeGetDefault with default headers values +func NewColumnFamilyMetricsMemtableOnHeapSizeGetDefault(code int) *ColumnFamilyMetricsMemtableOnHeapSizeGetDefault { + return &ColumnFamilyMetricsMemtableOnHeapSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableOnHeapSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableOnHeapSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable on heap size get default response +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableOnHeapSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_parameters.go new file mode 100644 index 00000000000..103d547e876 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetParams creates a new ColumnFamilyMetricsMemtableSwitchCountByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetParams() *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableSwitchCountByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithContext creates a new ColumnFamilyMetricsMemtableSwitchCountByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableSwitchCountByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + var () + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableSwitchCountByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable switch count by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableSwitchCountByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) WithName(name string) *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics memtable switch count by name get params +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_responses.go new file mode 100644 index 00000000000..5e81a27f508 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableSwitchCountByNameGetReader is a Reader for the ColumnFamilyMetricsMemtableSwitchCountByNameGet structure. +type ColumnFamilyMetricsMemtableSwitchCountByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableSwitchCountByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableSwitchCountByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetOK creates a ColumnFamilyMetricsMemtableSwitchCountByNameGetOK with default headers values +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetOK() *ColumnFamilyMetricsMemtableSwitchCountByNameGetOK { + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetOK{} +} + +/*ColumnFamilyMetricsMemtableSwitchCountByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableSwitchCountByNameGetOK column family metrics memtable switch count by name get o k +*/ +type ColumnFamilyMetricsMemtableSwitchCountByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableSwitchCountByNameGetDefault creates a ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault with default headers values +func NewColumnFamilyMetricsMemtableSwitchCountByNameGetDefault(code int) *ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault { + return &ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable switch count by name get default response +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_parameters.go new file mode 100644 index 00000000000..c91bb705761 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMemtableSwitchCountGetParams creates a new ColumnFamilyMetricsMemtableSwitchCountGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMemtableSwitchCountGetParams() *ColumnFamilyMetricsMemtableSwitchCountGetParams { + + return &ColumnFamilyMetricsMemtableSwitchCountGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithTimeout creates a new ColumnFamilyMetricsMemtableSwitchCountGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + + return &ColumnFamilyMetricsMemtableSwitchCountGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithContext creates a new ColumnFamilyMetricsMemtableSwitchCountGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + + return &ColumnFamilyMetricsMemtableSwitchCountGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMemtableSwitchCountGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMemtableSwitchCountGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + + return &ColumnFamilyMetricsMemtableSwitchCountGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMemtableSwitchCountGetParams contains all the parameters to send to the API endpoint +for the column family metrics memtable switch count get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMemtableSwitchCountGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMemtableSwitchCountGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics memtable switch count get params +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMemtableSwitchCountGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_responses.go new file mode 100644 index 00000000000..8ec4614023d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_memtable_switch_count_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMemtableSwitchCountGetReader is a Reader for the ColumnFamilyMetricsMemtableSwitchCountGet structure. +type ColumnFamilyMetricsMemtableSwitchCountGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMemtableSwitchCountGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMemtableSwitchCountGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMemtableSwitchCountGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMemtableSwitchCountGetOK creates a ColumnFamilyMetricsMemtableSwitchCountGetOK with default headers values +func NewColumnFamilyMetricsMemtableSwitchCountGetOK() *ColumnFamilyMetricsMemtableSwitchCountGetOK { + return &ColumnFamilyMetricsMemtableSwitchCountGetOK{} +} + +/*ColumnFamilyMetricsMemtableSwitchCountGetOK handles this case with default header values. + +ColumnFamilyMetricsMemtableSwitchCountGetOK column family metrics memtable switch count get o k +*/ +type ColumnFamilyMetricsMemtableSwitchCountGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountGetOK) 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 +} + +// NewColumnFamilyMetricsMemtableSwitchCountGetDefault creates a ColumnFamilyMetricsMemtableSwitchCountGetDefault with default headers values +func NewColumnFamilyMetricsMemtableSwitchCountGetDefault(code int) *ColumnFamilyMetricsMemtableSwitchCountGetDefault { + return &ColumnFamilyMetricsMemtableSwitchCountGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMemtableSwitchCountGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMemtableSwitchCountGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics memtable switch count get default response +func (o *ColumnFamilyMetricsMemtableSwitchCountGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMemtableSwitchCountGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_parameters.go new file mode 100644 index 00000000000..211578680f0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMinRowSizeByNameGetParams creates a new ColumnFamilyMetricsMinRowSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMinRowSizeByNameGetParams() *ColumnFamilyMetricsMinRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMinRowSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsMinRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMinRowSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsMinRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMinRowSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMinRowSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMinRowSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + var () + return &ColumnFamilyMetricsMinRowSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMinRowSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics min row size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMinRowSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsMinRowSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics min row size by name get params +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMinRowSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_responses.go new file mode 100644 index 00000000000..a14a5b6b63f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMinRowSizeByNameGetReader is a Reader for the ColumnFamilyMetricsMinRowSizeByNameGet structure. +type ColumnFamilyMetricsMinRowSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMinRowSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMinRowSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMinRowSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMinRowSizeByNameGetOK creates a ColumnFamilyMetricsMinRowSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsMinRowSizeByNameGetOK() *ColumnFamilyMetricsMinRowSizeByNameGetOK { + return &ColumnFamilyMetricsMinRowSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsMinRowSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsMinRowSizeByNameGetOK column family metrics min row size by name get o k +*/ +type ColumnFamilyMetricsMinRowSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMinRowSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMinRowSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsMinRowSizeByNameGetDefault creates a ColumnFamilyMetricsMinRowSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsMinRowSizeByNameGetDefault(code int) *ColumnFamilyMetricsMinRowSizeByNameGetDefault { + return &ColumnFamilyMetricsMinRowSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMinRowSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMinRowSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics min row size by name get default response +func (o *ColumnFamilyMetricsMinRowSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMinRowSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMinRowSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMinRowSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_parameters.go new file mode 100644 index 00000000000..1be2cfd3d03 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsMinRowSizeGetParams creates a new ColumnFamilyMetricsMinRowSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsMinRowSizeGetParams() *ColumnFamilyMetricsMinRowSizeGetParams { + + return &ColumnFamilyMetricsMinRowSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsMinRowSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsMinRowSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsMinRowSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsMinRowSizeGetParams { + + return &ColumnFamilyMetricsMinRowSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsMinRowSizeGetParamsWithContext creates a new ColumnFamilyMetricsMinRowSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsMinRowSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsMinRowSizeGetParams { + + return &ColumnFamilyMetricsMinRowSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsMinRowSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsMinRowSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsMinRowSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsMinRowSizeGetParams { + + return &ColumnFamilyMetricsMinRowSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsMinRowSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics min row size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsMinRowSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsMinRowSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsMinRowSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsMinRowSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics min row size get params +func (o *ColumnFamilyMetricsMinRowSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsMinRowSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_responses.go new file mode 100644 index 00000000000..caf99bf7b36 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_min_row_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsMinRowSizeGetReader is a Reader for the ColumnFamilyMetricsMinRowSizeGet structure. +type ColumnFamilyMetricsMinRowSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsMinRowSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsMinRowSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsMinRowSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsMinRowSizeGetOK creates a ColumnFamilyMetricsMinRowSizeGetOK with default headers values +func NewColumnFamilyMetricsMinRowSizeGetOK() *ColumnFamilyMetricsMinRowSizeGetOK { + return &ColumnFamilyMetricsMinRowSizeGetOK{} +} + +/*ColumnFamilyMetricsMinRowSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsMinRowSizeGetOK column family metrics min row size get o k +*/ +type ColumnFamilyMetricsMinRowSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsMinRowSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsMinRowSizeGetOK) 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 +} + +// NewColumnFamilyMetricsMinRowSizeGetDefault creates a ColumnFamilyMetricsMinRowSizeGetDefault with default headers values +func NewColumnFamilyMetricsMinRowSizeGetDefault(code int) *ColumnFamilyMetricsMinRowSizeGetDefault { + return &ColumnFamilyMetricsMinRowSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsMinRowSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsMinRowSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics min row size get default response +func (o *ColumnFamilyMetricsMinRowSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsMinRowSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsMinRowSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsMinRowSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_parameters.go new file mode 100644 index 00000000000..214a6e33880 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsPendingCompactionsByNameGetParams creates a new ColumnFamilyMetricsPendingCompactionsByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsPendingCompactionsByNameGetParams() *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + var () + return &ColumnFamilyMetricsPendingCompactionsByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsPendingCompactionsByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + var () + return &ColumnFamilyMetricsPendingCompactionsByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithContext creates a new ColumnFamilyMetricsPendingCompactionsByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + var () + return &ColumnFamilyMetricsPendingCompactionsByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsPendingCompactionsByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsPendingCompactionsByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + var () + return &ColumnFamilyMetricsPendingCompactionsByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsPendingCompactionsByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics pending compactions by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsPendingCompactionsByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) WithName(name string) *ColumnFamilyMetricsPendingCompactionsByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics pending compactions by name get params +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_responses.go new file mode 100644 index 00000000000..e439e55c58b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsPendingCompactionsByNameGetReader is a Reader for the ColumnFamilyMetricsPendingCompactionsByNameGet structure. +type ColumnFamilyMetricsPendingCompactionsByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsPendingCompactionsByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsPendingCompactionsByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsPendingCompactionsByNameGetOK creates a ColumnFamilyMetricsPendingCompactionsByNameGetOK with default headers values +func NewColumnFamilyMetricsPendingCompactionsByNameGetOK() *ColumnFamilyMetricsPendingCompactionsByNameGetOK { + return &ColumnFamilyMetricsPendingCompactionsByNameGetOK{} +} + +/*ColumnFamilyMetricsPendingCompactionsByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsPendingCompactionsByNameGetOK column family metrics pending compactions by name get o k +*/ +type ColumnFamilyMetricsPendingCompactionsByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetOK) 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 +} + +// NewColumnFamilyMetricsPendingCompactionsByNameGetDefault creates a ColumnFamilyMetricsPendingCompactionsByNameGetDefault with default headers values +func NewColumnFamilyMetricsPendingCompactionsByNameGetDefault(code int) *ColumnFamilyMetricsPendingCompactionsByNameGetDefault { + return &ColumnFamilyMetricsPendingCompactionsByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsPendingCompactionsByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsPendingCompactionsByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics pending compactions by name get default response +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsPendingCompactionsByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_parameters.go new file mode 100644 index 00000000000..3154f1e6213 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsPendingCompactionsGetParams creates a new ColumnFamilyMetricsPendingCompactionsGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsPendingCompactionsGetParams() *ColumnFamilyMetricsPendingCompactionsGetParams { + + return &ColumnFamilyMetricsPendingCompactionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsPendingCompactionsGetParamsWithTimeout creates a new ColumnFamilyMetricsPendingCompactionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsPendingCompactionsGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingCompactionsGetParams { + + return &ColumnFamilyMetricsPendingCompactionsGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsPendingCompactionsGetParamsWithContext creates a new ColumnFamilyMetricsPendingCompactionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsPendingCompactionsGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsPendingCompactionsGetParams { + + return &ColumnFamilyMetricsPendingCompactionsGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsPendingCompactionsGetParamsWithHTTPClient creates a new ColumnFamilyMetricsPendingCompactionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsPendingCompactionsGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingCompactionsGetParams { + + return &ColumnFamilyMetricsPendingCompactionsGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsPendingCompactionsGetParams contains all the parameters to send to the API endpoint +for the column family metrics pending compactions get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsPendingCompactionsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingCompactionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsPendingCompactionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingCompactionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics pending compactions get params +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsPendingCompactionsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_responses.go new file mode 100644 index 00000000000..67b10a32d29 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_compactions_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsPendingCompactionsGetReader is a Reader for the ColumnFamilyMetricsPendingCompactionsGet structure. +type ColumnFamilyMetricsPendingCompactionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsPendingCompactionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsPendingCompactionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsPendingCompactionsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsPendingCompactionsGetOK creates a ColumnFamilyMetricsPendingCompactionsGetOK with default headers values +func NewColumnFamilyMetricsPendingCompactionsGetOK() *ColumnFamilyMetricsPendingCompactionsGetOK { + return &ColumnFamilyMetricsPendingCompactionsGetOK{} +} + +/*ColumnFamilyMetricsPendingCompactionsGetOK handles this case with default header values. + +ColumnFamilyMetricsPendingCompactionsGetOK column family metrics pending compactions get o k +*/ +type ColumnFamilyMetricsPendingCompactionsGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsPendingCompactionsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingCompactionsGetOK) 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 +} + +// NewColumnFamilyMetricsPendingCompactionsGetDefault creates a ColumnFamilyMetricsPendingCompactionsGetDefault with default headers values +func NewColumnFamilyMetricsPendingCompactionsGetDefault(code int) *ColumnFamilyMetricsPendingCompactionsGetDefault { + return &ColumnFamilyMetricsPendingCompactionsGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsPendingCompactionsGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsPendingCompactionsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics pending compactions get default response +func (o *ColumnFamilyMetricsPendingCompactionsGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsPendingCompactionsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingCompactionsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsPendingCompactionsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_parameters.go new file mode 100644 index 00000000000..08afe5ff0d2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsPendingFlushesByNameGetParams creates a new ColumnFamilyMetricsPendingFlushesByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsPendingFlushesByNameGetParams() *ColumnFamilyMetricsPendingFlushesByNameGetParams { + var () + return &ColumnFamilyMetricsPendingFlushesByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsPendingFlushesByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + var () + return &ColumnFamilyMetricsPendingFlushesByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithContext creates a new ColumnFamilyMetricsPendingFlushesByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + var () + return &ColumnFamilyMetricsPendingFlushesByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsPendingFlushesByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsPendingFlushesByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + var () + return &ColumnFamilyMetricsPendingFlushesByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsPendingFlushesByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics pending flushes by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsPendingFlushesByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) WithName(name string) *ColumnFamilyMetricsPendingFlushesByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics pending flushes by name get params +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsPendingFlushesByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_responses.go new file mode 100644 index 00000000000..510abdf28e4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsPendingFlushesByNameGetReader is a Reader for the ColumnFamilyMetricsPendingFlushesByNameGet structure. +type ColumnFamilyMetricsPendingFlushesByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsPendingFlushesByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsPendingFlushesByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsPendingFlushesByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsPendingFlushesByNameGetOK creates a ColumnFamilyMetricsPendingFlushesByNameGetOK with default headers values +func NewColumnFamilyMetricsPendingFlushesByNameGetOK() *ColumnFamilyMetricsPendingFlushesByNameGetOK { + return &ColumnFamilyMetricsPendingFlushesByNameGetOK{} +} + +/*ColumnFamilyMetricsPendingFlushesByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsPendingFlushesByNameGetOK column family metrics pending flushes by name get o k +*/ +type ColumnFamilyMetricsPendingFlushesByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsPendingFlushesByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingFlushesByNameGetOK) 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 +} + +// NewColumnFamilyMetricsPendingFlushesByNameGetDefault creates a ColumnFamilyMetricsPendingFlushesByNameGetDefault with default headers values +func NewColumnFamilyMetricsPendingFlushesByNameGetDefault(code int) *ColumnFamilyMetricsPendingFlushesByNameGetDefault { + return &ColumnFamilyMetricsPendingFlushesByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsPendingFlushesByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsPendingFlushesByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics pending flushes by name get default response +func (o *ColumnFamilyMetricsPendingFlushesByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsPendingFlushesByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingFlushesByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsPendingFlushesByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_parameters.go new file mode 100644 index 00000000000..b6fc38c0883 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsPendingFlushesGetParams creates a new ColumnFamilyMetricsPendingFlushesGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsPendingFlushesGetParams() *ColumnFamilyMetricsPendingFlushesGetParams { + + return &ColumnFamilyMetricsPendingFlushesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsPendingFlushesGetParamsWithTimeout creates a new ColumnFamilyMetricsPendingFlushesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsPendingFlushesGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingFlushesGetParams { + + return &ColumnFamilyMetricsPendingFlushesGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsPendingFlushesGetParamsWithContext creates a new ColumnFamilyMetricsPendingFlushesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsPendingFlushesGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsPendingFlushesGetParams { + + return &ColumnFamilyMetricsPendingFlushesGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsPendingFlushesGetParamsWithHTTPClient creates a new ColumnFamilyMetricsPendingFlushesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsPendingFlushesGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingFlushesGetParams { + + return &ColumnFamilyMetricsPendingFlushesGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsPendingFlushesGetParams contains all the parameters to send to the API endpoint +for the column family metrics pending flushes get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsPendingFlushesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsPendingFlushesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsPendingFlushesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsPendingFlushesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics pending flushes get params +func (o *ColumnFamilyMetricsPendingFlushesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsPendingFlushesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_responses.go new file mode 100644 index 00000000000..1fcf861017c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_pending_flushes_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsPendingFlushesGetReader is a Reader for the ColumnFamilyMetricsPendingFlushesGet structure. +type ColumnFamilyMetricsPendingFlushesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsPendingFlushesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsPendingFlushesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsPendingFlushesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsPendingFlushesGetOK creates a ColumnFamilyMetricsPendingFlushesGetOK with default headers values +func NewColumnFamilyMetricsPendingFlushesGetOK() *ColumnFamilyMetricsPendingFlushesGetOK { + return &ColumnFamilyMetricsPendingFlushesGetOK{} +} + +/*ColumnFamilyMetricsPendingFlushesGetOK handles this case with default header values. + +ColumnFamilyMetricsPendingFlushesGetOK column family metrics pending flushes get o k +*/ +type ColumnFamilyMetricsPendingFlushesGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsPendingFlushesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingFlushesGetOK) 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 +} + +// NewColumnFamilyMetricsPendingFlushesGetDefault creates a ColumnFamilyMetricsPendingFlushesGetDefault with default headers values +func NewColumnFamilyMetricsPendingFlushesGetDefault(code int) *ColumnFamilyMetricsPendingFlushesGetDefault { + return &ColumnFamilyMetricsPendingFlushesGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsPendingFlushesGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsPendingFlushesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics pending flushes get default response +func (o *ColumnFamilyMetricsPendingFlushesGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsPendingFlushesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsPendingFlushesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsPendingFlushesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_parameters.go new file mode 100644 index 00000000000..24c8e176b3d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRangeLatencyByNameGetParams creates a new ColumnFamilyMetricsRangeLatencyByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRangeLatencyByNameGetParams() *ColumnFamilyMetricsRangeLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRangeLatencyByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithContext creates a new ColumnFamilyMetricsRangeLatencyByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRangeLatencyByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRangeLatencyByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRangeLatencyByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics range latency by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRangeLatencyByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) WithName(name string) *ColumnFamilyMetricsRangeLatencyByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics range latency by name get params +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRangeLatencyByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_responses.go new file mode 100644 index 00000000000..897040242a9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRangeLatencyByNameGetReader is a Reader for the ColumnFamilyMetricsRangeLatencyByNameGet structure. +type ColumnFamilyMetricsRangeLatencyByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRangeLatencyByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRangeLatencyByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRangeLatencyByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRangeLatencyByNameGetOK creates a ColumnFamilyMetricsRangeLatencyByNameGetOK with default headers values +func NewColumnFamilyMetricsRangeLatencyByNameGetOK() *ColumnFamilyMetricsRangeLatencyByNameGetOK { + return &ColumnFamilyMetricsRangeLatencyByNameGetOK{} +} + +/*ColumnFamilyMetricsRangeLatencyByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRangeLatencyByNameGetOK column family metrics range latency by name get o k +*/ +type ColumnFamilyMetricsRangeLatencyByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRangeLatencyByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRangeLatencyByNameGetDefault creates a ColumnFamilyMetricsRangeLatencyByNameGetDefault with default headers values +func NewColumnFamilyMetricsRangeLatencyByNameGetDefault(code int) *ColumnFamilyMetricsRangeLatencyByNameGetDefault { + return &ColumnFamilyMetricsRangeLatencyByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRangeLatencyByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRangeLatencyByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics range latency by name get default response +func (o *ColumnFamilyMetricsRangeLatencyByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRangeLatencyByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRangeLatencyByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..b1161b41507 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics range latency estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics range latency estimated histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..6dff055f90a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK column family metrics range latency estimated histogram by name get o k +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics range latency estimated histogram by name get default response +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..a44949b15e1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics range latency estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics range latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..22b87a752ac --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK column family metrics range latency estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics range latency estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_parameters.go new file mode 100644 index 00000000000..7781892f413 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRangeLatencyGetParams creates a new ColumnFamilyMetricsRangeLatencyGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRangeLatencyGetParams() *ColumnFamilyMetricsRangeLatencyGetParams { + + return &ColumnFamilyMetricsRangeLatencyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyGetParamsWithTimeout creates a new ColumnFamilyMetricsRangeLatencyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRangeLatencyGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyGetParams { + + return &ColumnFamilyMetricsRangeLatencyGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRangeLatencyGetParamsWithContext creates a new ColumnFamilyMetricsRangeLatencyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRangeLatencyGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyGetParams { + + return &ColumnFamilyMetricsRangeLatencyGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRangeLatencyGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRangeLatencyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRangeLatencyGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyGetParams { + + return &ColumnFamilyMetricsRangeLatencyGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRangeLatencyGetParams contains all the parameters to send to the API endpoint +for the column family metrics range latency get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRangeLatencyGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRangeLatencyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRangeLatencyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRangeLatencyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics range latency get params +func (o *ColumnFamilyMetricsRangeLatencyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRangeLatencyGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_responses.go new file mode 100644 index 00000000000..09348141a5c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_range_latency_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRangeLatencyGetReader is a Reader for the ColumnFamilyMetricsRangeLatencyGet structure. +type ColumnFamilyMetricsRangeLatencyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRangeLatencyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRangeLatencyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRangeLatencyGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRangeLatencyGetOK creates a ColumnFamilyMetricsRangeLatencyGetOK with default headers values +func NewColumnFamilyMetricsRangeLatencyGetOK() *ColumnFamilyMetricsRangeLatencyGetOK { + return &ColumnFamilyMetricsRangeLatencyGetOK{} +} + +/*ColumnFamilyMetricsRangeLatencyGetOK handles this case with default header values. + +ColumnFamilyMetricsRangeLatencyGetOK column family metrics range latency get o k +*/ +type ColumnFamilyMetricsRangeLatencyGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRangeLatencyGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyGetOK) 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 +} + +// NewColumnFamilyMetricsRangeLatencyGetDefault creates a ColumnFamilyMetricsRangeLatencyGetDefault with default headers values +func NewColumnFamilyMetricsRangeLatencyGetDefault(code int) *ColumnFamilyMetricsRangeLatencyGetDefault { + return &ColumnFamilyMetricsRangeLatencyGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRangeLatencyGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRangeLatencyGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics range latency get default response +func (o *ColumnFamilyMetricsRangeLatencyGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRangeLatencyGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRangeLatencyGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRangeLatencyGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_parameters.go new file mode 100644 index 00000000000..1dec9d0242b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadByNameGetParams creates a new ColumnFamilyMetricsReadByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadByNameGetParams() *ColumnFamilyMetricsReadByNameGetParams { + var () + return &ColumnFamilyMetricsReadByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadByNameGetParams { + var () + return &ColumnFamilyMetricsReadByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadByNameGetParams { + var () + return &ColumnFamilyMetricsReadByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadByNameGetParams { + var () + return &ColumnFamilyMetricsReadByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read by name get params +func (o *ColumnFamilyMetricsReadByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_responses.go new file mode 100644 index 00000000000..829735235b3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadByNameGetReader is a Reader for the ColumnFamilyMetricsReadByNameGet structure. +type ColumnFamilyMetricsReadByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadByNameGetOK creates a ColumnFamilyMetricsReadByNameGetOK with default headers values +func NewColumnFamilyMetricsReadByNameGetOK() *ColumnFamilyMetricsReadByNameGetOK { + return &ColumnFamilyMetricsReadByNameGetOK{} +} + +/*ColumnFamilyMetricsReadByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadByNameGetOK column family metrics read by name get o k +*/ +type ColumnFamilyMetricsReadByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsReadByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadByNameGetOK) 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 +} + +// NewColumnFamilyMetricsReadByNameGetDefault creates a ColumnFamilyMetricsReadByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadByNameGetDefault(code int) *ColumnFamilyMetricsReadByNameGetDefault { + return &ColumnFamilyMetricsReadByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read by name get default response +func (o *ColumnFamilyMetricsReadByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_parameters.go new file mode 100644 index 00000000000..a9feea9d1cc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadGetParams creates a new ColumnFamilyMetricsReadGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadGetParams() *ColumnFamilyMetricsReadGetParams { + + return &ColumnFamilyMetricsReadGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadGetParamsWithTimeout creates a new ColumnFamilyMetricsReadGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadGetParams { + + return &ColumnFamilyMetricsReadGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadGetParamsWithContext creates a new ColumnFamilyMetricsReadGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadGetParams { + + return &ColumnFamilyMetricsReadGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadGetParams { + + return &ColumnFamilyMetricsReadGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadGetParams contains all the parameters to send to the API endpoint +for the column family metrics read get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read get params +func (o *ColumnFamilyMetricsReadGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_responses.go new file mode 100644 index 00000000000..b0b6d4420a4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadGetReader is a Reader for the ColumnFamilyMetricsReadGet structure. +type ColumnFamilyMetricsReadGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadGetOK creates a ColumnFamilyMetricsReadGetOK with default headers values +func NewColumnFamilyMetricsReadGetOK() *ColumnFamilyMetricsReadGetOK { + return &ColumnFamilyMetricsReadGetOK{} +} + +/*ColumnFamilyMetricsReadGetOK handles this case with default header values. + +ColumnFamilyMetricsReadGetOK column family metrics read get o k +*/ +type ColumnFamilyMetricsReadGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsReadGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadGetOK) 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 +} + +// NewColumnFamilyMetricsReadGetDefault creates a ColumnFamilyMetricsReadGetDefault with default headers values +func NewColumnFamilyMetricsReadGetDefault(code int) *ColumnFamilyMetricsReadGetDefault { + return &ColumnFamilyMetricsReadGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read get default response +func (o *ColumnFamilyMetricsReadGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_parameters.go new file mode 100644 index 00000000000..1d2786f4dc9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyByNameGetParams creates a new ColumnFamilyMetricsReadLatencyByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyByNameGetParams() *ColumnFamilyMetricsReadLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadLatencyByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read latency by name get params +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_responses.go new file mode 100644 index 00000000000..40925cd8c37 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyByNameGetReader is a Reader for the ColumnFamilyMetricsReadLatencyByNameGet structure. +type ColumnFamilyMetricsReadLatencyByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyByNameGetOK creates a ColumnFamilyMetricsReadLatencyByNameGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyByNameGetOK() *ColumnFamilyMetricsReadLatencyByNameGetOK { + return &ColumnFamilyMetricsReadLatencyByNameGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyByNameGetOK column family metrics read latency by name get o k +*/ +type ColumnFamilyMetricsReadLatencyByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsReadLatencyByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyByNameGetOK) 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 +} + +// NewColumnFamilyMetricsReadLatencyByNameGetDefault creates a ColumnFamilyMetricsReadLatencyByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyByNameGetDefault(code int) *ColumnFamilyMetricsReadLatencyByNameGetDefault { + return &ColumnFamilyMetricsReadLatencyByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency by name get default response +func (o *ColumnFamilyMetricsReadLatencyByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..c97719b5f12 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read latency estimated histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..8040ba6e267 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK column family metrics read latency estimated histogram by name get o k +*/ +type ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency estimated histogram by name get default response +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..75a54453823 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..c2378fbe009 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK column family metrics read latency estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_parameters.go new file mode 100644 index 00000000000..c4bd04ccb1c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyGetParams creates a new ColumnFamilyMetricsReadLatencyGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyGetParams() *ColumnFamilyMetricsReadLatencyGetParams { + + return &ColumnFamilyMetricsReadLatencyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyGetParams { + + return &ColumnFamilyMetricsReadLatencyGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyGetParams { + + return &ColumnFamilyMetricsReadLatencyGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyGetParams { + + return &ColumnFamilyMetricsReadLatencyGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency get params +func (o *ColumnFamilyMetricsReadLatencyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_responses.go new file mode 100644 index 00000000000..8286f0d8b36 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyGetReader is a Reader for the ColumnFamilyMetricsReadLatencyGet structure. +type ColumnFamilyMetricsReadLatencyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyGetOK creates a ColumnFamilyMetricsReadLatencyGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyGetOK() *ColumnFamilyMetricsReadLatencyGetOK { + return &ColumnFamilyMetricsReadLatencyGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyGetOK column family metrics read latency get o k +*/ +type ColumnFamilyMetricsReadLatencyGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsReadLatencyGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyGetOK) 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 +} + +// NewColumnFamilyMetricsReadLatencyGetDefault creates a ColumnFamilyMetricsReadLatencyGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyGetDefault(code int) *ColumnFamilyMetricsReadLatencyGetDefault { + return &ColumnFamilyMetricsReadLatencyGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency get default response +func (o *ColumnFamilyMetricsReadLatencyGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..e62d7d8ff7c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetParams creates a new ColumnFamilyMetricsReadLatencyHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetParams() *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read latency histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..4e9647be81b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsReadLatencyHistogramByNameGet structure. +type ColumnFamilyMetricsReadLatencyHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetOK creates a ColumnFamilyMetricsReadLatencyHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetOK() *ColumnFamilyMetricsReadLatencyHistogramByNameGetOK { + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyHistogramByNameGetOK column family metrics read latency histogram by name get o k +*/ +type ColumnFamilyMetricsReadLatencyHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsReadLatencyHistogramByNameGetDefault creates a ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyHistogramByNameGetDefault(code int) *ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault { + return &ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency histogram by name get default response +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_parameters.go new file mode 100644 index 00000000000..f3bd50e1e20 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyHistogramGetParams creates a new ColumnFamilyMetricsReadLatencyHistogramGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyHistogramGetParams() *ColumnFamilyMetricsReadLatencyHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyHistogramGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyHistogramGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyHistogramGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyHistogramGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyHistogramGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency histogram get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency histogram get params +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_responses.go new file mode 100644 index 00000000000..4f97e545eb6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_histogram_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyHistogramGetReader is a Reader for the ColumnFamilyMetricsReadLatencyHistogramGet structure. +type ColumnFamilyMetricsReadLatencyHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyHistogramGetOK creates a ColumnFamilyMetricsReadLatencyHistogramGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyHistogramGetOK() *ColumnFamilyMetricsReadLatencyHistogramGetOK { + return &ColumnFamilyMetricsReadLatencyHistogramGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyHistogramGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyHistogramGetOK column family metrics read latency histogram get o k +*/ +type ColumnFamilyMetricsReadLatencyHistogramGetOK struct { + Payload []*models.Histogram +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramGetOK) GetPayload() []*models.Histogram { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramGetOK) 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 +} + +// NewColumnFamilyMetricsReadLatencyHistogramGetDefault creates a ColumnFamilyMetricsReadLatencyHistogramGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyHistogramGetDefault(code int) *ColumnFamilyMetricsReadLatencyHistogramGetDefault { + return &ColumnFamilyMetricsReadLatencyHistogramGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency histogram get default response +func (o *ColumnFamilyMetricsReadLatencyHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..897211bd812 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams() *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency moving average histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics read latency moving average histogram by name get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..19223e41a97 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGet structure. +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK creates a ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK() *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK { + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK column family metrics read latency moving average histogram by name get o k +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault creates a ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault(code int) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault { + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency moving average histogram by name get default response +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_parameters.go new file mode 100644 index 00000000000..c0babafd453 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams() *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithTimeout creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithContext creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithHTTPClient creates a new ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams contains all the parameters to send to the API endpoint +for the column family metrics read latency moving average histogram get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics read latency moving average histogram get params +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_responses.go new file mode 100644 index 00000000000..4a4cbf22e90 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_read_latency_moving_average_histogram_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetReader is a Reader for the ColumnFamilyMetricsReadLatencyMovingAverageHistogramGet structure. +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK creates a ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK with default headers values +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK() *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK { + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK{} +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK handles this case with default header values. + +ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK column family metrics read latency moving average histogram get o k +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK struct { + Payload []*models.RateMovingAverageAndHistogram +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK) GetPayload() []*models.RateMovingAverageAndHistogram { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK) 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 +} + +// NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault creates a ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault with default headers values +func NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault(code int) *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault { + return &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics read latency moving average histogram get default response +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_parameters.go new file mode 100644 index 00000000000..c6d9f83bf3b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams() *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithContext creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics recent bloom filter false positives by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) WithName(name string) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics recent bloom filter false positives by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_responses.go new file mode 100644 index 00000000000..ed89d6d8c91 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetReader is a Reader for the ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGet structure. +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK creates a ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK() *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK { + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK{} +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK column family metrics recent bloom filter false positives by name get o k +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault creates a ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault(code int) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault { + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics recent bloom filter false positives by name get default response +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_parameters.go new file mode 100644 index 00000000000..dc0490d7995 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams() *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithTimeout creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithContext creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams contains all the parameters to send to the API endpoint +for the column family metrics recent bloom filter false positives get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false positives get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_responses.go new file mode 100644 index 00000000000..a0cff0f0a75 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_positives_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetReader is a Reader for the ColumnFamilyMetricsRecentBloomFilterFalsePositivesGet structure. +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK creates a ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK() *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK { + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK{} +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK handles this case with default header values. + +ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK column family metrics recent bloom filter false positives get o k +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK) 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 +} + +// NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault creates a ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault(code int) *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault { + return &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics recent bloom filter false positives get default response +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_parameters.go new file mode 100644 index 00000000000..b98e53b6fce --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams() *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithContext creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + var () + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics recent bloom filter false ratio by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) WithName(name string) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics recent bloom filter false ratio by name get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_responses.go new file mode 100644 index 00000000000..22d1ea64ca0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetReader is a Reader for the ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGet structure. +type ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK creates a ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK() *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK { + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK{} +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK column family metrics recent bloom filter false ratio by name get o k +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault creates a ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault(code int) *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault { + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics recent bloom filter false ratio by name get default response +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_parameters.go new file mode 100644 index 00000000000..939c370b1ee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams() *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithTimeout creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithContext creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams contains all the parameters to send to the API endpoint +for the column family metrics recent bloom filter false ratio get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics recent bloom filter false ratio get params +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_responses.go new file mode 100644 index 00000000000..a267ad4a2df --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_recent_bloom_filter_false_ratio_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRecentBloomFilterFalseRatioGetReader is a Reader for the ColumnFamilyMetricsRecentBloomFilterFalseRatioGet structure. +type ColumnFamilyMetricsRecentBloomFilterFalseRatioGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK creates a ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK() *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK { + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK{} +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK handles this case with default header values. + +ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK column family metrics recent bloom filter false ratio get o k +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK) 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 +} + +// NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault creates a ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault with default headers values +func NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault(code int) *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault { + return &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics recent bloom filter false ratio get default response +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_parameters.go new file mode 100644 index 00000000000..d08ba098c4c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheHitByNameGetParams creates a new ColumnFamilyMetricsRowCacheHitByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheHitByNameGetParams() *ColumnFamilyMetricsRowCacheHitByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheHitByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheHitByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheHitByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheHitByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheHitByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache hit by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheHitByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) WithName(name string) *ColumnFamilyMetricsRowCacheHitByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics row cache hit by name get params +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheHitByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_responses.go new file mode 100644 index 00000000000..a5e1e3dff55 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheHitByNameGetReader is a Reader for the ColumnFamilyMetricsRowCacheHitByNameGet structure. +type ColumnFamilyMetricsRowCacheHitByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheHitByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheHitByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheHitByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheHitByNameGetOK creates a ColumnFamilyMetricsRowCacheHitByNameGetOK with default headers values +func NewColumnFamilyMetricsRowCacheHitByNameGetOK() *ColumnFamilyMetricsRowCacheHitByNameGetOK { + return &ColumnFamilyMetricsRowCacheHitByNameGetOK{} +} + +/*ColumnFamilyMetricsRowCacheHitByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheHitByNameGetOK column family metrics row cache hit by name get o k +*/ +type ColumnFamilyMetricsRowCacheHitByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheHitByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheHitByNameGetDefault creates a ColumnFamilyMetricsRowCacheHitByNameGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheHitByNameGetDefault(code int) *ColumnFamilyMetricsRowCacheHitByNameGetDefault { + return &ColumnFamilyMetricsRowCacheHitByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheHitByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheHitByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache hit by name get default response +func (o *ColumnFamilyMetricsRowCacheHitByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheHitByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheHitByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_parameters.go new file mode 100644 index 00000000000..f7f485a7b11 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheHitGetParams creates a new ColumnFamilyMetricsRowCacheHitGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheHitGetParams() *ColumnFamilyMetricsRowCacheHitGetParams { + + return &ColumnFamilyMetricsRowCacheHitGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheHitGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheHitGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitGetParams { + + return &ColumnFamilyMetricsRowCacheHitGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheHitGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheHitGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitGetParams { + + return &ColumnFamilyMetricsRowCacheHitGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheHitGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheHitGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheHitGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitGetParams { + + return &ColumnFamilyMetricsRowCacheHitGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheHitGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache hit get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheHitGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache hit get params +func (o *ColumnFamilyMetricsRowCacheHitGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheHitGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_responses.go new file mode 100644 index 00000000000..7887af21008 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheHitGetReader is a Reader for the ColumnFamilyMetricsRowCacheHitGet structure. +type ColumnFamilyMetricsRowCacheHitGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheHitGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheHitGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheHitGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheHitGetOK creates a ColumnFamilyMetricsRowCacheHitGetOK with default headers values +func NewColumnFamilyMetricsRowCacheHitGetOK() *ColumnFamilyMetricsRowCacheHitGetOK { + return &ColumnFamilyMetricsRowCacheHitGetOK{} +} + +/*ColumnFamilyMetricsRowCacheHitGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheHitGetOK column family metrics row cache hit get o k +*/ +type ColumnFamilyMetricsRowCacheHitGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheHitGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheHitGetDefault creates a ColumnFamilyMetricsRowCacheHitGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheHitGetDefault(code int) *ColumnFamilyMetricsRowCacheHitGetDefault { + return &ColumnFamilyMetricsRowCacheHitGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheHitGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheHitGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache hit get default response +func (o *ColumnFamilyMetricsRowCacheHitGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheHitGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheHitGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_parameters.go new file mode 100644 index 00000000000..c97a92069cb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams() *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache hit out of range by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) WithName(name string) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics row cache hit out of range by name get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_responses.go new file mode 100644 index 00000000000..f9f95e0dbe9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetReader is a Reader for the ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGet structure. +type ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK creates a ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK with default headers values +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK() *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK { + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK{} +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK column family metrics row cache hit out of range by name get o k +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault creates a ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault(code int) *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault { + return &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache hit out of range by name get default response +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_parameters.go new file mode 100644 index 00000000000..5960626e95a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParams creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParams() *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache hit out of range get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache hit out of range get params +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_responses.go new file mode 100644 index 00000000000..5967eed8f4f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_hit_out_of_range_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheHitOutOfRangeGetReader is a Reader for the ColumnFamilyMetricsRowCacheHitOutOfRangeGet structure. +type ColumnFamilyMetricsRowCacheHitOutOfRangeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheHitOutOfRangeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetOK creates a ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK with default headers values +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetOK() *ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK { + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK{} +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK column family metrics row cache hit out of range get o k +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault creates a ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault(code int) *ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault { + return &ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache hit out of range get default response +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_parameters.go new file mode 100644 index 00000000000..16ff1afa1d1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheMissByNameGetParams creates a new ColumnFamilyMetricsRowCacheMissByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheMissByNameGetParams() *ColumnFamilyMetricsRowCacheMissByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheMissByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheMissByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheMissByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheMissByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheMissByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheMissByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheMissByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + var () + return &ColumnFamilyMetricsRowCacheMissByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheMissByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache miss by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheMissByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) WithName(name string) *ColumnFamilyMetricsRowCacheMissByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics row cache miss by name get params +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheMissByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_responses.go new file mode 100644 index 00000000000..961af646b69 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheMissByNameGetReader is a Reader for the ColumnFamilyMetricsRowCacheMissByNameGet structure. +type ColumnFamilyMetricsRowCacheMissByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheMissByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheMissByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheMissByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheMissByNameGetOK creates a ColumnFamilyMetricsRowCacheMissByNameGetOK with default headers values +func NewColumnFamilyMetricsRowCacheMissByNameGetOK() *ColumnFamilyMetricsRowCacheMissByNameGetOK { + return &ColumnFamilyMetricsRowCacheMissByNameGetOK{} +} + +/*ColumnFamilyMetricsRowCacheMissByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheMissByNameGetOK column family metrics row cache miss by name get o k +*/ +type ColumnFamilyMetricsRowCacheMissByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheMissByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheMissByNameGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheMissByNameGetDefault creates a ColumnFamilyMetricsRowCacheMissByNameGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheMissByNameGetDefault(code int) *ColumnFamilyMetricsRowCacheMissByNameGetDefault { + return &ColumnFamilyMetricsRowCacheMissByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheMissByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheMissByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache miss by name get default response +func (o *ColumnFamilyMetricsRowCacheMissByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheMissByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheMissByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheMissByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_parameters.go new file mode 100644 index 00000000000..f0868563f10 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsRowCacheMissGetParams creates a new ColumnFamilyMetricsRowCacheMissGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsRowCacheMissGetParams() *ColumnFamilyMetricsRowCacheMissGetParams { + + return &ColumnFamilyMetricsRowCacheMissGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsRowCacheMissGetParamsWithTimeout creates a new ColumnFamilyMetricsRowCacheMissGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsRowCacheMissGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheMissGetParams { + + return &ColumnFamilyMetricsRowCacheMissGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsRowCacheMissGetParamsWithContext creates a new ColumnFamilyMetricsRowCacheMissGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsRowCacheMissGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheMissGetParams { + + return &ColumnFamilyMetricsRowCacheMissGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsRowCacheMissGetParamsWithHTTPClient creates a new ColumnFamilyMetricsRowCacheMissGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsRowCacheMissGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheMissGetParams { + + return &ColumnFamilyMetricsRowCacheMissGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsRowCacheMissGetParams contains all the parameters to send to the API endpoint +for the column family metrics row cache miss get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsRowCacheMissGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsRowCacheMissGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsRowCacheMissGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsRowCacheMissGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics row cache miss get params +func (o *ColumnFamilyMetricsRowCacheMissGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsRowCacheMissGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_responses.go new file mode 100644 index 00000000000..dc03b5c7511 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_row_cache_miss_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsRowCacheMissGetReader is a Reader for the ColumnFamilyMetricsRowCacheMissGet structure. +type ColumnFamilyMetricsRowCacheMissGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsRowCacheMissGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsRowCacheMissGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsRowCacheMissGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsRowCacheMissGetOK creates a ColumnFamilyMetricsRowCacheMissGetOK with default headers values +func NewColumnFamilyMetricsRowCacheMissGetOK() *ColumnFamilyMetricsRowCacheMissGetOK { + return &ColumnFamilyMetricsRowCacheMissGetOK{} +} + +/*ColumnFamilyMetricsRowCacheMissGetOK handles this case with default header values. + +ColumnFamilyMetricsRowCacheMissGetOK column family metrics row cache miss get o k +*/ +type ColumnFamilyMetricsRowCacheMissGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsRowCacheMissGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheMissGetOK) 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 +} + +// NewColumnFamilyMetricsRowCacheMissGetDefault creates a ColumnFamilyMetricsRowCacheMissGetDefault with default headers values +func NewColumnFamilyMetricsRowCacheMissGetDefault(code int) *ColumnFamilyMetricsRowCacheMissGetDefault { + return &ColumnFamilyMetricsRowCacheMissGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsRowCacheMissGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsRowCacheMissGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics row cache miss get default response +func (o *ColumnFamilyMetricsRowCacheMissGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsRowCacheMissGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsRowCacheMissGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsRowCacheMissGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_parameters.go new file mode 100644 index 00000000000..a53b473aa6b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetParams creates a new ColumnFamilyMetricsSnapshotsSizeByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsSnapshotsSizeByNameGetParams() *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + var () + return &ColumnFamilyMetricsSnapshotsSizeByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsSnapshotsSizeByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + var () + return &ColumnFamilyMetricsSnapshotsSizeByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithContext creates a new ColumnFamilyMetricsSnapshotsSizeByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + var () + return &ColumnFamilyMetricsSnapshotsSizeByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsSnapshotsSizeByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsSnapshotsSizeByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + var () + return &ColumnFamilyMetricsSnapshotsSizeByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsSnapshotsSizeByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics snapshots size by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsSnapshotsSizeByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) WithName(name string) *ColumnFamilyMetricsSnapshotsSizeByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics snapshots size by name get params +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_responses.go new file mode 100644 index 00000000000..ffecc93c856 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_snapshots_size_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsSnapshotsSizeByNameGetReader is a Reader for the ColumnFamilyMetricsSnapshotsSizeByNameGet structure. +type ColumnFamilyMetricsSnapshotsSizeByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsSnapshotsSizeByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsSnapshotsSizeByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetOK creates a ColumnFamilyMetricsSnapshotsSizeByNameGetOK with default headers values +func NewColumnFamilyMetricsSnapshotsSizeByNameGetOK() *ColumnFamilyMetricsSnapshotsSizeByNameGetOK { + return &ColumnFamilyMetricsSnapshotsSizeByNameGetOK{} +} + +/*ColumnFamilyMetricsSnapshotsSizeByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsSnapshotsSizeByNameGetOK column family metrics snapshots size by name get o k +*/ +type ColumnFamilyMetricsSnapshotsSizeByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetOK) 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 +} + +// NewColumnFamilyMetricsSnapshotsSizeByNameGetDefault creates a ColumnFamilyMetricsSnapshotsSizeByNameGetDefault with default headers values +func NewColumnFamilyMetricsSnapshotsSizeByNameGetDefault(code int) *ColumnFamilyMetricsSnapshotsSizeByNameGetDefault { + return &ColumnFamilyMetricsSnapshotsSizeByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsSnapshotsSizeByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsSnapshotsSizeByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics snapshots size by name get default response +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsSnapshotsSizeByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_parameters.go new file mode 100644 index 00000000000..2ba865f5c14 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetParams creates a new ColumnFamilyMetricsSpeculativeRetriesByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetParams() *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + var () + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsSpeculativeRetriesByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + var () + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithContext creates a new ColumnFamilyMetricsSpeculativeRetriesByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + var () + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsSpeculativeRetriesByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + var () + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsSpeculativeRetriesByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics speculative retries by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsSpeculativeRetriesByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) WithName(name string) *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics speculative retries by name get params +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_responses.go new file mode 100644 index 00000000000..aab5ee35ba4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsSpeculativeRetriesByNameGetReader is a Reader for the ColumnFamilyMetricsSpeculativeRetriesByNameGet structure. +type ColumnFamilyMetricsSpeculativeRetriesByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsSpeculativeRetriesByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsSpeculativeRetriesByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetOK creates a ColumnFamilyMetricsSpeculativeRetriesByNameGetOK with default headers values +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetOK() *ColumnFamilyMetricsSpeculativeRetriesByNameGetOK { + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetOK{} +} + +/*ColumnFamilyMetricsSpeculativeRetriesByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsSpeculativeRetriesByNameGetOK column family metrics speculative retries by name get o k +*/ +type ColumnFamilyMetricsSpeculativeRetriesByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetOK) 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 +} + +// NewColumnFamilyMetricsSpeculativeRetriesByNameGetDefault creates a ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault with default headers values +func NewColumnFamilyMetricsSpeculativeRetriesByNameGetDefault(code int) *ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault { + return &ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics speculative retries by name get default response +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_parameters.go new file mode 100644 index 00000000000..cdafb1c59c6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsSpeculativeRetriesGetParams creates a new ColumnFamilyMetricsSpeculativeRetriesGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsSpeculativeRetriesGetParams() *ColumnFamilyMetricsSpeculativeRetriesGetParams { + + return &ColumnFamilyMetricsSpeculativeRetriesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithTimeout creates a new ColumnFamilyMetricsSpeculativeRetriesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + + return &ColumnFamilyMetricsSpeculativeRetriesGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithContext creates a new ColumnFamilyMetricsSpeculativeRetriesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + + return &ColumnFamilyMetricsSpeculativeRetriesGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithHTTPClient creates a new ColumnFamilyMetricsSpeculativeRetriesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsSpeculativeRetriesGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + + return &ColumnFamilyMetricsSpeculativeRetriesGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsSpeculativeRetriesGetParams contains all the parameters to send to the API endpoint +for the column family metrics speculative retries get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsSpeculativeRetriesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsSpeculativeRetriesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics speculative retries get params +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsSpeculativeRetriesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_responses.go new file mode 100644 index 00000000000..b37d4b4a6a0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_speculative_retries_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsSpeculativeRetriesGetReader is a Reader for the ColumnFamilyMetricsSpeculativeRetriesGet structure. +type ColumnFamilyMetricsSpeculativeRetriesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsSpeculativeRetriesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsSpeculativeRetriesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsSpeculativeRetriesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsSpeculativeRetriesGetOK creates a ColumnFamilyMetricsSpeculativeRetriesGetOK with default headers values +func NewColumnFamilyMetricsSpeculativeRetriesGetOK() *ColumnFamilyMetricsSpeculativeRetriesGetOK { + return &ColumnFamilyMetricsSpeculativeRetriesGetOK{} +} + +/*ColumnFamilyMetricsSpeculativeRetriesGetOK handles this case with default header values. + +ColumnFamilyMetricsSpeculativeRetriesGetOK column family metrics speculative retries get o k +*/ +type ColumnFamilyMetricsSpeculativeRetriesGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesGetOK) 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 +} + +// NewColumnFamilyMetricsSpeculativeRetriesGetDefault creates a ColumnFamilyMetricsSpeculativeRetriesGetDefault with default headers values +func NewColumnFamilyMetricsSpeculativeRetriesGetDefault(code int) *ColumnFamilyMetricsSpeculativeRetriesGetDefault { + return &ColumnFamilyMetricsSpeculativeRetriesGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsSpeculativeRetriesGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsSpeculativeRetriesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics speculative retries get default response +func (o *ColumnFamilyMetricsSpeculativeRetriesGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsSpeculativeRetriesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..ec2c85edace --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams creates a new ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams() *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics sstables per read histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics sstables per read histogram by name get params +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..e30fe3e1ec9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_sstables_per_read_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsSstablesPerReadHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsSstablesPerReadHistogramByNameGet structure. +type ColumnFamilyMetricsSstablesPerReadHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK creates a ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK() *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK { + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK column family metrics sstables per read histogram by name get o k +*/ +type ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault creates a ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault(code int) *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault { + return &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics sstables per read histogram by name get default response +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..86aa7fb5527 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams creates a new ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams() *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics tombstone scanned histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics tombstone scanned histogram by name get params +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..67fd0f8c35b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_tombstone_scanned_histogram_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsTombstoneScannedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsTombstoneScannedHistogramByNameGet structure. +type ColumnFamilyMetricsTombstoneScannedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK creates a ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK() *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK { + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK column family metrics tombstone scanned histogram by name get o k +*/ +type ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK) 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 +} + +// NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault creates a ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault { + return &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics tombstone scanned histogram by name get default response +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_parameters.go new file mode 100644 index 00000000000..e7a1c669bba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams creates a new ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams() *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithContext creates a new ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + var () + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics total disk space used by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) WithName(name string) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics total disk space used by name get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_responses.go new file mode 100644 index 00000000000..b9eec53ccde --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetReader is a Reader for the ColumnFamilyMetricsTotalDiskSpaceUsedByNameGet structure. +type ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK creates a ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK with default headers values +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK() *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK { + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK{} +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK column family metrics total disk space used by name get o k +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK struct { + Payload int64 +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK) GetPayload() int64 { + return o.Payload +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK) 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 +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault creates a ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault with default headers values +func NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault(code int) *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault { + return &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics total disk space used by name get default response +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_parameters.go new file mode 100644 index 00000000000..1391bccad2f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetParams creates a new ColumnFamilyMetricsTotalDiskSpaceUsedGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetParams() *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithTimeout creates a new ColumnFamilyMetricsTotalDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithContext creates a new ColumnFamilyMetricsTotalDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithHTTPClient creates a new ColumnFamilyMetricsTotalDiskSpaceUsedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedGetParams contains all the parameters to send to the API endpoint +for the column family metrics total disk space used get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics total disk space used get params +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_responses.go new file mode 100644 index 00000000000..ecbd4f64460 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_total_disk_space_used_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsTotalDiskSpaceUsedGetReader is a Reader for the ColumnFamilyMetricsTotalDiskSpaceUsedGet structure. +type ColumnFamilyMetricsTotalDiskSpaceUsedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsTotalDiskSpaceUsedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsTotalDiskSpaceUsedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetOK creates a ColumnFamilyMetricsTotalDiskSpaceUsedGetOK with default headers values +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetOK() *ColumnFamilyMetricsTotalDiskSpaceUsedGetOK { + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetOK{} +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedGetOK handles this case with default header values. + +ColumnFamilyMetricsTotalDiskSpaceUsedGetOK column family metrics total disk space used get o k +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedGetOK struct { + Payload int64 +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetOK) GetPayload() int64 { + return o.Payload +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetOK) 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 +} + +// NewColumnFamilyMetricsTotalDiskSpaceUsedGetDefault creates a ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault with default headers values +func NewColumnFamilyMetricsTotalDiskSpaceUsedGetDefault(code int) *ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault { + return &ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics total disk space used get default response +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_parameters.go new file mode 100644 index 00000000000..36849c68313 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetParams creates a new ColumnFamilyMetricsTrueSnapshotsSizeGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsTrueSnapshotsSizeGetParams() *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + + return &ColumnFamilyMetricsTrueSnapshotsSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithTimeout creates a new ColumnFamilyMetricsTrueSnapshotsSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + + return &ColumnFamilyMetricsTrueSnapshotsSizeGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithContext creates a new ColumnFamilyMetricsTrueSnapshotsSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + + return &ColumnFamilyMetricsTrueSnapshotsSizeGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithHTTPClient creates a new ColumnFamilyMetricsTrueSnapshotsSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsTrueSnapshotsSizeGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + + return &ColumnFamilyMetricsTrueSnapshotsSizeGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsTrueSnapshotsSizeGetParams contains all the parameters to send to the API endpoint +for the column family metrics true snapshots size get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsTrueSnapshotsSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsTrueSnapshotsSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics true snapshots size get params +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_responses.go new file mode 100644 index 00000000000..e4f69b6a9a4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_true_snapshots_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsTrueSnapshotsSizeGetReader is a Reader for the ColumnFamilyMetricsTrueSnapshotsSizeGet structure. +type ColumnFamilyMetricsTrueSnapshotsSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsTrueSnapshotsSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsTrueSnapshotsSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetOK creates a ColumnFamilyMetricsTrueSnapshotsSizeGetOK with default headers values +func NewColumnFamilyMetricsTrueSnapshotsSizeGetOK() *ColumnFamilyMetricsTrueSnapshotsSizeGetOK { + return &ColumnFamilyMetricsTrueSnapshotsSizeGetOK{} +} + +/*ColumnFamilyMetricsTrueSnapshotsSizeGetOK handles this case with default header values. + +ColumnFamilyMetricsTrueSnapshotsSizeGetOK column family metrics true snapshots size get o k +*/ +type ColumnFamilyMetricsTrueSnapshotsSizeGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetOK) 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 +} + +// NewColumnFamilyMetricsTrueSnapshotsSizeGetDefault creates a ColumnFamilyMetricsTrueSnapshotsSizeGetDefault with default headers values +func NewColumnFamilyMetricsTrueSnapshotsSizeGetDefault(code int) *ColumnFamilyMetricsTrueSnapshotsSizeGetDefault { + return &ColumnFamilyMetricsTrueSnapshotsSizeGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsTrueSnapshotsSizeGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsTrueSnapshotsSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics true snapshots size get default response +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsTrueSnapshotsSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_parameters.go new file mode 100644 index 00000000000..8fca992e02d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetParams creates a new ColumnFamilyMetricsWaitingOnFreeMemtableGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetParams() *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithTimeout creates a new ColumnFamilyMetricsWaitingOnFreeMemtableGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithContext creates a new ColumnFamilyMetricsWaitingOnFreeMemtableGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWaitingOnFreeMemtableGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWaitingOnFreeMemtableGetParams contains all the parameters to send to the API endpoint +for the column family metrics waiting on free memtable get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWaitingOnFreeMemtableGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics waiting on free memtable get params +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_responses.go new file mode 100644 index 00000000000..8d72d7d75a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_waiting_on_free_memtable_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWaitingOnFreeMemtableGetReader is a Reader for the ColumnFamilyMetricsWaitingOnFreeMemtableGet structure. +type ColumnFamilyMetricsWaitingOnFreeMemtableGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWaitingOnFreeMemtableGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWaitingOnFreeMemtableGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetOK creates a ColumnFamilyMetricsWaitingOnFreeMemtableGetOK with default headers values +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetOK() *ColumnFamilyMetricsWaitingOnFreeMemtableGetOK { + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetOK{} +} + +/*ColumnFamilyMetricsWaitingOnFreeMemtableGetOK handles this case with default header values. + +ColumnFamilyMetricsWaitingOnFreeMemtableGetOK column family metrics waiting on free memtable get o k +*/ +type ColumnFamilyMetricsWaitingOnFreeMemtableGetOK struct { +} + +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsWaitingOnFreeMemtableGetDefault creates a ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault with default headers values +func NewColumnFamilyMetricsWaitingOnFreeMemtableGetDefault(code int) *ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault { + return &ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics waiting on free memtable get default response +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_parameters.go new file mode 100644 index 00000000000..0062a14799a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteByNameGetParams creates a new ColumnFamilyMetricsWriteByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteByNameGetParams() *ColumnFamilyMetricsWriteByNameGetParams { + var () + return &ColumnFamilyMetricsWriteByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteByNameGetParams { + var () + return &ColumnFamilyMetricsWriteByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteByNameGetParams { + var () + return &ColumnFamilyMetricsWriteByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteByNameGetParams { + var () + return &ColumnFamilyMetricsWriteByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write by name get params +func (o *ColumnFamilyMetricsWriteByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_responses.go new file mode 100644 index 00000000000..bb90c114cc6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteByNameGetReader is a Reader for the ColumnFamilyMetricsWriteByNameGet structure. +type ColumnFamilyMetricsWriteByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteByNameGetOK creates a ColumnFamilyMetricsWriteByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteByNameGetOK() *ColumnFamilyMetricsWriteByNameGetOK { + return &ColumnFamilyMetricsWriteByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteByNameGetOK column family metrics write by name get o k +*/ +type ColumnFamilyMetricsWriteByNameGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsWriteByNameGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteByNameGetOK) 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 +} + +// NewColumnFamilyMetricsWriteByNameGetDefault creates a ColumnFamilyMetricsWriteByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteByNameGetDefault(code int) *ColumnFamilyMetricsWriteByNameGetDefault { + return &ColumnFamilyMetricsWriteByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write by name get default response +func (o *ColumnFamilyMetricsWriteByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_parameters.go new file mode 100644 index 00000000000..0f01efda26d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteGetParams creates a new ColumnFamilyMetricsWriteGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteGetParams() *ColumnFamilyMetricsWriteGetParams { + + return &ColumnFamilyMetricsWriteGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteGetParams { + + return &ColumnFamilyMetricsWriteGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteGetParamsWithContext creates a new ColumnFamilyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteGetParams { + + return &ColumnFamilyMetricsWriteGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteGetParams { + + return &ColumnFamilyMetricsWriteGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteGetParams contains all the parameters to send to the API endpoint +for the column family metrics write get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write get params +func (o *ColumnFamilyMetricsWriteGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_responses.go new file mode 100644 index 00000000000..cd02d77c086 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteGetReader is a Reader for the ColumnFamilyMetricsWriteGet structure. +type ColumnFamilyMetricsWriteGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteGetOK creates a ColumnFamilyMetricsWriteGetOK with default headers values +func NewColumnFamilyMetricsWriteGetOK() *ColumnFamilyMetricsWriteGetOK { + return &ColumnFamilyMetricsWriteGetOK{} +} + +/*ColumnFamilyMetricsWriteGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteGetOK column family metrics write get o k +*/ +type ColumnFamilyMetricsWriteGetOK struct { + Payload interface{} +} + +func (o *ColumnFamilyMetricsWriteGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteGetOK) 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 +} + +// NewColumnFamilyMetricsWriteGetDefault creates a ColumnFamilyMetricsWriteGetDefault with default headers values +func NewColumnFamilyMetricsWriteGetDefault(code int) *ColumnFamilyMetricsWriteGetDefault { + return &ColumnFamilyMetricsWriteGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write get default response +func (o *ColumnFamilyMetricsWriteGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_parameters.go new file mode 100644 index 00000000000..3d109dd2b28 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyByNameGetParams creates a new ColumnFamilyMetricsWriteLatencyByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyByNameGetParams() *ColumnFamilyMetricsWriteLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteLatencyByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write latency by name get params +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_responses.go new file mode 100644 index 00000000000..1ea8afc8470 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyByNameGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyByNameGet structure. +type ColumnFamilyMetricsWriteLatencyByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyByNameGetOK creates a ColumnFamilyMetricsWriteLatencyByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyByNameGetOK() *ColumnFamilyMetricsWriteLatencyByNameGetOK { + return &ColumnFamilyMetricsWriteLatencyByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyByNameGetOK column family metrics write latency by name get o k +*/ +type ColumnFamilyMetricsWriteLatencyByNameGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsWriteLatencyByNameGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyByNameGetOK) 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 +} + +// NewColumnFamilyMetricsWriteLatencyByNameGetDefault creates a ColumnFamilyMetricsWriteLatencyByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyByNameGetDefault(code int) *ColumnFamilyMetricsWriteLatencyByNameGetDefault { + return &ColumnFamilyMetricsWriteLatencyByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency by name get default response +func (o *ColumnFamilyMetricsWriteLatencyByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..33f4fac2e82 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams creates a new ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams() *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency estimated histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write latency estimated histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..66eb667dc3a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGet structure. +type ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK creates a ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK() *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK { + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK column family metrics write latency estimated histogram by name get o k +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault creates a ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault(code int) *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault { + return &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency estimated histogram by name get default response +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..8db458ef9c7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams creates a new ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams() *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency estimated recent histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write latency estimated recent histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..b8ab5911bd6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_estimated_recent_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGet structure. +type ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK creates a ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK() *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK { + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK column family metrics write latency estimated recent histogram by name get o k +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault creates a ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault(code int) *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault { + return &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency estimated recent histogram by name get default response +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_parameters.go new file mode 100644 index 00000000000..c0e3d9ee1da --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyGetParams creates a new ColumnFamilyMetricsWriteLatencyGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyGetParams() *ColumnFamilyMetricsWriteLatencyGetParams { + + return &ColumnFamilyMetricsWriteLatencyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyGetParams { + + return &ColumnFamilyMetricsWriteLatencyGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyGetParams { + + return &ColumnFamilyMetricsWriteLatencyGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyGetParams { + + return &ColumnFamilyMetricsWriteLatencyGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency get params +func (o *ColumnFamilyMetricsWriteLatencyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_responses.go new file mode 100644 index 00000000000..2b241465f1a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyGet structure. +type ColumnFamilyMetricsWriteLatencyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyGetOK creates a ColumnFamilyMetricsWriteLatencyGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyGetOK() *ColumnFamilyMetricsWriteLatencyGetOK { + return &ColumnFamilyMetricsWriteLatencyGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyGetOK column family metrics write latency get o k +*/ +type ColumnFamilyMetricsWriteLatencyGetOK struct { + Payload int32 +} + +func (o *ColumnFamilyMetricsWriteLatencyGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyGetOK) 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 +} + +// NewColumnFamilyMetricsWriteLatencyGetDefault creates a ColumnFamilyMetricsWriteLatencyGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyGetDefault(code int) *ColumnFamilyMetricsWriteLatencyGetDefault { + return &ColumnFamilyMetricsWriteLatencyGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency get default response +func (o *ColumnFamilyMetricsWriteLatencyGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..339812939cd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParams creates a new ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParams() *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write latency histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..e2203d56988 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyHistogramByNameGet structure. +type ColumnFamilyMetricsWriteLatencyHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetOK creates a ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetOK() *ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK { + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK column family metrics write latency histogram by name get o k +*/ +type ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault creates a ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault(code int) *ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault { + return &ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency histogram by name get default response +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_parameters.go new file mode 100644 index 00000000000..b70adbfb190 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyHistogramGetParams creates a new ColumnFamilyMetricsWriteLatencyHistogramGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyHistogramGetParams() *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyHistogramGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyHistogramGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyHistogramGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyHistogramGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyHistogramGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency histogram get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency histogram get params +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_responses.go new file mode 100644 index 00000000000..d3cc9815fc6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_histogram_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyHistogramGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyHistogramGet structure. +type ColumnFamilyMetricsWriteLatencyHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyHistogramGetOK creates a ColumnFamilyMetricsWriteLatencyHistogramGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyHistogramGetOK() *ColumnFamilyMetricsWriteLatencyHistogramGetOK { + return &ColumnFamilyMetricsWriteLatencyHistogramGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyHistogramGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyHistogramGetOK column family metrics write latency histogram get o k +*/ +type ColumnFamilyMetricsWriteLatencyHistogramGetOK struct { + Payload []*models.Histogram +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetOK) GetPayload() []*models.Histogram { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetOK) 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 +} + +// NewColumnFamilyMetricsWriteLatencyHistogramGetDefault creates a ColumnFamilyMetricsWriteLatencyHistogramGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyHistogramGetDefault(code int) *ColumnFamilyMetricsWriteLatencyHistogramGetDefault { + return &ColumnFamilyMetricsWriteLatencyHistogramGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency histogram get default response +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_parameters.go new file mode 100644 index 00000000000..9694b0aaedd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams() *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + var () + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency moving average histogram by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) WithName(name string) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family metrics write latency moving average histogram by name get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_responses.go new file mode 100644 index 00000000000..f0f30fce0de --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_by_name_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGet structure. +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK creates a ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK() *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK { + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK column family metrics write latency moving average histogram by name get o k +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK struct { +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault creates a ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault(code int) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault { + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency moving average histogram by name get default response +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_parameters.go new file mode 100644 index 00000000000..569e4451639 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams object +// with the default values initialized. +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams() *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithTimeout creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithContext creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithHTTPClient creates a new ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams contains all the parameters to send to the API endpoint +for the column family metrics write latency moving average histogram get operation typically these are written to a http.Request +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) WithContext(ctx context.Context) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family metrics write latency moving average histogram get params +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_responses.go new file mode 100644 index 00000000000..aabdb25493b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_metrics_write_latency_moving_average_histogram_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetReader is a Reader for the ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGet structure. +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK creates a ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK with default headers values +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK() *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK { + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK{} +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK handles this case with default header values. + +ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK column family metrics write latency moving average histogram get o k +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK struct { + Payload []*models.RateMovingAverageAndHistogram +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK) GetPayload() []*models.RateMovingAverageAndHistogram { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK) 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 +} + +// NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault creates a ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault with default headers values +func NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault(code int) *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault { + return &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family metrics write latency moving average histogram get default response +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_parameters.go new file mode 100644 index 00000000000..011e5fd6a04 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMinimumCompactionByNameGetParams creates a new ColumnFamilyMinimumCompactionByNameGetParams object +// with the default values initialized. +func NewColumnFamilyMinimumCompactionByNameGetParams() *ColumnFamilyMinimumCompactionByNameGetParams { + var () + return &ColumnFamilyMinimumCompactionByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMinimumCompactionByNameGetParamsWithTimeout creates a new ColumnFamilyMinimumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMinimumCompactionByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyMinimumCompactionByNameGetParams { + var () + return &ColumnFamilyMinimumCompactionByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMinimumCompactionByNameGetParamsWithContext creates a new ColumnFamilyMinimumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMinimumCompactionByNameGetParamsWithContext(ctx context.Context) *ColumnFamilyMinimumCompactionByNameGetParams { + var () + return &ColumnFamilyMinimumCompactionByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMinimumCompactionByNameGetParamsWithHTTPClient creates a new ColumnFamilyMinimumCompactionByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMinimumCompactionByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyMinimumCompactionByNameGetParams { + var () + return &ColumnFamilyMinimumCompactionByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMinimumCompactionByNameGetParams contains all the parameters to send to the API endpoint +for the column family minimum compaction by name get operation typically these are written to a http.Request +*/ +type ColumnFamilyMinimumCompactionByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyMinimumCompactionByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) WithContext(ctx context.Context) *ColumnFamilyMinimumCompactionByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyMinimumCompactionByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) WithName(name string) *ColumnFamilyMinimumCompactionByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family minimum compaction by name get params +func (o *ColumnFamilyMinimumCompactionByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMinimumCompactionByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_responses.go new file mode 100644 index 00000000000..95e266255f1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMinimumCompactionByNameGetReader is a Reader for the ColumnFamilyMinimumCompactionByNameGet structure. +type ColumnFamilyMinimumCompactionByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMinimumCompactionByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMinimumCompactionByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMinimumCompactionByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMinimumCompactionByNameGetOK creates a ColumnFamilyMinimumCompactionByNameGetOK with default headers values +func NewColumnFamilyMinimumCompactionByNameGetOK() *ColumnFamilyMinimumCompactionByNameGetOK { + return &ColumnFamilyMinimumCompactionByNameGetOK{} +} + +/*ColumnFamilyMinimumCompactionByNameGetOK handles this case with default header values. + +ColumnFamilyMinimumCompactionByNameGetOK column family minimum compaction by name get o k +*/ +type ColumnFamilyMinimumCompactionByNameGetOK struct { + Payload string +} + +func (o *ColumnFamilyMinimumCompactionByNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyMinimumCompactionByNameGetOK) 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 +} + +// NewColumnFamilyMinimumCompactionByNameGetDefault creates a ColumnFamilyMinimumCompactionByNameGetDefault with default headers values +func NewColumnFamilyMinimumCompactionByNameGetDefault(code int) *ColumnFamilyMinimumCompactionByNameGetDefault { + return &ColumnFamilyMinimumCompactionByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMinimumCompactionByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMinimumCompactionByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family minimum compaction by name get default response +func (o *ColumnFamilyMinimumCompactionByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMinimumCompactionByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMinimumCompactionByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMinimumCompactionByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_parameters.go new file mode 100644 index 00000000000..6c62c368534 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyMinimumCompactionByNamePostParams creates a new ColumnFamilyMinimumCompactionByNamePostParams object +// with the default values initialized. +func NewColumnFamilyMinimumCompactionByNamePostParams() *ColumnFamilyMinimumCompactionByNamePostParams { + var () + return &ColumnFamilyMinimumCompactionByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyMinimumCompactionByNamePostParamsWithTimeout creates a new ColumnFamilyMinimumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyMinimumCompactionByNamePostParamsWithTimeout(timeout time.Duration) *ColumnFamilyMinimumCompactionByNamePostParams { + var () + return &ColumnFamilyMinimumCompactionByNamePostParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyMinimumCompactionByNamePostParamsWithContext creates a new ColumnFamilyMinimumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyMinimumCompactionByNamePostParamsWithContext(ctx context.Context) *ColumnFamilyMinimumCompactionByNamePostParams { + var () + return &ColumnFamilyMinimumCompactionByNamePostParams{ + + Context: ctx, + } +} + +// NewColumnFamilyMinimumCompactionByNamePostParamsWithHTTPClient creates a new ColumnFamilyMinimumCompactionByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyMinimumCompactionByNamePostParamsWithHTTPClient(client *http.Client) *ColumnFamilyMinimumCompactionByNamePostParams { + var () + return &ColumnFamilyMinimumCompactionByNamePostParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyMinimumCompactionByNamePostParams contains all the parameters to send to the API endpoint +for the column family minimum compaction by name post operation typically these are written to a http.Request +*/ +type ColumnFamilyMinimumCompactionByNamePostParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + /*Value + The minimum number of sstables in queue before compaction kicks off + + */ + Value int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) WithTimeout(timeout time.Duration) *ColumnFamilyMinimumCompactionByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) WithContext(ctx context.Context) *ColumnFamilyMinimumCompactionByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) WithHTTPClient(client *http.Client) *ColumnFamilyMinimumCompactionByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) WithName(name string) *ColumnFamilyMinimumCompactionByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) SetName(name string) { + o.Name = name +} + +// WithValue adds the value to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) WithValue(value int32) *ColumnFamilyMinimumCompactionByNamePostParams { + o.SetValue(value) + return o +} + +// SetValue adds the value to the column family minimum compaction by name post params +func (o *ColumnFamilyMinimumCompactionByNamePostParams) SetValue(value int32) { + o.Value = value +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyMinimumCompactionByNamePostParams) 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 + } + + // query param value + qrValue := o.Value + qValue := swag.FormatInt32(qrValue) + if qValue != "" { + if err := r.SetQueryParam("value", qValue); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_responses.go new file mode 100644 index 00000000000..460b8d5fe0a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_minimum_compaction_by_name_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyMinimumCompactionByNamePostReader is a Reader for the ColumnFamilyMinimumCompactionByNamePost structure. +type ColumnFamilyMinimumCompactionByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyMinimumCompactionByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyMinimumCompactionByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyMinimumCompactionByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyMinimumCompactionByNamePostOK creates a ColumnFamilyMinimumCompactionByNamePostOK with default headers values +func NewColumnFamilyMinimumCompactionByNamePostOK() *ColumnFamilyMinimumCompactionByNamePostOK { + return &ColumnFamilyMinimumCompactionByNamePostOK{} +} + +/*ColumnFamilyMinimumCompactionByNamePostOK handles this case with default header values. + +ColumnFamilyMinimumCompactionByNamePostOK column family minimum compaction by name post o k +*/ +type ColumnFamilyMinimumCompactionByNamePostOK struct { + Payload string +} + +func (o *ColumnFamilyMinimumCompactionByNamePostOK) GetPayload() string { + return o.Payload +} + +func (o *ColumnFamilyMinimumCompactionByNamePostOK) 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 +} + +// NewColumnFamilyMinimumCompactionByNamePostDefault creates a ColumnFamilyMinimumCompactionByNamePostDefault with default headers values +func NewColumnFamilyMinimumCompactionByNamePostDefault(code int) *ColumnFamilyMinimumCompactionByNamePostDefault { + return &ColumnFamilyMinimumCompactionByNamePostDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyMinimumCompactionByNamePostDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyMinimumCompactionByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family minimum compaction by name post default response +func (o *ColumnFamilyMinimumCompactionByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyMinimumCompactionByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyMinimumCompactionByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyMinimumCompactionByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_parameters.go new file mode 100644 index 00000000000..67b021482ea --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyNameGetParams creates a new ColumnFamilyNameGetParams object +// with the default values initialized. +func NewColumnFamilyNameGetParams() *ColumnFamilyNameGetParams { + + return &ColumnFamilyNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyNameGetParamsWithTimeout creates a new ColumnFamilyNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyNameGetParams { + + return &ColumnFamilyNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyNameGetParamsWithContext creates a new ColumnFamilyNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyNameGetParamsWithContext(ctx context.Context) *ColumnFamilyNameGetParams { + + return &ColumnFamilyNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyNameGetParamsWithHTTPClient creates a new ColumnFamilyNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyNameGetParams { + + return &ColumnFamilyNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyNameGetParams contains all the parameters to send to the API endpoint +for the column family name get operation typically these are written to a http.Request +*/ +type ColumnFamilyNameGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family name get params +func (o *ColumnFamilyNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family name get params +func (o *ColumnFamilyNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family name get params +func (o *ColumnFamilyNameGetParams) WithContext(ctx context.Context) *ColumnFamilyNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family name get params +func (o *ColumnFamilyNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family name get params +func (o *ColumnFamilyNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family name get params +func (o *ColumnFamilyNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_responses.go new file mode 100644 index 00000000000..2aa2775d8af --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyNameGetReader is a Reader for the ColumnFamilyNameGet structure. +type ColumnFamilyNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyNameGetOK creates a ColumnFamilyNameGetOK with default headers values +func NewColumnFamilyNameGetOK() *ColumnFamilyNameGetOK { + return &ColumnFamilyNameGetOK{} +} + +/*ColumnFamilyNameGetOK handles this case with default header values. + +ColumnFamilyNameGetOK column family name get o k +*/ +type ColumnFamilyNameGetOK struct { + Payload []string +} + +func (o *ColumnFamilyNameGetOK) GetPayload() []string { + return o.Payload +} + +func (o *ColumnFamilyNameGetOK) 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 +} + +// NewColumnFamilyNameGetDefault creates a ColumnFamilyNameGetDefault with default headers values +func NewColumnFamilyNameGetDefault(code int) *ColumnFamilyNameGetDefault { + return &ColumnFamilyNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family name get default response +func (o *ColumnFamilyNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_parameters.go new file mode 100644 index 00000000000..4d6cacfde37 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilyNameKeyspaceGetParams creates a new ColumnFamilyNameKeyspaceGetParams object +// with the default values initialized. +func NewColumnFamilyNameKeyspaceGetParams() *ColumnFamilyNameKeyspaceGetParams { + + return &ColumnFamilyNameKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilyNameKeyspaceGetParamsWithTimeout creates a new ColumnFamilyNameKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilyNameKeyspaceGetParamsWithTimeout(timeout time.Duration) *ColumnFamilyNameKeyspaceGetParams { + + return &ColumnFamilyNameKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilyNameKeyspaceGetParamsWithContext creates a new ColumnFamilyNameKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilyNameKeyspaceGetParamsWithContext(ctx context.Context) *ColumnFamilyNameKeyspaceGetParams { + + return &ColumnFamilyNameKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilyNameKeyspaceGetParamsWithHTTPClient creates a new ColumnFamilyNameKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilyNameKeyspaceGetParamsWithHTTPClient(client *http.Client) *ColumnFamilyNameKeyspaceGetParams { + + return &ColumnFamilyNameKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilyNameKeyspaceGetParams contains all the parameters to send to the API endpoint +for the column family name keyspace get operation typically these are written to a http.Request +*/ +type ColumnFamilyNameKeyspaceGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) WithTimeout(timeout time.Duration) *ColumnFamilyNameKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) WithContext(ctx context.Context) *ColumnFamilyNameKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) WithHTTPClient(client *http.Client) *ColumnFamilyNameKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family name keyspace get params +func (o *ColumnFamilyNameKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilyNameKeyspaceGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_responses.go new file mode 100644 index 00000000000..36939b3fd9e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_name_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilyNameKeyspaceGetReader is a Reader for the ColumnFamilyNameKeyspaceGet structure. +type ColumnFamilyNameKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilyNameKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilyNameKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilyNameKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilyNameKeyspaceGetOK creates a ColumnFamilyNameKeyspaceGetOK with default headers values +func NewColumnFamilyNameKeyspaceGetOK() *ColumnFamilyNameKeyspaceGetOK { + return &ColumnFamilyNameKeyspaceGetOK{} +} + +/*ColumnFamilyNameKeyspaceGetOK handles this case with default header values. + +ColumnFamilyNameKeyspaceGetOK column family name keyspace get o k +*/ +type ColumnFamilyNameKeyspaceGetOK struct { + Payload []string +} + +func (o *ColumnFamilyNameKeyspaceGetOK) GetPayload() []string { + return o.Payload +} + +func (o *ColumnFamilyNameKeyspaceGetOK) 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 +} + +// NewColumnFamilyNameKeyspaceGetDefault creates a ColumnFamilyNameKeyspaceGetDefault with default headers values +func NewColumnFamilyNameKeyspaceGetDefault(code int) *ColumnFamilyNameKeyspaceGetDefault { + return &ColumnFamilyNameKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilyNameKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilyNameKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family name keyspace get default response +func (o *ColumnFamilyNameKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilyNameKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilyNameKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilyNameKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_parameters.go new file mode 100644 index 00000000000..478c8c37b07 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilySstablesByKeyByNameGetParams creates a new ColumnFamilySstablesByKeyByNameGetParams object +// with the default values initialized. +func NewColumnFamilySstablesByKeyByNameGetParams() *ColumnFamilySstablesByKeyByNameGetParams { + var () + return &ColumnFamilySstablesByKeyByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilySstablesByKeyByNameGetParamsWithTimeout creates a new ColumnFamilySstablesByKeyByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilySstablesByKeyByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilySstablesByKeyByNameGetParams { + var () + return &ColumnFamilySstablesByKeyByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilySstablesByKeyByNameGetParamsWithContext creates a new ColumnFamilySstablesByKeyByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilySstablesByKeyByNameGetParamsWithContext(ctx context.Context) *ColumnFamilySstablesByKeyByNameGetParams { + var () + return &ColumnFamilySstablesByKeyByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilySstablesByKeyByNameGetParamsWithHTTPClient creates a new ColumnFamilySstablesByKeyByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilySstablesByKeyByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilySstablesByKeyByNameGetParams { + var () + return &ColumnFamilySstablesByKeyByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilySstablesByKeyByNameGetParams contains all the parameters to send to the API endpoint +for the column family sstables by key by name get operation typically these are written to a http.Request +*/ +type ColumnFamilySstablesByKeyByNameGetParams struct { + + /*Key + The partition key. In a composite-key scenario, use ':' to separate the columns in the key. + + */ + Key string + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilySstablesByKeyByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) WithContext(ctx context.Context) *ColumnFamilySstablesByKeyByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilySstablesByKeyByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKey adds the key to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) WithKey(key string) *ColumnFamilySstablesByKeyByNameGetParams { + o.SetKey(key) + return o +} + +// SetKey adds the key to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) SetKey(key string) { + o.Key = key +} + +// WithName adds the name to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) WithName(name string) *ColumnFamilySstablesByKeyByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family sstables by key by name get params +func (o *ColumnFamilySstablesByKeyByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilySstablesByKeyByNameGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param key + qrKey := o.Key + qKey := qrKey + if qKey != "" { + if err := r.SetQueryParam("key", qKey); 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_responses.go new file mode 100644 index 00000000000..35bf9176d2b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_by_key_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilySstablesByKeyByNameGetReader is a Reader for the ColumnFamilySstablesByKeyByNameGet structure. +type ColumnFamilySstablesByKeyByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilySstablesByKeyByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilySstablesByKeyByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilySstablesByKeyByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilySstablesByKeyByNameGetOK creates a ColumnFamilySstablesByKeyByNameGetOK with default headers values +func NewColumnFamilySstablesByKeyByNameGetOK() *ColumnFamilySstablesByKeyByNameGetOK { + return &ColumnFamilySstablesByKeyByNameGetOK{} +} + +/*ColumnFamilySstablesByKeyByNameGetOK handles this case with default header values. + +ColumnFamilySstablesByKeyByNameGetOK column family sstables by key by name get o k +*/ +type ColumnFamilySstablesByKeyByNameGetOK struct { + Payload []string +} + +func (o *ColumnFamilySstablesByKeyByNameGetOK) GetPayload() []string { + return o.Payload +} + +func (o *ColumnFamilySstablesByKeyByNameGetOK) 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 +} + +// NewColumnFamilySstablesByKeyByNameGetDefault creates a ColumnFamilySstablesByKeyByNameGetDefault with default headers values +func NewColumnFamilySstablesByKeyByNameGetDefault(code int) *ColumnFamilySstablesByKeyByNameGetDefault { + return &ColumnFamilySstablesByKeyByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilySstablesByKeyByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilySstablesByKeyByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family sstables by key by name get default response +func (o *ColumnFamilySstablesByKeyByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilySstablesByKeyByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilySstablesByKeyByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilySstablesByKeyByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_parameters.go new file mode 100644 index 00000000000..b2e8416454a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilySstablesPerLevelByNameGetParams creates a new ColumnFamilySstablesPerLevelByNameGetParams object +// with the default values initialized. +func NewColumnFamilySstablesPerLevelByNameGetParams() *ColumnFamilySstablesPerLevelByNameGetParams { + var () + return &ColumnFamilySstablesPerLevelByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilySstablesPerLevelByNameGetParamsWithTimeout creates a new ColumnFamilySstablesPerLevelByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilySstablesPerLevelByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilySstablesPerLevelByNameGetParams { + var () + return &ColumnFamilySstablesPerLevelByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilySstablesPerLevelByNameGetParamsWithContext creates a new ColumnFamilySstablesPerLevelByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilySstablesPerLevelByNameGetParamsWithContext(ctx context.Context) *ColumnFamilySstablesPerLevelByNameGetParams { + var () + return &ColumnFamilySstablesPerLevelByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilySstablesPerLevelByNameGetParamsWithHTTPClient creates a new ColumnFamilySstablesPerLevelByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilySstablesPerLevelByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilySstablesPerLevelByNameGetParams { + var () + return &ColumnFamilySstablesPerLevelByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilySstablesPerLevelByNameGetParams contains all the parameters to send to the API endpoint +for the column family sstables per level by name get operation typically these are written to a http.Request +*/ +type ColumnFamilySstablesPerLevelByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilySstablesPerLevelByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) WithContext(ctx context.Context) *ColumnFamilySstablesPerLevelByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilySstablesPerLevelByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) WithName(name string) *ColumnFamilySstablesPerLevelByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family sstables per level by name get params +func (o *ColumnFamilySstablesPerLevelByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilySstablesPerLevelByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_responses.go new file mode 100644 index 00000000000..d173e7b0e0c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_per_level_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilySstablesPerLevelByNameGetReader is a Reader for the ColumnFamilySstablesPerLevelByNameGet structure. +type ColumnFamilySstablesPerLevelByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilySstablesPerLevelByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilySstablesPerLevelByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilySstablesPerLevelByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilySstablesPerLevelByNameGetOK creates a ColumnFamilySstablesPerLevelByNameGetOK with default headers values +func NewColumnFamilySstablesPerLevelByNameGetOK() *ColumnFamilySstablesPerLevelByNameGetOK { + return &ColumnFamilySstablesPerLevelByNameGetOK{} +} + +/*ColumnFamilySstablesPerLevelByNameGetOK handles this case with default header values. + +ColumnFamilySstablesPerLevelByNameGetOK column family sstables per level by name get o k +*/ +type ColumnFamilySstablesPerLevelByNameGetOK struct { + Payload []int32 +} + +func (o *ColumnFamilySstablesPerLevelByNameGetOK) GetPayload() []int32 { + return o.Payload +} + +func (o *ColumnFamilySstablesPerLevelByNameGetOK) 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 +} + +// NewColumnFamilySstablesPerLevelByNameGetDefault creates a ColumnFamilySstablesPerLevelByNameGetDefault with default headers values +func NewColumnFamilySstablesPerLevelByNameGetDefault(code int) *ColumnFamilySstablesPerLevelByNameGetDefault { + return &ColumnFamilySstablesPerLevelByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilySstablesPerLevelByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilySstablesPerLevelByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family sstables per level by name get default response +func (o *ColumnFamilySstablesPerLevelByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilySstablesPerLevelByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilySstablesPerLevelByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilySstablesPerLevelByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_parameters.go new file mode 100644 index 00000000000..53385bfe6aa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewColumnFamilySstablesUnleveledByNameGetParams creates a new ColumnFamilySstablesUnleveledByNameGetParams object +// with the default values initialized. +func NewColumnFamilySstablesUnleveledByNameGetParams() *ColumnFamilySstablesUnleveledByNameGetParams { + var () + return &ColumnFamilySstablesUnleveledByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewColumnFamilySstablesUnleveledByNameGetParamsWithTimeout creates a new ColumnFamilySstablesUnleveledByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewColumnFamilySstablesUnleveledByNameGetParamsWithTimeout(timeout time.Duration) *ColumnFamilySstablesUnleveledByNameGetParams { + var () + return &ColumnFamilySstablesUnleveledByNameGetParams{ + + timeout: timeout, + } +} + +// NewColumnFamilySstablesUnleveledByNameGetParamsWithContext creates a new ColumnFamilySstablesUnleveledByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewColumnFamilySstablesUnleveledByNameGetParamsWithContext(ctx context.Context) *ColumnFamilySstablesUnleveledByNameGetParams { + var () + return &ColumnFamilySstablesUnleveledByNameGetParams{ + + Context: ctx, + } +} + +// NewColumnFamilySstablesUnleveledByNameGetParamsWithHTTPClient creates a new ColumnFamilySstablesUnleveledByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewColumnFamilySstablesUnleveledByNameGetParamsWithHTTPClient(client *http.Client) *ColumnFamilySstablesUnleveledByNameGetParams { + var () + return &ColumnFamilySstablesUnleveledByNameGetParams{ + HTTPClient: client, + } +} + +/*ColumnFamilySstablesUnleveledByNameGetParams contains all the parameters to send to the API endpoint +for the column family sstables unleveled by name get operation typically these are written to a http.Request +*/ +type ColumnFamilySstablesUnleveledByNameGetParams struct { + + /*Name + The column family name in keyspace:name format + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) WithTimeout(timeout time.Duration) *ColumnFamilySstablesUnleveledByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) WithContext(ctx context.Context) *ColumnFamilySstablesUnleveledByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) WithHTTPClient(client *http.Client) *ColumnFamilySstablesUnleveledByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) WithName(name string) *ColumnFamilySstablesUnleveledByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the column family sstables unleveled by name get params +func (o *ColumnFamilySstablesUnleveledByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *ColumnFamilySstablesUnleveledByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_responses.go new file mode 100644 index 00000000000..d41ca5ffb39 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/column_family_sstables_unleveled_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// ColumnFamilySstablesUnleveledByNameGetReader is a Reader for the ColumnFamilySstablesUnleveledByNameGet structure. +type ColumnFamilySstablesUnleveledByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ColumnFamilySstablesUnleveledByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewColumnFamilySstablesUnleveledByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewColumnFamilySstablesUnleveledByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewColumnFamilySstablesUnleveledByNameGetOK creates a ColumnFamilySstablesUnleveledByNameGetOK with default headers values +func NewColumnFamilySstablesUnleveledByNameGetOK() *ColumnFamilySstablesUnleveledByNameGetOK { + return &ColumnFamilySstablesUnleveledByNameGetOK{} +} + +/*ColumnFamilySstablesUnleveledByNameGetOK handles this case with default header values. + +ColumnFamilySstablesUnleveledByNameGetOK column family sstables unleveled by name get o k +*/ +type ColumnFamilySstablesUnleveledByNameGetOK struct { + Payload []string +} + +func (o *ColumnFamilySstablesUnleveledByNameGetOK) GetPayload() []string { + return o.Payload +} + +func (o *ColumnFamilySstablesUnleveledByNameGetOK) 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 +} + +// NewColumnFamilySstablesUnleveledByNameGetDefault creates a ColumnFamilySstablesUnleveledByNameGetDefault with default headers values +func NewColumnFamilySstablesUnleveledByNameGetDefault(code int) *ColumnFamilySstablesUnleveledByNameGetDefault { + return &ColumnFamilySstablesUnleveledByNameGetDefault{ + _statusCode: code, + } +} + +/*ColumnFamilySstablesUnleveledByNameGetDefault handles this case with default header values. + +internal server error +*/ +type ColumnFamilySstablesUnleveledByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the column family sstables unleveled by name get default response +func (o *ColumnFamilySstablesUnleveledByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *ColumnFamilySstablesUnleveledByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *ColumnFamilySstablesUnleveledByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *ColumnFamilySstablesUnleveledByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_parameters.go new file mode 100644 index 00000000000..24f0dfef144 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitLogMetricsWaitingOnCommitGetParams creates a new CommitLogMetricsWaitingOnCommitGetParams object +// with the default values initialized. +func NewCommitLogMetricsWaitingOnCommitGetParams() *CommitLogMetricsWaitingOnCommitGetParams { + + return &CommitLogMetricsWaitingOnCommitGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitLogMetricsWaitingOnCommitGetParamsWithTimeout creates a new CommitLogMetricsWaitingOnCommitGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitLogMetricsWaitingOnCommitGetParamsWithTimeout(timeout time.Duration) *CommitLogMetricsWaitingOnCommitGetParams { + + return &CommitLogMetricsWaitingOnCommitGetParams{ + + timeout: timeout, + } +} + +// NewCommitLogMetricsWaitingOnCommitGetParamsWithContext creates a new CommitLogMetricsWaitingOnCommitGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitLogMetricsWaitingOnCommitGetParamsWithContext(ctx context.Context) *CommitLogMetricsWaitingOnCommitGetParams { + + return &CommitLogMetricsWaitingOnCommitGetParams{ + + Context: ctx, + } +} + +// NewCommitLogMetricsWaitingOnCommitGetParamsWithHTTPClient creates a new CommitLogMetricsWaitingOnCommitGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitLogMetricsWaitingOnCommitGetParamsWithHTTPClient(client *http.Client) *CommitLogMetricsWaitingOnCommitGetParams { + + return &CommitLogMetricsWaitingOnCommitGetParams{ + HTTPClient: client, + } +} + +/*CommitLogMetricsWaitingOnCommitGetParams contains all the parameters to send to the API endpoint +for the commit log metrics waiting on commit get operation typically these are written to a http.Request +*/ +type CommitLogMetricsWaitingOnCommitGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) WithTimeout(timeout time.Duration) *CommitLogMetricsWaitingOnCommitGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) WithContext(ctx context.Context) *CommitLogMetricsWaitingOnCommitGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) WithHTTPClient(client *http.Client) *CommitLogMetricsWaitingOnCommitGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commit log metrics waiting on commit get params +func (o *CommitLogMetricsWaitingOnCommitGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitLogMetricsWaitingOnCommitGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_responses.go new file mode 100644 index 00000000000..824e8528d25 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_commit_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitLogMetricsWaitingOnCommitGetReader is a Reader for the CommitLogMetricsWaitingOnCommitGet structure. +type CommitLogMetricsWaitingOnCommitGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitLogMetricsWaitingOnCommitGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitLogMetricsWaitingOnCommitGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitLogMetricsWaitingOnCommitGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitLogMetricsWaitingOnCommitGetOK creates a CommitLogMetricsWaitingOnCommitGetOK with default headers values +func NewCommitLogMetricsWaitingOnCommitGetOK() *CommitLogMetricsWaitingOnCommitGetOK { + return &CommitLogMetricsWaitingOnCommitGetOK{} +} + +/*CommitLogMetricsWaitingOnCommitGetOK handles this case with default header values. + +CommitLogMetricsWaitingOnCommitGetOK commit log metrics waiting on commit get o k +*/ +type CommitLogMetricsWaitingOnCommitGetOK struct { +} + +func (o *CommitLogMetricsWaitingOnCommitGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCommitLogMetricsWaitingOnCommitGetDefault creates a CommitLogMetricsWaitingOnCommitGetDefault with default headers values +func NewCommitLogMetricsWaitingOnCommitGetDefault(code int) *CommitLogMetricsWaitingOnCommitGetDefault { + return &CommitLogMetricsWaitingOnCommitGetDefault{ + _statusCode: code, + } +} + +/*CommitLogMetricsWaitingOnCommitGetDefault handles this case with default header values. + +internal server error +*/ +type CommitLogMetricsWaitingOnCommitGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commit log metrics waiting on commit get default response +func (o *CommitLogMetricsWaitingOnCommitGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitLogMetricsWaitingOnCommitGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitLogMetricsWaitingOnCommitGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitLogMetricsWaitingOnCommitGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_parameters.go new file mode 100644 index 00000000000..58e17f706df --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetParams creates a new CommitLogMetricsWaitingOnSegmentAllocationGetParams object +// with the default values initialized. +func NewCommitLogMetricsWaitingOnSegmentAllocationGetParams() *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + + return &CommitLogMetricsWaitingOnSegmentAllocationGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithTimeout creates a new CommitLogMetricsWaitingOnSegmentAllocationGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithTimeout(timeout time.Duration) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + + return &CommitLogMetricsWaitingOnSegmentAllocationGetParams{ + + timeout: timeout, + } +} + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithContext creates a new CommitLogMetricsWaitingOnSegmentAllocationGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithContext(ctx context.Context) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + + return &CommitLogMetricsWaitingOnSegmentAllocationGetParams{ + + Context: ctx, + } +} + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithHTTPClient creates a new CommitLogMetricsWaitingOnSegmentAllocationGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitLogMetricsWaitingOnSegmentAllocationGetParamsWithHTTPClient(client *http.Client) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + + return &CommitLogMetricsWaitingOnSegmentAllocationGetParams{ + HTTPClient: client, + } +} + +/*CommitLogMetricsWaitingOnSegmentAllocationGetParams contains all the parameters to send to the API endpoint +for the commit log metrics waiting on segment allocation get operation typically these are written to a http.Request +*/ +type CommitLogMetricsWaitingOnSegmentAllocationGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) WithTimeout(timeout time.Duration) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) WithContext(ctx context.Context) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) WithHTTPClient(client *http.Client) *CommitLogMetricsWaitingOnSegmentAllocationGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commit log metrics waiting on segment allocation get params +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_responses.go new file mode 100644 index 00000000000..aad01c43eb6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commit_log_metrics_waiting_on_segment_allocation_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitLogMetricsWaitingOnSegmentAllocationGetReader is a Reader for the CommitLogMetricsWaitingOnSegmentAllocationGet structure. +type CommitLogMetricsWaitingOnSegmentAllocationGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitLogMetricsWaitingOnSegmentAllocationGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitLogMetricsWaitingOnSegmentAllocationGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetOK creates a CommitLogMetricsWaitingOnSegmentAllocationGetOK with default headers values +func NewCommitLogMetricsWaitingOnSegmentAllocationGetOK() *CommitLogMetricsWaitingOnSegmentAllocationGetOK { + return &CommitLogMetricsWaitingOnSegmentAllocationGetOK{} +} + +/*CommitLogMetricsWaitingOnSegmentAllocationGetOK handles this case with default header values. + +CommitLogMetricsWaitingOnSegmentAllocationGetOK commit log metrics waiting on segment allocation get o k +*/ +type CommitLogMetricsWaitingOnSegmentAllocationGetOK struct { +} + +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCommitLogMetricsWaitingOnSegmentAllocationGetDefault creates a CommitLogMetricsWaitingOnSegmentAllocationGetDefault with default headers values +func NewCommitLogMetricsWaitingOnSegmentAllocationGetDefault(code int) *CommitLogMetricsWaitingOnSegmentAllocationGetDefault { + return &CommitLogMetricsWaitingOnSegmentAllocationGetDefault{ + _statusCode: code, + } +} + +/*CommitLogMetricsWaitingOnSegmentAllocationGetDefault handles this case with default header values. + +internal server error +*/ +type CommitLogMetricsWaitingOnSegmentAllocationGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commit log metrics waiting on segment allocation get default response +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitLogMetricsWaitingOnSegmentAllocationGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_parameters.go new file mode 100644 index 00000000000..433a03169f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogMetricsCompletedTasksGetParams creates a new CommitlogMetricsCompletedTasksGetParams object +// with the default values initialized. +func NewCommitlogMetricsCompletedTasksGetParams() *CommitlogMetricsCompletedTasksGetParams { + + return &CommitlogMetricsCompletedTasksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogMetricsCompletedTasksGetParamsWithTimeout creates a new CommitlogMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogMetricsCompletedTasksGetParamsWithTimeout(timeout time.Duration) *CommitlogMetricsCompletedTasksGetParams { + + return &CommitlogMetricsCompletedTasksGetParams{ + + timeout: timeout, + } +} + +// NewCommitlogMetricsCompletedTasksGetParamsWithContext creates a new CommitlogMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogMetricsCompletedTasksGetParamsWithContext(ctx context.Context) *CommitlogMetricsCompletedTasksGetParams { + + return &CommitlogMetricsCompletedTasksGetParams{ + + Context: ctx, + } +} + +// NewCommitlogMetricsCompletedTasksGetParamsWithHTTPClient creates a new CommitlogMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogMetricsCompletedTasksGetParamsWithHTTPClient(client *http.Client) *CommitlogMetricsCompletedTasksGetParams { + + return &CommitlogMetricsCompletedTasksGetParams{ + HTTPClient: client, + } +} + +/*CommitlogMetricsCompletedTasksGetParams contains all the parameters to send to the API endpoint +for the commitlog metrics completed tasks get operation typically these are written to a http.Request +*/ +type CommitlogMetricsCompletedTasksGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) WithTimeout(timeout time.Duration) *CommitlogMetricsCompletedTasksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) WithContext(ctx context.Context) *CommitlogMetricsCompletedTasksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) WithHTTPClient(client *http.Client) *CommitlogMetricsCompletedTasksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog metrics completed tasks get params +func (o *CommitlogMetricsCompletedTasksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogMetricsCompletedTasksGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_responses.go new file mode 100644 index 00000000000..fab289ba01e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_completed_tasks_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogMetricsCompletedTasksGetReader is a Reader for the CommitlogMetricsCompletedTasksGet structure. +type CommitlogMetricsCompletedTasksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogMetricsCompletedTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogMetricsCompletedTasksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogMetricsCompletedTasksGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogMetricsCompletedTasksGetOK creates a CommitlogMetricsCompletedTasksGetOK with default headers values +func NewCommitlogMetricsCompletedTasksGetOK() *CommitlogMetricsCompletedTasksGetOK { + return &CommitlogMetricsCompletedTasksGetOK{} +} + +/*CommitlogMetricsCompletedTasksGetOK handles this case with default header values. + +CommitlogMetricsCompletedTasksGetOK commitlog metrics completed tasks get o k +*/ +type CommitlogMetricsCompletedTasksGetOK struct { + Payload interface{} +} + +func (o *CommitlogMetricsCompletedTasksGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CommitlogMetricsCompletedTasksGetOK) 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 +} + +// NewCommitlogMetricsCompletedTasksGetDefault creates a CommitlogMetricsCompletedTasksGetDefault with default headers values +func NewCommitlogMetricsCompletedTasksGetDefault(code int) *CommitlogMetricsCompletedTasksGetDefault { + return &CommitlogMetricsCompletedTasksGetDefault{ + _statusCode: code, + } +} + +/*CommitlogMetricsCompletedTasksGetDefault handles this case with default header values. + +internal server error +*/ +type CommitlogMetricsCompletedTasksGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog metrics completed tasks get default response +func (o *CommitlogMetricsCompletedTasksGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogMetricsCompletedTasksGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogMetricsCompletedTasksGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogMetricsCompletedTasksGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_parameters.go new file mode 100644 index 00000000000..f3f9b88dfba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogMetricsPendingTasksGetParams creates a new CommitlogMetricsPendingTasksGetParams object +// with the default values initialized. +func NewCommitlogMetricsPendingTasksGetParams() *CommitlogMetricsPendingTasksGetParams { + + return &CommitlogMetricsPendingTasksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogMetricsPendingTasksGetParamsWithTimeout creates a new CommitlogMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogMetricsPendingTasksGetParamsWithTimeout(timeout time.Duration) *CommitlogMetricsPendingTasksGetParams { + + return &CommitlogMetricsPendingTasksGetParams{ + + timeout: timeout, + } +} + +// NewCommitlogMetricsPendingTasksGetParamsWithContext creates a new CommitlogMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogMetricsPendingTasksGetParamsWithContext(ctx context.Context) *CommitlogMetricsPendingTasksGetParams { + + return &CommitlogMetricsPendingTasksGetParams{ + + Context: ctx, + } +} + +// NewCommitlogMetricsPendingTasksGetParamsWithHTTPClient creates a new CommitlogMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogMetricsPendingTasksGetParamsWithHTTPClient(client *http.Client) *CommitlogMetricsPendingTasksGetParams { + + return &CommitlogMetricsPendingTasksGetParams{ + HTTPClient: client, + } +} + +/*CommitlogMetricsPendingTasksGetParams contains all the parameters to send to the API endpoint +for the commitlog metrics pending tasks get operation typically these are written to a http.Request +*/ +type CommitlogMetricsPendingTasksGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) WithTimeout(timeout time.Duration) *CommitlogMetricsPendingTasksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) WithContext(ctx context.Context) *CommitlogMetricsPendingTasksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) WithHTTPClient(client *http.Client) *CommitlogMetricsPendingTasksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog metrics pending tasks get params +func (o *CommitlogMetricsPendingTasksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogMetricsPendingTasksGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_responses.go new file mode 100644 index 00000000000..8cb3ee65f86 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_pending_tasks_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogMetricsPendingTasksGetReader is a Reader for the CommitlogMetricsPendingTasksGet structure. +type CommitlogMetricsPendingTasksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogMetricsPendingTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogMetricsPendingTasksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogMetricsPendingTasksGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogMetricsPendingTasksGetOK creates a CommitlogMetricsPendingTasksGetOK with default headers values +func NewCommitlogMetricsPendingTasksGetOK() *CommitlogMetricsPendingTasksGetOK { + return &CommitlogMetricsPendingTasksGetOK{} +} + +/*CommitlogMetricsPendingTasksGetOK handles this case with default header values. + +CommitlogMetricsPendingTasksGetOK commitlog metrics pending tasks get o k +*/ +type CommitlogMetricsPendingTasksGetOK struct { + Payload interface{} +} + +func (o *CommitlogMetricsPendingTasksGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CommitlogMetricsPendingTasksGetOK) 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 +} + +// NewCommitlogMetricsPendingTasksGetDefault creates a CommitlogMetricsPendingTasksGetDefault with default headers values +func NewCommitlogMetricsPendingTasksGetDefault(code int) *CommitlogMetricsPendingTasksGetDefault { + return &CommitlogMetricsPendingTasksGetDefault{ + _statusCode: code, + } +} + +/*CommitlogMetricsPendingTasksGetDefault handles this case with default header values. + +internal server error +*/ +type CommitlogMetricsPendingTasksGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog metrics pending tasks get default response +func (o *CommitlogMetricsPendingTasksGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogMetricsPendingTasksGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogMetricsPendingTasksGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogMetricsPendingTasksGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_parameters.go new file mode 100644 index 00000000000..87fbff03418 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogMetricsTotalCommitLogSizeGetParams creates a new CommitlogMetricsTotalCommitLogSizeGetParams object +// with the default values initialized. +func NewCommitlogMetricsTotalCommitLogSizeGetParams() *CommitlogMetricsTotalCommitLogSizeGetParams { + + return &CommitlogMetricsTotalCommitLogSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogMetricsTotalCommitLogSizeGetParamsWithTimeout creates a new CommitlogMetricsTotalCommitLogSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogMetricsTotalCommitLogSizeGetParamsWithTimeout(timeout time.Duration) *CommitlogMetricsTotalCommitLogSizeGetParams { + + return &CommitlogMetricsTotalCommitLogSizeGetParams{ + + timeout: timeout, + } +} + +// NewCommitlogMetricsTotalCommitLogSizeGetParamsWithContext creates a new CommitlogMetricsTotalCommitLogSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogMetricsTotalCommitLogSizeGetParamsWithContext(ctx context.Context) *CommitlogMetricsTotalCommitLogSizeGetParams { + + return &CommitlogMetricsTotalCommitLogSizeGetParams{ + + Context: ctx, + } +} + +// NewCommitlogMetricsTotalCommitLogSizeGetParamsWithHTTPClient creates a new CommitlogMetricsTotalCommitLogSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogMetricsTotalCommitLogSizeGetParamsWithHTTPClient(client *http.Client) *CommitlogMetricsTotalCommitLogSizeGetParams { + + return &CommitlogMetricsTotalCommitLogSizeGetParams{ + HTTPClient: client, + } +} + +/*CommitlogMetricsTotalCommitLogSizeGetParams contains all the parameters to send to the API endpoint +for the commitlog metrics total commit log size get operation typically these are written to a http.Request +*/ +type CommitlogMetricsTotalCommitLogSizeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) WithTimeout(timeout time.Duration) *CommitlogMetricsTotalCommitLogSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) WithContext(ctx context.Context) *CommitlogMetricsTotalCommitLogSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) WithHTTPClient(client *http.Client) *CommitlogMetricsTotalCommitLogSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog metrics total commit log size get params +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogMetricsTotalCommitLogSizeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_responses.go new file mode 100644 index 00000000000..542c02ebe8f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_metrics_total_commit_log_size_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogMetricsTotalCommitLogSizeGetReader is a Reader for the CommitlogMetricsTotalCommitLogSizeGet structure. +type CommitlogMetricsTotalCommitLogSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogMetricsTotalCommitLogSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogMetricsTotalCommitLogSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogMetricsTotalCommitLogSizeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogMetricsTotalCommitLogSizeGetOK creates a CommitlogMetricsTotalCommitLogSizeGetOK with default headers values +func NewCommitlogMetricsTotalCommitLogSizeGetOK() *CommitlogMetricsTotalCommitLogSizeGetOK { + return &CommitlogMetricsTotalCommitLogSizeGetOK{} +} + +/*CommitlogMetricsTotalCommitLogSizeGetOK handles this case with default header values. + +CommitlogMetricsTotalCommitLogSizeGetOK commitlog metrics total commit log size get o k +*/ +type CommitlogMetricsTotalCommitLogSizeGetOK struct { + Payload interface{} +} + +func (o *CommitlogMetricsTotalCommitLogSizeGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CommitlogMetricsTotalCommitLogSizeGetOK) 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 +} + +// NewCommitlogMetricsTotalCommitLogSizeGetDefault creates a CommitlogMetricsTotalCommitLogSizeGetDefault with default headers values +func NewCommitlogMetricsTotalCommitLogSizeGetDefault(code int) *CommitlogMetricsTotalCommitLogSizeGetDefault { + return &CommitlogMetricsTotalCommitLogSizeGetDefault{ + _statusCode: code, + } +} + +/*CommitlogMetricsTotalCommitLogSizeGetDefault handles this case with default header values. + +internal server error +*/ +type CommitlogMetricsTotalCommitLogSizeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog metrics total commit log size get default response +func (o *CommitlogMetricsTotalCommitLogSizeGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogMetricsTotalCommitLogSizeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogMetricsTotalCommitLogSizeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogMetricsTotalCommitLogSizeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_parameters.go new file mode 100644 index 00000000000..062ba0f1f41 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogRecoverByPathPostParams creates a new CommitlogRecoverByPathPostParams object +// with the default values initialized. +func NewCommitlogRecoverByPathPostParams() *CommitlogRecoverByPathPostParams { + var () + return &CommitlogRecoverByPathPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogRecoverByPathPostParamsWithTimeout creates a new CommitlogRecoverByPathPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogRecoverByPathPostParamsWithTimeout(timeout time.Duration) *CommitlogRecoverByPathPostParams { + var () + return &CommitlogRecoverByPathPostParams{ + + timeout: timeout, + } +} + +// NewCommitlogRecoverByPathPostParamsWithContext creates a new CommitlogRecoverByPathPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogRecoverByPathPostParamsWithContext(ctx context.Context) *CommitlogRecoverByPathPostParams { + var () + return &CommitlogRecoverByPathPostParams{ + + Context: ctx, + } +} + +// NewCommitlogRecoverByPathPostParamsWithHTTPClient creates a new CommitlogRecoverByPathPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogRecoverByPathPostParamsWithHTTPClient(client *http.Client) *CommitlogRecoverByPathPostParams { + var () + return &CommitlogRecoverByPathPostParams{ + HTTPClient: client, + } +} + +/*CommitlogRecoverByPathPostParams contains all the parameters to send to the API endpoint +for the commitlog recover by path post operation typically these are written to a http.Request +*/ +type CommitlogRecoverByPathPostParams struct { + + /*Path + Full path of file or directory + + */ + Path string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) WithTimeout(timeout time.Duration) *CommitlogRecoverByPathPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) WithContext(ctx context.Context) *CommitlogRecoverByPathPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) WithHTTPClient(client *http.Client) *CommitlogRecoverByPathPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPath adds the path to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) WithPath(path string) *CommitlogRecoverByPathPostParams { + o.SetPath(path) + return o +} + +// SetPath adds the path to the commitlog recover by path post params +func (o *CommitlogRecoverByPathPostParams) SetPath(path string) { + o.Path = path +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogRecoverByPathPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param path + if err := r.SetPathParam("path", o.Path); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_responses.go new file mode 100644 index 00000000000..9a453c17c18 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_recover_by_path_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogRecoverByPathPostReader is a Reader for the CommitlogRecoverByPathPost structure. +type CommitlogRecoverByPathPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogRecoverByPathPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogRecoverByPathPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogRecoverByPathPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogRecoverByPathPostOK creates a CommitlogRecoverByPathPostOK with default headers values +func NewCommitlogRecoverByPathPostOK() *CommitlogRecoverByPathPostOK { + return &CommitlogRecoverByPathPostOK{} +} + +/*CommitlogRecoverByPathPostOK handles this case with default header values. + +CommitlogRecoverByPathPostOK commitlog recover by path post o k +*/ +type CommitlogRecoverByPathPostOK struct { +} + +func (o *CommitlogRecoverByPathPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCommitlogRecoverByPathPostDefault creates a CommitlogRecoverByPathPostDefault with default headers values +func NewCommitlogRecoverByPathPostDefault(code int) *CommitlogRecoverByPathPostDefault { + return &CommitlogRecoverByPathPostDefault{ + _statusCode: code, + } +} + +/*CommitlogRecoverByPathPostDefault handles this case with default header values. + +internal server error +*/ +type CommitlogRecoverByPathPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog recover by path post default response +func (o *CommitlogRecoverByPathPostDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogRecoverByPathPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogRecoverByPathPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogRecoverByPathPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_parameters.go new file mode 100644 index 00000000000..f1457b5e96d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogSegmentsActiveGetParams creates a new CommitlogSegmentsActiveGetParams object +// with the default values initialized. +func NewCommitlogSegmentsActiveGetParams() *CommitlogSegmentsActiveGetParams { + + return &CommitlogSegmentsActiveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogSegmentsActiveGetParamsWithTimeout creates a new CommitlogSegmentsActiveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogSegmentsActiveGetParamsWithTimeout(timeout time.Duration) *CommitlogSegmentsActiveGetParams { + + return &CommitlogSegmentsActiveGetParams{ + + timeout: timeout, + } +} + +// NewCommitlogSegmentsActiveGetParamsWithContext creates a new CommitlogSegmentsActiveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogSegmentsActiveGetParamsWithContext(ctx context.Context) *CommitlogSegmentsActiveGetParams { + + return &CommitlogSegmentsActiveGetParams{ + + Context: ctx, + } +} + +// NewCommitlogSegmentsActiveGetParamsWithHTTPClient creates a new CommitlogSegmentsActiveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogSegmentsActiveGetParamsWithHTTPClient(client *http.Client) *CommitlogSegmentsActiveGetParams { + + return &CommitlogSegmentsActiveGetParams{ + HTTPClient: client, + } +} + +/*CommitlogSegmentsActiveGetParams contains all the parameters to send to the API endpoint +for the commitlog segments active get operation typically these are written to a http.Request +*/ +type CommitlogSegmentsActiveGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) WithTimeout(timeout time.Duration) *CommitlogSegmentsActiveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) WithContext(ctx context.Context) *CommitlogSegmentsActiveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) WithHTTPClient(client *http.Client) *CommitlogSegmentsActiveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog segments active get params +func (o *CommitlogSegmentsActiveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogSegmentsActiveGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_responses.go new file mode 100644 index 00000000000..aebd6e37e0e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_active_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogSegmentsActiveGetReader is a Reader for the CommitlogSegmentsActiveGet structure. +type CommitlogSegmentsActiveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogSegmentsActiveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogSegmentsActiveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogSegmentsActiveGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogSegmentsActiveGetOK creates a CommitlogSegmentsActiveGetOK with default headers values +func NewCommitlogSegmentsActiveGetOK() *CommitlogSegmentsActiveGetOK { + return &CommitlogSegmentsActiveGetOK{} +} + +/*CommitlogSegmentsActiveGetOK handles this case with default header values. + +CommitlogSegmentsActiveGetOK commitlog segments active get o k +*/ +type CommitlogSegmentsActiveGetOK struct { + Payload []string +} + +func (o *CommitlogSegmentsActiveGetOK) GetPayload() []string { + return o.Payload +} + +func (o *CommitlogSegmentsActiveGetOK) 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 +} + +// NewCommitlogSegmentsActiveGetDefault creates a CommitlogSegmentsActiveGetDefault with default headers values +func NewCommitlogSegmentsActiveGetDefault(code int) *CommitlogSegmentsActiveGetDefault { + return &CommitlogSegmentsActiveGetDefault{ + _statusCode: code, + } +} + +/*CommitlogSegmentsActiveGetDefault handles this case with default header values. + +internal server error +*/ +type CommitlogSegmentsActiveGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog segments active get default response +func (o *CommitlogSegmentsActiveGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogSegmentsActiveGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogSegmentsActiveGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogSegmentsActiveGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_parameters.go new file mode 100644 index 00000000000..7bab139319f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCommitlogSegmentsArchivingGetParams creates a new CommitlogSegmentsArchivingGetParams object +// with the default values initialized. +func NewCommitlogSegmentsArchivingGetParams() *CommitlogSegmentsArchivingGetParams { + + return &CommitlogSegmentsArchivingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCommitlogSegmentsArchivingGetParamsWithTimeout creates a new CommitlogSegmentsArchivingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCommitlogSegmentsArchivingGetParamsWithTimeout(timeout time.Duration) *CommitlogSegmentsArchivingGetParams { + + return &CommitlogSegmentsArchivingGetParams{ + + timeout: timeout, + } +} + +// NewCommitlogSegmentsArchivingGetParamsWithContext creates a new CommitlogSegmentsArchivingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCommitlogSegmentsArchivingGetParamsWithContext(ctx context.Context) *CommitlogSegmentsArchivingGetParams { + + return &CommitlogSegmentsArchivingGetParams{ + + Context: ctx, + } +} + +// NewCommitlogSegmentsArchivingGetParamsWithHTTPClient creates a new CommitlogSegmentsArchivingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCommitlogSegmentsArchivingGetParamsWithHTTPClient(client *http.Client) *CommitlogSegmentsArchivingGetParams { + + return &CommitlogSegmentsArchivingGetParams{ + HTTPClient: client, + } +} + +/*CommitlogSegmentsArchivingGetParams contains all the parameters to send to the API endpoint +for the commitlog segments archiving get operation typically these are written to a http.Request +*/ +type CommitlogSegmentsArchivingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) WithTimeout(timeout time.Duration) *CommitlogSegmentsArchivingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) WithContext(ctx context.Context) *CommitlogSegmentsArchivingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) WithHTTPClient(client *http.Client) *CommitlogSegmentsArchivingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the commitlog segments archiving get params +func (o *CommitlogSegmentsArchivingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CommitlogSegmentsArchivingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_responses.go new file mode 100644 index 00000000000..f38e3dd1185 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/commitlog_segments_archiving_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CommitlogSegmentsArchivingGetReader is a Reader for the CommitlogSegmentsArchivingGet structure. +type CommitlogSegmentsArchivingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CommitlogSegmentsArchivingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCommitlogSegmentsArchivingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCommitlogSegmentsArchivingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCommitlogSegmentsArchivingGetOK creates a CommitlogSegmentsArchivingGetOK with default headers values +func NewCommitlogSegmentsArchivingGetOK() *CommitlogSegmentsArchivingGetOK { + return &CommitlogSegmentsArchivingGetOK{} +} + +/*CommitlogSegmentsArchivingGetOK handles this case with default header values. + +CommitlogSegmentsArchivingGetOK commitlog segments archiving get o k +*/ +type CommitlogSegmentsArchivingGetOK struct { + Payload []string +} + +func (o *CommitlogSegmentsArchivingGetOK) GetPayload() []string { + return o.Payload +} + +func (o *CommitlogSegmentsArchivingGetOK) 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 +} + +// NewCommitlogSegmentsArchivingGetDefault creates a CommitlogSegmentsArchivingGetDefault with default headers values +func NewCommitlogSegmentsArchivingGetDefault(code int) *CommitlogSegmentsArchivingGetDefault { + return &CommitlogSegmentsArchivingGetDefault{ + _statusCode: code, + } +} + +/*CommitlogSegmentsArchivingGetDefault handles this case with default header values. + +internal server error +*/ +type CommitlogSegmentsArchivingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the commitlog segments archiving get default response +func (o *CommitlogSegmentsArchivingGetDefault) Code() int { + return o._statusCode +} + +func (o *CommitlogSegmentsArchivingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CommitlogSegmentsArchivingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CommitlogSegmentsArchivingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_parameters.go new file mode 100644 index 00000000000..9b02e731796 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerCompactionHistoryGetParams creates a new CompactionManagerCompactionHistoryGetParams object +// with the default values initialized. +func NewCompactionManagerCompactionHistoryGetParams() *CompactionManagerCompactionHistoryGetParams { + + return &CompactionManagerCompactionHistoryGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerCompactionHistoryGetParamsWithTimeout creates a new CompactionManagerCompactionHistoryGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerCompactionHistoryGetParamsWithTimeout(timeout time.Duration) *CompactionManagerCompactionHistoryGetParams { + + return &CompactionManagerCompactionHistoryGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerCompactionHistoryGetParamsWithContext creates a new CompactionManagerCompactionHistoryGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerCompactionHistoryGetParamsWithContext(ctx context.Context) *CompactionManagerCompactionHistoryGetParams { + + return &CompactionManagerCompactionHistoryGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerCompactionHistoryGetParamsWithHTTPClient creates a new CompactionManagerCompactionHistoryGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerCompactionHistoryGetParamsWithHTTPClient(client *http.Client) *CompactionManagerCompactionHistoryGetParams { + + return &CompactionManagerCompactionHistoryGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerCompactionHistoryGetParams contains all the parameters to send to the API endpoint +for the compaction manager compaction history get operation typically these are written to a http.Request +*/ +type CompactionManagerCompactionHistoryGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) WithTimeout(timeout time.Duration) *CompactionManagerCompactionHistoryGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) WithContext(ctx context.Context) *CompactionManagerCompactionHistoryGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) WithHTTPClient(client *http.Client) *CompactionManagerCompactionHistoryGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager compaction history get params +func (o *CompactionManagerCompactionHistoryGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerCompactionHistoryGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_responses.go new file mode 100644 index 00000000000..d7dd534d7fd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_history_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerCompactionHistoryGetReader is a Reader for the CompactionManagerCompactionHistoryGet structure. +type CompactionManagerCompactionHistoryGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerCompactionHistoryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerCompactionHistoryGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerCompactionHistoryGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerCompactionHistoryGetOK creates a CompactionManagerCompactionHistoryGetOK with default headers values +func NewCompactionManagerCompactionHistoryGetOK() *CompactionManagerCompactionHistoryGetOK { + return &CompactionManagerCompactionHistoryGetOK{} +} + +/*CompactionManagerCompactionHistoryGetOK handles this case with default header values. + +CompactionManagerCompactionHistoryGetOK compaction manager compaction history get o k +*/ +type CompactionManagerCompactionHistoryGetOK struct { + Payload []*models.History +} + +func (o *CompactionManagerCompactionHistoryGetOK) GetPayload() []*models.History { + return o.Payload +} + +func (o *CompactionManagerCompactionHistoryGetOK) 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 +} + +// NewCompactionManagerCompactionHistoryGetDefault creates a CompactionManagerCompactionHistoryGetDefault with default headers values +func NewCompactionManagerCompactionHistoryGetDefault(code int) *CompactionManagerCompactionHistoryGetDefault { + return &CompactionManagerCompactionHistoryGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerCompactionHistoryGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerCompactionHistoryGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager compaction history get default response +func (o *CompactionManagerCompactionHistoryGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerCompactionHistoryGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerCompactionHistoryGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerCompactionHistoryGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_parameters.go new file mode 100644 index 00000000000..8c48d98f324 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerCompactionInfoGetParams creates a new CompactionManagerCompactionInfoGetParams object +// with the default values initialized. +func NewCompactionManagerCompactionInfoGetParams() *CompactionManagerCompactionInfoGetParams { + + return &CompactionManagerCompactionInfoGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerCompactionInfoGetParamsWithTimeout creates a new CompactionManagerCompactionInfoGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerCompactionInfoGetParamsWithTimeout(timeout time.Duration) *CompactionManagerCompactionInfoGetParams { + + return &CompactionManagerCompactionInfoGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerCompactionInfoGetParamsWithContext creates a new CompactionManagerCompactionInfoGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerCompactionInfoGetParamsWithContext(ctx context.Context) *CompactionManagerCompactionInfoGetParams { + + return &CompactionManagerCompactionInfoGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerCompactionInfoGetParamsWithHTTPClient creates a new CompactionManagerCompactionInfoGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerCompactionInfoGetParamsWithHTTPClient(client *http.Client) *CompactionManagerCompactionInfoGetParams { + + return &CompactionManagerCompactionInfoGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerCompactionInfoGetParams contains all the parameters to send to the API endpoint +for the compaction manager compaction info get operation typically these are written to a http.Request +*/ +type CompactionManagerCompactionInfoGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) WithTimeout(timeout time.Duration) *CompactionManagerCompactionInfoGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) WithContext(ctx context.Context) *CompactionManagerCompactionInfoGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) WithHTTPClient(client *http.Client) *CompactionManagerCompactionInfoGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager compaction info get params +func (o *CompactionManagerCompactionInfoGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerCompactionInfoGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_responses.go new file mode 100644 index 00000000000..976233d2a6c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compaction_info_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerCompactionInfoGetReader is a Reader for the CompactionManagerCompactionInfoGet structure. +type CompactionManagerCompactionInfoGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerCompactionInfoGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerCompactionInfoGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerCompactionInfoGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerCompactionInfoGetOK creates a CompactionManagerCompactionInfoGetOK with default headers values +func NewCompactionManagerCompactionInfoGetOK() *CompactionManagerCompactionInfoGetOK { + return &CompactionManagerCompactionInfoGetOK{} +} + +/*CompactionManagerCompactionInfoGetOK handles this case with default header values. + +CompactionManagerCompactionInfoGetOK compaction manager compaction info get o k +*/ +type CompactionManagerCompactionInfoGetOK struct { + Payload []*models.CompactionInfo +} + +func (o *CompactionManagerCompactionInfoGetOK) GetPayload() []*models.CompactionInfo { + return o.Payload +} + +func (o *CompactionManagerCompactionInfoGetOK) 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 +} + +// NewCompactionManagerCompactionInfoGetDefault creates a CompactionManagerCompactionInfoGetDefault with default headers values +func NewCompactionManagerCompactionInfoGetDefault(code int) *CompactionManagerCompactionInfoGetDefault { + return &CompactionManagerCompactionInfoGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerCompactionInfoGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerCompactionInfoGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager compaction info get default response +func (o *CompactionManagerCompactionInfoGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerCompactionInfoGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerCompactionInfoGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerCompactionInfoGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_parameters.go new file mode 100644 index 00000000000..cc39a29d5a9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerCompactionsGetParams creates a new CompactionManagerCompactionsGetParams object +// with the default values initialized. +func NewCompactionManagerCompactionsGetParams() *CompactionManagerCompactionsGetParams { + + return &CompactionManagerCompactionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerCompactionsGetParamsWithTimeout creates a new CompactionManagerCompactionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerCompactionsGetParamsWithTimeout(timeout time.Duration) *CompactionManagerCompactionsGetParams { + + return &CompactionManagerCompactionsGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerCompactionsGetParamsWithContext creates a new CompactionManagerCompactionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerCompactionsGetParamsWithContext(ctx context.Context) *CompactionManagerCompactionsGetParams { + + return &CompactionManagerCompactionsGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerCompactionsGetParamsWithHTTPClient creates a new CompactionManagerCompactionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerCompactionsGetParamsWithHTTPClient(client *http.Client) *CompactionManagerCompactionsGetParams { + + return &CompactionManagerCompactionsGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerCompactionsGetParams contains all the parameters to send to the API endpoint +for the compaction manager compactions get operation typically these are written to a http.Request +*/ +type CompactionManagerCompactionsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) WithTimeout(timeout time.Duration) *CompactionManagerCompactionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) WithContext(ctx context.Context) *CompactionManagerCompactionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) WithHTTPClient(client *http.Client) *CompactionManagerCompactionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager compactions get params +func (o *CompactionManagerCompactionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerCompactionsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_responses.go new file mode 100644 index 00000000000..1b55c382534 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_compactions_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerCompactionsGetReader is a Reader for the CompactionManagerCompactionsGet structure. +type CompactionManagerCompactionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerCompactionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerCompactionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerCompactionsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerCompactionsGetOK creates a CompactionManagerCompactionsGetOK with default headers values +func NewCompactionManagerCompactionsGetOK() *CompactionManagerCompactionsGetOK { + return &CompactionManagerCompactionsGetOK{} +} + +/*CompactionManagerCompactionsGetOK handles this case with default header values. + +CompactionManagerCompactionsGetOK compaction manager compactions get o k +*/ +type CompactionManagerCompactionsGetOK struct { + Payload []*models.Summary +} + +func (o *CompactionManagerCompactionsGetOK) GetPayload() []*models.Summary { + return o.Payload +} + +func (o *CompactionManagerCompactionsGetOK) 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 +} + +// NewCompactionManagerCompactionsGetDefault creates a CompactionManagerCompactionsGetDefault with default headers values +func NewCompactionManagerCompactionsGetDefault(code int) *CompactionManagerCompactionsGetDefault { + return &CompactionManagerCompactionsGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerCompactionsGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerCompactionsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager compactions get default response +func (o *CompactionManagerCompactionsGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerCompactionsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerCompactionsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerCompactionsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_parameters.go new file mode 100644 index 00000000000..de8e1ae5e36 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerForceUserDefinedCompactionPostParams creates a new CompactionManagerForceUserDefinedCompactionPostParams object +// with the default values initialized. +func NewCompactionManagerForceUserDefinedCompactionPostParams() *CompactionManagerForceUserDefinedCompactionPostParams { + var () + return &CompactionManagerForceUserDefinedCompactionPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerForceUserDefinedCompactionPostParamsWithTimeout creates a new CompactionManagerForceUserDefinedCompactionPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerForceUserDefinedCompactionPostParamsWithTimeout(timeout time.Duration) *CompactionManagerForceUserDefinedCompactionPostParams { + var () + return &CompactionManagerForceUserDefinedCompactionPostParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerForceUserDefinedCompactionPostParamsWithContext creates a new CompactionManagerForceUserDefinedCompactionPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerForceUserDefinedCompactionPostParamsWithContext(ctx context.Context) *CompactionManagerForceUserDefinedCompactionPostParams { + var () + return &CompactionManagerForceUserDefinedCompactionPostParams{ + + Context: ctx, + } +} + +// NewCompactionManagerForceUserDefinedCompactionPostParamsWithHTTPClient creates a new CompactionManagerForceUserDefinedCompactionPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerForceUserDefinedCompactionPostParamsWithHTTPClient(client *http.Client) *CompactionManagerForceUserDefinedCompactionPostParams { + var () + return &CompactionManagerForceUserDefinedCompactionPostParams{ + HTTPClient: client, + } +} + +/*CompactionManagerForceUserDefinedCompactionPostParams contains all the parameters to send to the API endpoint +for the compaction manager force user defined compaction post operation typically these are written to a http.Request +*/ +type CompactionManagerForceUserDefinedCompactionPostParams struct { + + /*DataFiles + a comma separated list of sstable file to compact. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself + + */ + DataFiles string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) WithTimeout(timeout time.Duration) *CompactionManagerForceUserDefinedCompactionPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) WithContext(ctx context.Context) *CompactionManagerForceUserDefinedCompactionPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) WithHTTPClient(client *http.Client) *CompactionManagerForceUserDefinedCompactionPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDataFiles adds the dataFiles to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) WithDataFiles(dataFiles string) *CompactionManagerForceUserDefinedCompactionPostParams { + o.SetDataFiles(dataFiles) + return o +} + +// SetDataFiles adds the dataFiles to the compaction manager force user defined compaction post params +func (o *CompactionManagerForceUserDefinedCompactionPostParams) SetDataFiles(dataFiles string) { + o.DataFiles = dataFiles +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerForceUserDefinedCompactionPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param data_files + qrDataFiles := o.DataFiles + qDataFiles := qrDataFiles + if qDataFiles != "" { + if err := r.SetQueryParam("data_files", qDataFiles); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_responses.go new file mode 100644 index 00000000000..c5fe18964aa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_force_user_defined_compaction_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerForceUserDefinedCompactionPostReader is a Reader for the CompactionManagerForceUserDefinedCompactionPost structure. +type CompactionManagerForceUserDefinedCompactionPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerForceUserDefinedCompactionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerForceUserDefinedCompactionPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerForceUserDefinedCompactionPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerForceUserDefinedCompactionPostOK creates a CompactionManagerForceUserDefinedCompactionPostOK with default headers values +func NewCompactionManagerForceUserDefinedCompactionPostOK() *CompactionManagerForceUserDefinedCompactionPostOK { + return &CompactionManagerForceUserDefinedCompactionPostOK{} +} + +/*CompactionManagerForceUserDefinedCompactionPostOK handles this case with default header values. + +CompactionManagerForceUserDefinedCompactionPostOK compaction manager force user defined compaction post o k +*/ +type CompactionManagerForceUserDefinedCompactionPostOK struct { +} + +func (o *CompactionManagerForceUserDefinedCompactionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCompactionManagerForceUserDefinedCompactionPostDefault creates a CompactionManagerForceUserDefinedCompactionPostDefault with default headers values +func NewCompactionManagerForceUserDefinedCompactionPostDefault(code int) *CompactionManagerForceUserDefinedCompactionPostDefault { + return &CompactionManagerForceUserDefinedCompactionPostDefault{ + _statusCode: code, + } +} + +/*CompactionManagerForceUserDefinedCompactionPostDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerForceUserDefinedCompactionPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager force user defined compaction post default response +func (o *CompactionManagerForceUserDefinedCompactionPostDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerForceUserDefinedCompactionPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerForceUserDefinedCompactionPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerForceUserDefinedCompactionPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_parameters.go new file mode 100644 index 00000000000..0383c556ad7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerMetricsBytesCompactedGetParams creates a new CompactionManagerMetricsBytesCompactedGetParams object +// with the default values initialized. +func NewCompactionManagerMetricsBytesCompactedGetParams() *CompactionManagerMetricsBytesCompactedGetParams { + + return &CompactionManagerMetricsBytesCompactedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerMetricsBytesCompactedGetParamsWithTimeout creates a new CompactionManagerMetricsBytesCompactedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerMetricsBytesCompactedGetParamsWithTimeout(timeout time.Duration) *CompactionManagerMetricsBytesCompactedGetParams { + + return &CompactionManagerMetricsBytesCompactedGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerMetricsBytesCompactedGetParamsWithContext creates a new CompactionManagerMetricsBytesCompactedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerMetricsBytesCompactedGetParamsWithContext(ctx context.Context) *CompactionManagerMetricsBytesCompactedGetParams { + + return &CompactionManagerMetricsBytesCompactedGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerMetricsBytesCompactedGetParamsWithHTTPClient creates a new CompactionManagerMetricsBytesCompactedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerMetricsBytesCompactedGetParamsWithHTTPClient(client *http.Client) *CompactionManagerMetricsBytesCompactedGetParams { + + return &CompactionManagerMetricsBytesCompactedGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerMetricsBytesCompactedGetParams contains all the parameters to send to the API endpoint +for the compaction manager metrics bytes compacted get operation typically these are written to a http.Request +*/ +type CompactionManagerMetricsBytesCompactedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) WithTimeout(timeout time.Duration) *CompactionManagerMetricsBytesCompactedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) WithContext(ctx context.Context) *CompactionManagerMetricsBytesCompactedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) WithHTTPClient(client *http.Client) *CompactionManagerMetricsBytesCompactedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager metrics bytes compacted get params +func (o *CompactionManagerMetricsBytesCompactedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerMetricsBytesCompactedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_responses.go new file mode 100644 index 00000000000..0d642c34ef4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_bytes_compacted_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerMetricsBytesCompactedGetReader is a Reader for the CompactionManagerMetricsBytesCompactedGet structure. +type CompactionManagerMetricsBytesCompactedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerMetricsBytesCompactedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerMetricsBytesCompactedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerMetricsBytesCompactedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerMetricsBytesCompactedGetOK creates a CompactionManagerMetricsBytesCompactedGetOK with default headers values +func NewCompactionManagerMetricsBytesCompactedGetOK() *CompactionManagerMetricsBytesCompactedGetOK { + return &CompactionManagerMetricsBytesCompactedGetOK{} +} + +/*CompactionManagerMetricsBytesCompactedGetOK handles this case with default header values. + +CompactionManagerMetricsBytesCompactedGetOK compaction manager metrics bytes compacted get o k +*/ +type CompactionManagerMetricsBytesCompactedGetOK struct { + Payload int32 +} + +func (o *CompactionManagerMetricsBytesCompactedGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CompactionManagerMetricsBytesCompactedGetOK) 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 +} + +// NewCompactionManagerMetricsBytesCompactedGetDefault creates a CompactionManagerMetricsBytesCompactedGetDefault with default headers values +func NewCompactionManagerMetricsBytesCompactedGetDefault(code int) *CompactionManagerMetricsBytesCompactedGetDefault { + return &CompactionManagerMetricsBytesCompactedGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerMetricsBytesCompactedGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerMetricsBytesCompactedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager metrics bytes compacted get default response +func (o *CompactionManagerMetricsBytesCompactedGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerMetricsBytesCompactedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerMetricsBytesCompactedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerMetricsBytesCompactedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_parameters.go new file mode 100644 index 00000000000..c40bcc89f0c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerMetricsCompletedTasksGetParams creates a new CompactionManagerMetricsCompletedTasksGetParams object +// with the default values initialized. +func NewCompactionManagerMetricsCompletedTasksGetParams() *CompactionManagerMetricsCompletedTasksGetParams { + + return &CompactionManagerMetricsCompletedTasksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerMetricsCompletedTasksGetParamsWithTimeout creates a new CompactionManagerMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerMetricsCompletedTasksGetParamsWithTimeout(timeout time.Duration) *CompactionManagerMetricsCompletedTasksGetParams { + + return &CompactionManagerMetricsCompletedTasksGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerMetricsCompletedTasksGetParamsWithContext creates a new CompactionManagerMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerMetricsCompletedTasksGetParamsWithContext(ctx context.Context) *CompactionManagerMetricsCompletedTasksGetParams { + + return &CompactionManagerMetricsCompletedTasksGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerMetricsCompletedTasksGetParamsWithHTTPClient creates a new CompactionManagerMetricsCompletedTasksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerMetricsCompletedTasksGetParamsWithHTTPClient(client *http.Client) *CompactionManagerMetricsCompletedTasksGetParams { + + return &CompactionManagerMetricsCompletedTasksGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerMetricsCompletedTasksGetParams contains all the parameters to send to the API endpoint +for the compaction manager metrics completed tasks get operation typically these are written to a http.Request +*/ +type CompactionManagerMetricsCompletedTasksGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) WithTimeout(timeout time.Duration) *CompactionManagerMetricsCompletedTasksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) WithContext(ctx context.Context) *CompactionManagerMetricsCompletedTasksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) WithHTTPClient(client *http.Client) *CompactionManagerMetricsCompletedTasksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager metrics completed tasks get params +func (o *CompactionManagerMetricsCompletedTasksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerMetricsCompletedTasksGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_responses.go new file mode 100644 index 00000000000..f56ab1db81d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_completed_tasks_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerMetricsCompletedTasksGetReader is a Reader for the CompactionManagerMetricsCompletedTasksGet structure. +type CompactionManagerMetricsCompletedTasksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerMetricsCompletedTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerMetricsCompletedTasksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerMetricsCompletedTasksGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerMetricsCompletedTasksGetOK creates a CompactionManagerMetricsCompletedTasksGetOK with default headers values +func NewCompactionManagerMetricsCompletedTasksGetOK() *CompactionManagerMetricsCompletedTasksGetOK { + return &CompactionManagerMetricsCompletedTasksGetOK{} +} + +/*CompactionManagerMetricsCompletedTasksGetOK handles this case with default header values. + +CompactionManagerMetricsCompletedTasksGetOK compaction manager metrics completed tasks get o k +*/ +type CompactionManagerMetricsCompletedTasksGetOK struct { + Payload interface{} +} + +func (o *CompactionManagerMetricsCompletedTasksGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CompactionManagerMetricsCompletedTasksGetOK) 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 +} + +// NewCompactionManagerMetricsCompletedTasksGetDefault creates a CompactionManagerMetricsCompletedTasksGetDefault with default headers values +func NewCompactionManagerMetricsCompletedTasksGetDefault(code int) *CompactionManagerMetricsCompletedTasksGetDefault { + return &CompactionManagerMetricsCompletedTasksGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerMetricsCompletedTasksGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerMetricsCompletedTasksGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager metrics completed tasks get default response +func (o *CompactionManagerMetricsCompletedTasksGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerMetricsCompletedTasksGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerMetricsCompletedTasksGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerMetricsCompletedTasksGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_parameters.go new file mode 100644 index 00000000000..7d02fe3b7b0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerMetricsPendingTasksGetParams creates a new CompactionManagerMetricsPendingTasksGetParams object +// with the default values initialized. +func NewCompactionManagerMetricsPendingTasksGetParams() *CompactionManagerMetricsPendingTasksGetParams { + + return &CompactionManagerMetricsPendingTasksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerMetricsPendingTasksGetParamsWithTimeout creates a new CompactionManagerMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerMetricsPendingTasksGetParamsWithTimeout(timeout time.Duration) *CompactionManagerMetricsPendingTasksGetParams { + + return &CompactionManagerMetricsPendingTasksGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerMetricsPendingTasksGetParamsWithContext creates a new CompactionManagerMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerMetricsPendingTasksGetParamsWithContext(ctx context.Context) *CompactionManagerMetricsPendingTasksGetParams { + + return &CompactionManagerMetricsPendingTasksGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerMetricsPendingTasksGetParamsWithHTTPClient creates a new CompactionManagerMetricsPendingTasksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerMetricsPendingTasksGetParamsWithHTTPClient(client *http.Client) *CompactionManagerMetricsPendingTasksGetParams { + + return &CompactionManagerMetricsPendingTasksGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerMetricsPendingTasksGetParams contains all the parameters to send to the API endpoint +for the compaction manager metrics pending tasks get operation typically these are written to a http.Request +*/ +type CompactionManagerMetricsPendingTasksGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) WithTimeout(timeout time.Duration) *CompactionManagerMetricsPendingTasksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) WithContext(ctx context.Context) *CompactionManagerMetricsPendingTasksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) WithHTTPClient(client *http.Client) *CompactionManagerMetricsPendingTasksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager metrics pending tasks get params +func (o *CompactionManagerMetricsPendingTasksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerMetricsPendingTasksGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_responses.go new file mode 100644 index 00000000000..32af9cbd2c4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_pending_tasks_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerMetricsPendingTasksGetReader is a Reader for the CompactionManagerMetricsPendingTasksGet structure. +type CompactionManagerMetricsPendingTasksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerMetricsPendingTasksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerMetricsPendingTasksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerMetricsPendingTasksGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerMetricsPendingTasksGetOK creates a CompactionManagerMetricsPendingTasksGetOK with default headers values +func NewCompactionManagerMetricsPendingTasksGetOK() *CompactionManagerMetricsPendingTasksGetOK { + return &CompactionManagerMetricsPendingTasksGetOK{} +} + +/*CompactionManagerMetricsPendingTasksGetOK handles this case with default header values. + +CompactionManagerMetricsPendingTasksGetOK compaction manager metrics pending tasks get o k +*/ +type CompactionManagerMetricsPendingTasksGetOK struct { + Payload int32 +} + +func (o *CompactionManagerMetricsPendingTasksGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *CompactionManagerMetricsPendingTasksGetOK) 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 +} + +// NewCompactionManagerMetricsPendingTasksGetDefault creates a CompactionManagerMetricsPendingTasksGetDefault with default headers values +func NewCompactionManagerMetricsPendingTasksGetDefault(code int) *CompactionManagerMetricsPendingTasksGetDefault { + return &CompactionManagerMetricsPendingTasksGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerMetricsPendingTasksGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerMetricsPendingTasksGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager metrics pending tasks get default response +func (o *CompactionManagerMetricsPendingTasksGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerMetricsPendingTasksGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerMetricsPendingTasksGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerMetricsPendingTasksGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_parameters.go new file mode 100644 index 00000000000..2b7f9ea03f3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetParams creates a new CompactionManagerMetricsTotalCompactionsCompletedGetParams object +// with the default values initialized. +func NewCompactionManagerMetricsTotalCompactionsCompletedGetParams() *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + + return &CompactionManagerMetricsTotalCompactionsCompletedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithTimeout creates a new CompactionManagerMetricsTotalCompactionsCompletedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithTimeout(timeout time.Duration) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + + return &CompactionManagerMetricsTotalCompactionsCompletedGetParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithContext creates a new CompactionManagerMetricsTotalCompactionsCompletedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithContext(ctx context.Context) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + + return &CompactionManagerMetricsTotalCompactionsCompletedGetParams{ + + Context: ctx, + } +} + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithHTTPClient creates a new CompactionManagerMetricsTotalCompactionsCompletedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerMetricsTotalCompactionsCompletedGetParamsWithHTTPClient(client *http.Client) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + + return &CompactionManagerMetricsTotalCompactionsCompletedGetParams{ + HTTPClient: client, + } +} + +/*CompactionManagerMetricsTotalCompactionsCompletedGetParams contains all the parameters to send to the API endpoint +for the compaction manager metrics total compactions completed get operation typically these are written to a http.Request +*/ +type CompactionManagerMetricsTotalCompactionsCompletedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) WithTimeout(timeout time.Duration) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) WithContext(ctx context.Context) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) WithHTTPClient(client *http.Client) *CompactionManagerMetricsTotalCompactionsCompletedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager metrics total compactions completed get params +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_responses.go new file mode 100644 index 00000000000..70fd22a3161 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_metrics_total_compactions_completed_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerMetricsTotalCompactionsCompletedGetReader is a Reader for the CompactionManagerMetricsTotalCompactionsCompletedGet structure. +type CompactionManagerMetricsTotalCompactionsCompletedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerMetricsTotalCompactionsCompletedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerMetricsTotalCompactionsCompletedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetOK creates a CompactionManagerMetricsTotalCompactionsCompletedGetOK with default headers values +func NewCompactionManagerMetricsTotalCompactionsCompletedGetOK() *CompactionManagerMetricsTotalCompactionsCompletedGetOK { + return &CompactionManagerMetricsTotalCompactionsCompletedGetOK{} +} + +/*CompactionManagerMetricsTotalCompactionsCompletedGetOK handles this case with default header values. + +CompactionManagerMetricsTotalCompactionsCompletedGetOK compaction manager metrics total compactions completed get o k +*/ +type CompactionManagerMetricsTotalCompactionsCompletedGetOK struct { + Payload interface{} +} + +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetOK) 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 +} + +// NewCompactionManagerMetricsTotalCompactionsCompletedGetDefault creates a CompactionManagerMetricsTotalCompactionsCompletedGetDefault with default headers values +func NewCompactionManagerMetricsTotalCompactionsCompletedGetDefault(code int) *CompactionManagerMetricsTotalCompactionsCompletedGetDefault { + return &CompactionManagerMetricsTotalCompactionsCompletedGetDefault{ + _statusCode: code, + } +} + +/*CompactionManagerMetricsTotalCompactionsCompletedGetDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerMetricsTotalCompactionsCompletedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager metrics total compactions completed get default response +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerMetricsTotalCompactionsCompletedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_parameters.go new file mode 100644 index 00000000000..ca7d642266e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewCompactionManagerStopCompactionPostParams creates a new CompactionManagerStopCompactionPostParams object +// with the default values initialized. +func NewCompactionManagerStopCompactionPostParams() *CompactionManagerStopCompactionPostParams { + var () + return &CompactionManagerStopCompactionPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCompactionManagerStopCompactionPostParamsWithTimeout creates a new CompactionManagerStopCompactionPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCompactionManagerStopCompactionPostParamsWithTimeout(timeout time.Duration) *CompactionManagerStopCompactionPostParams { + var () + return &CompactionManagerStopCompactionPostParams{ + + timeout: timeout, + } +} + +// NewCompactionManagerStopCompactionPostParamsWithContext creates a new CompactionManagerStopCompactionPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewCompactionManagerStopCompactionPostParamsWithContext(ctx context.Context) *CompactionManagerStopCompactionPostParams { + var () + return &CompactionManagerStopCompactionPostParams{ + + Context: ctx, + } +} + +// NewCompactionManagerStopCompactionPostParamsWithHTTPClient creates a new CompactionManagerStopCompactionPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCompactionManagerStopCompactionPostParamsWithHTTPClient(client *http.Client) *CompactionManagerStopCompactionPostParams { + var () + return &CompactionManagerStopCompactionPostParams{ + HTTPClient: client, + } +} + +/*CompactionManagerStopCompactionPostParams contains all the parameters to send to the API endpoint +for the compaction manager stop compaction post operation typically these are written to a http.Request +*/ +type CompactionManagerStopCompactionPostParams struct { + + /*Type + the type of compaction to stop. Can be one of: - COMPACTION - VALIDATION - CLEANUP - SCRUB - INDEX_BUILD + + */ + Type string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) WithTimeout(timeout time.Duration) *CompactionManagerStopCompactionPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) WithContext(ctx context.Context) *CompactionManagerStopCompactionPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) WithHTTPClient(client *http.Client) *CompactionManagerStopCompactionPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithType adds the typeVar to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) WithType(typeVar string) *CompactionManagerStopCompactionPostParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the compaction manager stop compaction post params +func (o *CompactionManagerStopCompactionPostParams) SetType(typeVar string) { + o.Type = typeVar +} + +// WriteToRequest writes these params to a swagger request +func (o *CompactionManagerStopCompactionPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param type + qrType := o.Type + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_responses.go new file mode 100644 index 00000000000..6b85fc51033 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/compaction_manager_stop_compaction_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// CompactionManagerStopCompactionPostReader is a Reader for the CompactionManagerStopCompactionPost structure. +type CompactionManagerStopCompactionPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CompactionManagerStopCompactionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCompactionManagerStopCompactionPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCompactionManagerStopCompactionPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCompactionManagerStopCompactionPostOK creates a CompactionManagerStopCompactionPostOK with default headers values +func NewCompactionManagerStopCompactionPostOK() *CompactionManagerStopCompactionPostOK { + return &CompactionManagerStopCompactionPostOK{} +} + +/*CompactionManagerStopCompactionPostOK handles this case with default header values. + +CompactionManagerStopCompactionPostOK compaction manager stop compaction post o k +*/ +type CompactionManagerStopCompactionPostOK struct { +} + +func (o *CompactionManagerStopCompactionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewCompactionManagerStopCompactionPostDefault creates a CompactionManagerStopCompactionPostDefault with default headers values +func NewCompactionManagerStopCompactionPostDefault(code int) *CompactionManagerStopCompactionPostDefault { + return &CompactionManagerStopCompactionPostDefault{ + _statusCode: code, + } +} + +/*CompactionManagerStopCompactionPostDefault handles this case with default header values. + +internal server error +*/ +type CompactionManagerStopCompactionPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the compaction manager stop compaction post default response +func (o *CompactionManagerStopCompactionPostDefault) Code() int { + return o._statusCode +} + +func (o *CompactionManagerStopCompactionPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *CompactionManagerStopCompactionPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *CompactionManagerStopCompactionPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_parameters.go new file mode 100644 index 00000000000..99e586eddd1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorCountEndpointDownGetParams creates a new FailureDetectorCountEndpointDownGetParams object +// with the default values initialized. +func NewFailureDetectorCountEndpointDownGetParams() *FailureDetectorCountEndpointDownGetParams { + + return &FailureDetectorCountEndpointDownGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorCountEndpointDownGetParamsWithTimeout creates a new FailureDetectorCountEndpointDownGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorCountEndpointDownGetParamsWithTimeout(timeout time.Duration) *FailureDetectorCountEndpointDownGetParams { + + return &FailureDetectorCountEndpointDownGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorCountEndpointDownGetParamsWithContext creates a new FailureDetectorCountEndpointDownGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorCountEndpointDownGetParamsWithContext(ctx context.Context) *FailureDetectorCountEndpointDownGetParams { + + return &FailureDetectorCountEndpointDownGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorCountEndpointDownGetParamsWithHTTPClient creates a new FailureDetectorCountEndpointDownGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorCountEndpointDownGetParamsWithHTTPClient(client *http.Client) *FailureDetectorCountEndpointDownGetParams { + + return &FailureDetectorCountEndpointDownGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorCountEndpointDownGetParams contains all the parameters to send to the API endpoint +for the failure detector count endpoint down get operation typically these are written to a http.Request +*/ +type FailureDetectorCountEndpointDownGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) WithTimeout(timeout time.Duration) *FailureDetectorCountEndpointDownGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) WithContext(ctx context.Context) *FailureDetectorCountEndpointDownGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) WithHTTPClient(client *http.Client) *FailureDetectorCountEndpointDownGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector count endpoint down get params +func (o *FailureDetectorCountEndpointDownGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorCountEndpointDownGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_responses.go new file mode 100644 index 00000000000..561992c3d4c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_down_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorCountEndpointDownGetReader is a Reader for the FailureDetectorCountEndpointDownGet structure. +type FailureDetectorCountEndpointDownGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorCountEndpointDownGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorCountEndpointDownGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorCountEndpointDownGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorCountEndpointDownGetOK creates a FailureDetectorCountEndpointDownGetOK with default headers values +func NewFailureDetectorCountEndpointDownGetOK() *FailureDetectorCountEndpointDownGetOK { + return &FailureDetectorCountEndpointDownGetOK{} +} + +/*FailureDetectorCountEndpointDownGetOK handles this case with default header values. + +FailureDetectorCountEndpointDownGetOK failure detector count endpoint down get o k +*/ +type FailureDetectorCountEndpointDownGetOK struct { + Payload int32 +} + +func (o *FailureDetectorCountEndpointDownGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *FailureDetectorCountEndpointDownGetOK) 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 +} + +// NewFailureDetectorCountEndpointDownGetDefault creates a FailureDetectorCountEndpointDownGetDefault with default headers values +func NewFailureDetectorCountEndpointDownGetDefault(code int) *FailureDetectorCountEndpointDownGetDefault { + return &FailureDetectorCountEndpointDownGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorCountEndpointDownGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorCountEndpointDownGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector count endpoint down get default response +func (o *FailureDetectorCountEndpointDownGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorCountEndpointDownGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorCountEndpointDownGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorCountEndpointDownGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_parameters.go new file mode 100644 index 00000000000..9b43b1d05d6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorCountEndpointUpGetParams creates a new FailureDetectorCountEndpointUpGetParams object +// with the default values initialized. +func NewFailureDetectorCountEndpointUpGetParams() *FailureDetectorCountEndpointUpGetParams { + + return &FailureDetectorCountEndpointUpGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorCountEndpointUpGetParamsWithTimeout creates a new FailureDetectorCountEndpointUpGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorCountEndpointUpGetParamsWithTimeout(timeout time.Duration) *FailureDetectorCountEndpointUpGetParams { + + return &FailureDetectorCountEndpointUpGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorCountEndpointUpGetParamsWithContext creates a new FailureDetectorCountEndpointUpGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorCountEndpointUpGetParamsWithContext(ctx context.Context) *FailureDetectorCountEndpointUpGetParams { + + return &FailureDetectorCountEndpointUpGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorCountEndpointUpGetParamsWithHTTPClient creates a new FailureDetectorCountEndpointUpGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorCountEndpointUpGetParamsWithHTTPClient(client *http.Client) *FailureDetectorCountEndpointUpGetParams { + + return &FailureDetectorCountEndpointUpGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorCountEndpointUpGetParams contains all the parameters to send to the API endpoint +for the failure detector count endpoint up get operation typically these are written to a http.Request +*/ +type FailureDetectorCountEndpointUpGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) WithTimeout(timeout time.Duration) *FailureDetectorCountEndpointUpGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) WithContext(ctx context.Context) *FailureDetectorCountEndpointUpGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) WithHTTPClient(client *http.Client) *FailureDetectorCountEndpointUpGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector count endpoint up get params +func (o *FailureDetectorCountEndpointUpGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorCountEndpointUpGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_responses.go new file mode 100644 index 00000000000..130cfa33aeb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_count_endpoint_up_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorCountEndpointUpGetReader is a Reader for the FailureDetectorCountEndpointUpGet structure. +type FailureDetectorCountEndpointUpGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorCountEndpointUpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorCountEndpointUpGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorCountEndpointUpGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorCountEndpointUpGetOK creates a FailureDetectorCountEndpointUpGetOK with default headers values +func NewFailureDetectorCountEndpointUpGetOK() *FailureDetectorCountEndpointUpGetOK { + return &FailureDetectorCountEndpointUpGetOK{} +} + +/*FailureDetectorCountEndpointUpGetOK handles this case with default header values. + +FailureDetectorCountEndpointUpGetOK failure detector count endpoint up get o k +*/ +type FailureDetectorCountEndpointUpGetOK struct { + Payload int32 +} + +func (o *FailureDetectorCountEndpointUpGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *FailureDetectorCountEndpointUpGetOK) 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 +} + +// NewFailureDetectorCountEndpointUpGetDefault creates a FailureDetectorCountEndpointUpGetDefault with default headers values +func NewFailureDetectorCountEndpointUpGetDefault(code int) *FailureDetectorCountEndpointUpGetDefault { + return &FailureDetectorCountEndpointUpGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorCountEndpointUpGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorCountEndpointUpGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector count endpoint up get default response +func (o *FailureDetectorCountEndpointUpGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorCountEndpointUpGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorCountEndpointUpGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorCountEndpointUpGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_parameters.go new file mode 100644 index 00000000000..b5e71f091a8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorEndpointPhiValuesGetParams creates a new FailureDetectorEndpointPhiValuesGetParams object +// with the default values initialized. +func NewFailureDetectorEndpointPhiValuesGetParams() *FailureDetectorEndpointPhiValuesGetParams { + + return &FailureDetectorEndpointPhiValuesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorEndpointPhiValuesGetParamsWithTimeout creates a new FailureDetectorEndpointPhiValuesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorEndpointPhiValuesGetParamsWithTimeout(timeout time.Duration) *FailureDetectorEndpointPhiValuesGetParams { + + return &FailureDetectorEndpointPhiValuesGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorEndpointPhiValuesGetParamsWithContext creates a new FailureDetectorEndpointPhiValuesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorEndpointPhiValuesGetParamsWithContext(ctx context.Context) *FailureDetectorEndpointPhiValuesGetParams { + + return &FailureDetectorEndpointPhiValuesGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorEndpointPhiValuesGetParamsWithHTTPClient creates a new FailureDetectorEndpointPhiValuesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorEndpointPhiValuesGetParamsWithHTTPClient(client *http.Client) *FailureDetectorEndpointPhiValuesGetParams { + + return &FailureDetectorEndpointPhiValuesGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorEndpointPhiValuesGetParams contains all the parameters to send to the API endpoint +for the failure detector endpoint phi values get operation typically these are written to a http.Request +*/ +type FailureDetectorEndpointPhiValuesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) WithTimeout(timeout time.Duration) *FailureDetectorEndpointPhiValuesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) WithContext(ctx context.Context) *FailureDetectorEndpointPhiValuesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) WithHTTPClient(client *http.Client) *FailureDetectorEndpointPhiValuesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector endpoint phi values get params +func (o *FailureDetectorEndpointPhiValuesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorEndpointPhiValuesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_responses.go new file mode 100644 index 00000000000..19187eb215e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoint_phi_values_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorEndpointPhiValuesGetReader is a Reader for the FailureDetectorEndpointPhiValuesGet structure. +type FailureDetectorEndpointPhiValuesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorEndpointPhiValuesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorEndpointPhiValuesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorEndpointPhiValuesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorEndpointPhiValuesGetOK creates a FailureDetectorEndpointPhiValuesGetOK with default headers values +func NewFailureDetectorEndpointPhiValuesGetOK() *FailureDetectorEndpointPhiValuesGetOK { + return &FailureDetectorEndpointPhiValuesGetOK{} +} + +/*FailureDetectorEndpointPhiValuesGetOK handles this case with default header values. + +FailureDetectorEndpointPhiValuesGetOK failure detector endpoint phi values get o k +*/ +type FailureDetectorEndpointPhiValuesGetOK struct { + Payload interface{} +} + +func (o *FailureDetectorEndpointPhiValuesGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *FailureDetectorEndpointPhiValuesGetOK) 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 +} + +// NewFailureDetectorEndpointPhiValuesGetDefault creates a FailureDetectorEndpointPhiValuesGetDefault with default headers values +func NewFailureDetectorEndpointPhiValuesGetDefault(code int) *FailureDetectorEndpointPhiValuesGetDefault { + return &FailureDetectorEndpointPhiValuesGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorEndpointPhiValuesGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorEndpointPhiValuesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector endpoint phi values get default response +func (o *FailureDetectorEndpointPhiValuesGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorEndpointPhiValuesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorEndpointPhiValuesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorEndpointPhiValuesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_parameters.go new file mode 100644 index 00000000000..e1d45b019e1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorEndpointsGetParams creates a new FailureDetectorEndpointsGetParams object +// with the default values initialized. +func NewFailureDetectorEndpointsGetParams() *FailureDetectorEndpointsGetParams { + + return &FailureDetectorEndpointsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorEndpointsGetParamsWithTimeout creates a new FailureDetectorEndpointsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorEndpointsGetParamsWithTimeout(timeout time.Duration) *FailureDetectorEndpointsGetParams { + + return &FailureDetectorEndpointsGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorEndpointsGetParamsWithContext creates a new FailureDetectorEndpointsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorEndpointsGetParamsWithContext(ctx context.Context) *FailureDetectorEndpointsGetParams { + + return &FailureDetectorEndpointsGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorEndpointsGetParamsWithHTTPClient creates a new FailureDetectorEndpointsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorEndpointsGetParamsWithHTTPClient(client *http.Client) *FailureDetectorEndpointsGetParams { + + return &FailureDetectorEndpointsGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorEndpointsGetParams contains all the parameters to send to the API endpoint +for the failure detector endpoints get operation typically these are written to a http.Request +*/ +type FailureDetectorEndpointsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) WithTimeout(timeout time.Duration) *FailureDetectorEndpointsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) WithContext(ctx context.Context) *FailureDetectorEndpointsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) WithHTTPClient(client *http.Client) *FailureDetectorEndpointsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector endpoints get params +func (o *FailureDetectorEndpointsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorEndpointsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_responses.go new file mode 100644 index 00000000000..e8e1972ec87 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorEndpointsGetReader is a Reader for the FailureDetectorEndpointsGet structure. +type FailureDetectorEndpointsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorEndpointsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorEndpointsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorEndpointsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorEndpointsGetOK creates a FailureDetectorEndpointsGetOK with default headers values +func NewFailureDetectorEndpointsGetOK() *FailureDetectorEndpointsGetOK { + return &FailureDetectorEndpointsGetOK{} +} + +/*FailureDetectorEndpointsGetOK handles this case with default header values. + +FailureDetectorEndpointsGetOK failure detector endpoints get o k +*/ +type FailureDetectorEndpointsGetOK struct { + Payload []*models.EndpointState +} + +func (o *FailureDetectorEndpointsGetOK) GetPayload() []*models.EndpointState { + return o.Payload +} + +func (o *FailureDetectorEndpointsGetOK) 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 +} + +// NewFailureDetectorEndpointsGetDefault creates a FailureDetectorEndpointsGetDefault with default headers values +func NewFailureDetectorEndpointsGetDefault(code int) *FailureDetectorEndpointsGetDefault { + return &FailureDetectorEndpointsGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorEndpointsGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorEndpointsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector endpoints get default response +func (o *FailureDetectorEndpointsGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorEndpointsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorEndpointsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorEndpointsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_parameters.go new file mode 100644 index 00000000000..f731bc81167 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorEndpointsStatesByAddrGetParams creates a new FailureDetectorEndpointsStatesByAddrGetParams object +// with the default values initialized. +func NewFailureDetectorEndpointsStatesByAddrGetParams() *FailureDetectorEndpointsStatesByAddrGetParams { + var () + return &FailureDetectorEndpointsStatesByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorEndpointsStatesByAddrGetParamsWithTimeout creates a new FailureDetectorEndpointsStatesByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorEndpointsStatesByAddrGetParamsWithTimeout(timeout time.Duration) *FailureDetectorEndpointsStatesByAddrGetParams { + var () + return &FailureDetectorEndpointsStatesByAddrGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorEndpointsStatesByAddrGetParamsWithContext creates a new FailureDetectorEndpointsStatesByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorEndpointsStatesByAddrGetParamsWithContext(ctx context.Context) *FailureDetectorEndpointsStatesByAddrGetParams { + var () + return &FailureDetectorEndpointsStatesByAddrGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorEndpointsStatesByAddrGetParamsWithHTTPClient creates a new FailureDetectorEndpointsStatesByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorEndpointsStatesByAddrGetParamsWithHTTPClient(client *http.Client) *FailureDetectorEndpointsStatesByAddrGetParams { + var () + return &FailureDetectorEndpointsStatesByAddrGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorEndpointsStatesByAddrGetParams contains all the parameters to send to the API endpoint +for the failure detector endpoints states by addr get operation typically these are written to a http.Request +*/ +type FailureDetectorEndpointsStatesByAddrGetParams struct { + + /*Addr + The endpoint address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) WithTimeout(timeout time.Duration) *FailureDetectorEndpointsStatesByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) WithContext(ctx context.Context) *FailureDetectorEndpointsStatesByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) WithHTTPClient(client *http.Client) *FailureDetectorEndpointsStatesByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) WithAddr(addr string) *FailureDetectorEndpointsStatesByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the failure detector endpoints states by addr get params +func (o *FailureDetectorEndpointsStatesByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorEndpointsStatesByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_responses.go new file mode 100644 index 00000000000..8c70c152933 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_endpoints_states_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorEndpointsStatesByAddrGetReader is a Reader for the FailureDetectorEndpointsStatesByAddrGet structure. +type FailureDetectorEndpointsStatesByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorEndpointsStatesByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorEndpointsStatesByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorEndpointsStatesByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorEndpointsStatesByAddrGetOK creates a FailureDetectorEndpointsStatesByAddrGetOK with default headers values +func NewFailureDetectorEndpointsStatesByAddrGetOK() *FailureDetectorEndpointsStatesByAddrGetOK { + return &FailureDetectorEndpointsStatesByAddrGetOK{} +} + +/*FailureDetectorEndpointsStatesByAddrGetOK handles this case with default header values. + +FailureDetectorEndpointsStatesByAddrGetOK failure detector endpoints states by addr get o k +*/ +type FailureDetectorEndpointsStatesByAddrGetOK struct { + Payload string +} + +func (o *FailureDetectorEndpointsStatesByAddrGetOK) GetPayload() string { + return o.Payload +} + +func (o *FailureDetectorEndpointsStatesByAddrGetOK) 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 +} + +// NewFailureDetectorEndpointsStatesByAddrGetDefault creates a FailureDetectorEndpointsStatesByAddrGetDefault with default headers values +func NewFailureDetectorEndpointsStatesByAddrGetDefault(code int) *FailureDetectorEndpointsStatesByAddrGetDefault { + return &FailureDetectorEndpointsStatesByAddrGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorEndpointsStatesByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorEndpointsStatesByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector endpoints states by addr get default response +func (o *FailureDetectorEndpointsStatesByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorEndpointsStatesByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorEndpointsStatesByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorEndpointsStatesByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_parameters.go new file mode 100644 index 00000000000..29e74dd81cb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorPhiGetParams creates a new FailureDetectorPhiGetParams object +// with the default values initialized. +func NewFailureDetectorPhiGetParams() *FailureDetectorPhiGetParams { + + return &FailureDetectorPhiGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorPhiGetParamsWithTimeout creates a new FailureDetectorPhiGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorPhiGetParamsWithTimeout(timeout time.Duration) *FailureDetectorPhiGetParams { + + return &FailureDetectorPhiGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorPhiGetParamsWithContext creates a new FailureDetectorPhiGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorPhiGetParamsWithContext(ctx context.Context) *FailureDetectorPhiGetParams { + + return &FailureDetectorPhiGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorPhiGetParamsWithHTTPClient creates a new FailureDetectorPhiGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorPhiGetParamsWithHTTPClient(client *http.Client) *FailureDetectorPhiGetParams { + + return &FailureDetectorPhiGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorPhiGetParams contains all the parameters to send to the API endpoint +for the failure detector phi get operation typically these are written to a http.Request +*/ +type FailureDetectorPhiGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) WithTimeout(timeout time.Duration) *FailureDetectorPhiGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) WithContext(ctx context.Context) *FailureDetectorPhiGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) WithHTTPClient(client *http.Client) *FailureDetectorPhiGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector phi get params +func (o *FailureDetectorPhiGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorPhiGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_responses.go new file mode 100644 index 00000000000..deb8d38e4e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorPhiGetReader is a Reader for the FailureDetectorPhiGet structure. +type FailureDetectorPhiGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorPhiGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorPhiGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorPhiGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorPhiGetOK creates a FailureDetectorPhiGetOK with default headers values +func NewFailureDetectorPhiGetOK() *FailureDetectorPhiGetOK { + return &FailureDetectorPhiGetOK{} +} + +/*FailureDetectorPhiGetOK handles this case with default header values. + +FailureDetectorPhiGetOK failure detector phi get o k +*/ +type FailureDetectorPhiGetOK struct { + Payload string +} + +func (o *FailureDetectorPhiGetOK) GetPayload() string { + return o.Payload +} + +func (o *FailureDetectorPhiGetOK) 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 +} + +// NewFailureDetectorPhiGetDefault creates a FailureDetectorPhiGetDefault with default headers values +func NewFailureDetectorPhiGetDefault(code int) *FailureDetectorPhiGetDefault { + return &FailureDetectorPhiGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorPhiGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorPhiGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector phi get default response +func (o *FailureDetectorPhiGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorPhiGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorPhiGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorPhiGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_parameters.go new file mode 100644 index 00000000000..452fc119a5d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorPhiPostParams creates a new FailureDetectorPhiPostParams object +// with the default values initialized. +func NewFailureDetectorPhiPostParams() *FailureDetectorPhiPostParams { + var () + return &FailureDetectorPhiPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorPhiPostParamsWithTimeout creates a new FailureDetectorPhiPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorPhiPostParamsWithTimeout(timeout time.Duration) *FailureDetectorPhiPostParams { + var () + return &FailureDetectorPhiPostParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorPhiPostParamsWithContext creates a new FailureDetectorPhiPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorPhiPostParamsWithContext(ctx context.Context) *FailureDetectorPhiPostParams { + var () + return &FailureDetectorPhiPostParams{ + + Context: ctx, + } +} + +// NewFailureDetectorPhiPostParamsWithHTTPClient creates a new FailureDetectorPhiPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorPhiPostParamsWithHTTPClient(client *http.Client) *FailureDetectorPhiPostParams { + var () + return &FailureDetectorPhiPostParams{ + HTTPClient: client, + } +} + +/*FailureDetectorPhiPostParams contains all the parameters to send to the API endpoint +for the failure detector phi post operation typically these are written to a http.Request +*/ +type FailureDetectorPhiPostParams struct { + + /*Phi + The new phi value + + */ + Phi string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) WithTimeout(timeout time.Duration) *FailureDetectorPhiPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) WithContext(ctx context.Context) *FailureDetectorPhiPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) WithHTTPClient(client *http.Client) *FailureDetectorPhiPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPhi adds the phi to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) WithPhi(phi string) *FailureDetectorPhiPostParams { + o.SetPhi(phi) + return o +} + +// SetPhi adds the phi to the failure detector phi post params +func (o *FailureDetectorPhiPostParams) SetPhi(phi string) { + o.Phi = phi +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorPhiPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param phi + qrPhi := o.Phi + qPhi := qrPhi + if qPhi != "" { + if err := r.SetQueryParam("phi", qPhi); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_responses.go new file mode 100644 index 00000000000..c42fd6b69ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_phi_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorPhiPostReader is a Reader for the FailureDetectorPhiPost structure. +type FailureDetectorPhiPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorPhiPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorPhiPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorPhiPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorPhiPostOK creates a FailureDetectorPhiPostOK with default headers values +func NewFailureDetectorPhiPostOK() *FailureDetectorPhiPostOK { + return &FailureDetectorPhiPostOK{} +} + +/*FailureDetectorPhiPostOK handles this case with default header values. + +FailureDetectorPhiPostOK failure detector phi post o k +*/ +type FailureDetectorPhiPostOK struct { + Payload interface{} +} + +func (o *FailureDetectorPhiPostOK) GetPayload() interface{} { + return o.Payload +} + +func (o *FailureDetectorPhiPostOK) 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 +} + +// NewFailureDetectorPhiPostDefault creates a FailureDetectorPhiPostDefault with default headers values +func NewFailureDetectorPhiPostDefault(code int) *FailureDetectorPhiPostDefault { + return &FailureDetectorPhiPostDefault{ + _statusCode: code, + } +} + +/*FailureDetectorPhiPostDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorPhiPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector phi post default response +func (o *FailureDetectorPhiPostDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorPhiPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorPhiPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorPhiPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_parameters.go new file mode 100644 index 00000000000..e7b8a233b64 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFailureDetectorSimpleStatesGetParams creates a new FailureDetectorSimpleStatesGetParams object +// with the default values initialized. +func NewFailureDetectorSimpleStatesGetParams() *FailureDetectorSimpleStatesGetParams { + + return &FailureDetectorSimpleStatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFailureDetectorSimpleStatesGetParamsWithTimeout creates a new FailureDetectorSimpleStatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFailureDetectorSimpleStatesGetParamsWithTimeout(timeout time.Duration) *FailureDetectorSimpleStatesGetParams { + + return &FailureDetectorSimpleStatesGetParams{ + + timeout: timeout, + } +} + +// NewFailureDetectorSimpleStatesGetParamsWithContext creates a new FailureDetectorSimpleStatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewFailureDetectorSimpleStatesGetParamsWithContext(ctx context.Context) *FailureDetectorSimpleStatesGetParams { + + return &FailureDetectorSimpleStatesGetParams{ + + Context: ctx, + } +} + +// NewFailureDetectorSimpleStatesGetParamsWithHTTPClient creates a new FailureDetectorSimpleStatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFailureDetectorSimpleStatesGetParamsWithHTTPClient(client *http.Client) *FailureDetectorSimpleStatesGetParams { + + return &FailureDetectorSimpleStatesGetParams{ + HTTPClient: client, + } +} + +/*FailureDetectorSimpleStatesGetParams contains all the parameters to send to the API endpoint +for the failure detector simple states get operation typically these are written to a http.Request +*/ +type FailureDetectorSimpleStatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) WithTimeout(timeout time.Duration) *FailureDetectorSimpleStatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) WithContext(ctx context.Context) *FailureDetectorSimpleStatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) WithHTTPClient(client *http.Client) *FailureDetectorSimpleStatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the failure detector simple states get params +func (o *FailureDetectorSimpleStatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FailureDetectorSimpleStatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_responses.go new file mode 100644 index 00000000000..e5bf5dd292e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/failure_detector_simple_states_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// FailureDetectorSimpleStatesGetReader is a Reader for the FailureDetectorSimpleStatesGet structure. +type FailureDetectorSimpleStatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FailureDetectorSimpleStatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFailureDetectorSimpleStatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFailureDetectorSimpleStatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFailureDetectorSimpleStatesGetOK creates a FailureDetectorSimpleStatesGetOK with default headers values +func NewFailureDetectorSimpleStatesGetOK() *FailureDetectorSimpleStatesGetOK { + return &FailureDetectorSimpleStatesGetOK{} +} + +/*FailureDetectorSimpleStatesGetOK handles this case with default header values. + +FailureDetectorSimpleStatesGetOK failure detector simple states get o k +*/ +type FailureDetectorSimpleStatesGetOK struct { + Payload []*models.Mapper +} + +func (o *FailureDetectorSimpleStatesGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *FailureDetectorSimpleStatesGetOK) 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 +} + +// NewFailureDetectorSimpleStatesGetDefault creates a FailureDetectorSimpleStatesGetDefault with default headers values +func NewFailureDetectorSimpleStatesGetDefault(code int) *FailureDetectorSimpleStatesGetDefault { + return &FailureDetectorSimpleStatesGetDefault{ + _statusCode: code, + } +} + +/*FailureDetectorSimpleStatesGetDefault handles this case with default header values. + +internal server error +*/ +type FailureDetectorSimpleStatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the failure detector simple states get default response +func (o *FailureDetectorSimpleStatesGetDefault) Code() int { + return o._statusCode +} + +func (o *FailureDetectorSimpleStatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FailureDetectorSimpleStatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FailureDetectorSimpleStatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_parameters.go new file mode 100644 index 00000000000..34ee11c93ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperAssassinateByAddrPostParams creates a new GossiperAssassinateByAddrPostParams object +// with the default values initialized. +func NewGossiperAssassinateByAddrPostParams() *GossiperAssassinateByAddrPostParams { + var () + return &GossiperAssassinateByAddrPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperAssassinateByAddrPostParamsWithTimeout creates a new GossiperAssassinateByAddrPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperAssassinateByAddrPostParamsWithTimeout(timeout time.Duration) *GossiperAssassinateByAddrPostParams { + var () + return &GossiperAssassinateByAddrPostParams{ + + timeout: timeout, + } +} + +// NewGossiperAssassinateByAddrPostParamsWithContext creates a new GossiperAssassinateByAddrPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperAssassinateByAddrPostParamsWithContext(ctx context.Context) *GossiperAssassinateByAddrPostParams { + var () + return &GossiperAssassinateByAddrPostParams{ + + Context: ctx, + } +} + +// NewGossiperAssassinateByAddrPostParamsWithHTTPClient creates a new GossiperAssassinateByAddrPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperAssassinateByAddrPostParamsWithHTTPClient(client *http.Client) *GossiperAssassinateByAddrPostParams { + var () + return &GossiperAssassinateByAddrPostParams{ + HTTPClient: client, + } +} + +/*GossiperAssassinateByAddrPostParams contains all the parameters to send to the API endpoint +for the gossiper assassinate by addr post operation typically these are written to a http.Request +*/ +type GossiperAssassinateByAddrPostParams struct { + + /*Addr + The endpoint address + + */ + Addr string + /*Unsafe + Set to True to perform an unsafe assassination + + */ + Unsafe *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) WithTimeout(timeout time.Duration) *GossiperAssassinateByAddrPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) WithContext(ctx context.Context) *GossiperAssassinateByAddrPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) WithHTTPClient(client *http.Client) *GossiperAssassinateByAddrPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) WithAddr(addr string) *GossiperAssassinateByAddrPostParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) SetAddr(addr string) { + o.Addr = addr +} + +// WithUnsafe adds the unsafe to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) WithUnsafe(unsafe *bool) *GossiperAssassinateByAddrPostParams { + o.SetUnsafe(unsafe) + return o +} + +// SetUnsafe adds the unsafe to the gossiper assassinate by addr post params +func (o *GossiperAssassinateByAddrPostParams) SetUnsafe(unsafe *bool) { + o.Unsafe = unsafe +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperAssassinateByAddrPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if o.Unsafe != nil { + + // query param unsafe + var qrUnsafe bool + if o.Unsafe != nil { + qrUnsafe = *o.Unsafe + } + qUnsafe := swag.FormatBool(qrUnsafe) + if qUnsafe != "" { + if err := r.SetQueryParam("unsafe", qUnsafe); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_responses.go new file mode 100644 index 00000000000..3c13a237c4a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_assassinate_by_addr_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperAssassinateByAddrPostReader is a Reader for the GossiperAssassinateByAddrPost structure. +type GossiperAssassinateByAddrPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperAssassinateByAddrPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperAssassinateByAddrPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperAssassinateByAddrPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperAssassinateByAddrPostOK creates a GossiperAssassinateByAddrPostOK with default headers values +func NewGossiperAssassinateByAddrPostOK() *GossiperAssassinateByAddrPostOK { + return &GossiperAssassinateByAddrPostOK{} +} + +/*GossiperAssassinateByAddrPostOK handles this case with default header values. + +GossiperAssassinateByAddrPostOK gossiper assassinate by addr post o k +*/ +type GossiperAssassinateByAddrPostOK struct { +} + +func (o *GossiperAssassinateByAddrPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewGossiperAssassinateByAddrPostDefault creates a GossiperAssassinateByAddrPostDefault with default headers values +func NewGossiperAssassinateByAddrPostDefault(code int) *GossiperAssassinateByAddrPostDefault { + return &GossiperAssassinateByAddrPostDefault{ + _statusCode: code, + } +} + +/*GossiperAssassinateByAddrPostDefault handles this case with default header values. + +internal server error +*/ +type GossiperAssassinateByAddrPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper assassinate by addr post default response +func (o *GossiperAssassinateByAddrPostDefault) Code() int { + return o._statusCode +} + +func (o *GossiperAssassinateByAddrPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperAssassinateByAddrPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperAssassinateByAddrPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_parameters.go new file mode 100644 index 00000000000..f214c1e131a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperDowntimeByAddrGetParams creates a new GossiperDowntimeByAddrGetParams object +// with the default values initialized. +func NewGossiperDowntimeByAddrGetParams() *GossiperDowntimeByAddrGetParams { + var () + return &GossiperDowntimeByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperDowntimeByAddrGetParamsWithTimeout creates a new GossiperDowntimeByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperDowntimeByAddrGetParamsWithTimeout(timeout time.Duration) *GossiperDowntimeByAddrGetParams { + var () + return &GossiperDowntimeByAddrGetParams{ + + timeout: timeout, + } +} + +// NewGossiperDowntimeByAddrGetParamsWithContext creates a new GossiperDowntimeByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperDowntimeByAddrGetParamsWithContext(ctx context.Context) *GossiperDowntimeByAddrGetParams { + var () + return &GossiperDowntimeByAddrGetParams{ + + Context: ctx, + } +} + +// NewGossiperDowntimeByAddrGetParamsWithHTTPClient creates a new GossiperDowntimeByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperDowntimeByAddrGetParamsWithHTTPClient(client *http.Client) *GossiperDowntimeByAddrGetParams { + var () + return &GossiperDowntimeByAddrGetParams{ + HTTPClient: client, + } +} + +/*GossiperDowntimeByAddrGetParams contains all the parameters to send to the API endpoint +for the gossiper downtime by addr get operation typically these are written to a http.Request +*/ +type GossiperDowntimeByAddrGetParams struct { + + /*Addr + The endpoint address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) WithTimeout(timeout time.Duration) *GossiperDowntimeByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) WithContext(ctx context.Context) *GossiperDowntimeByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) WithHTTPClient(client *http.Client) *GossiperDowntimeByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) WithAddr(addr string) *GossiperDowntimeByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the gossiper downtime by addr get params +func (o *GossiperDowntimeByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperDowntimeByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_responses.go new file mode 100644 index 00000000000..e9c53d78fde --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_downtime_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperDowntimeByAddrGetReader is a Reader for the GossiperDowntimeByAddrGet structure. +type GossiperDowntimeByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperDowntimeByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperDowntimeByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperDowntimeByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperDowntimeByAddrGetOK creates a GossiperDowntimeByAddrGetOK with default headers values +func NewGossiperDowntimeByAddrGetOK() *GossiperDowntimeByAddrGetOK { + return &GossiperDowntimeByAddrGetOK{} +} + +/*GossiperDowntimeByAddrGetOK handles this case with default header values. + +GossiperDowntimeByAddrGetOK gossiper downtime by addr get o k +*/ +type GossiperDowntimeByAddrGetOK struct { + Payload interface{} +} + +func (o *GossiperDowntimeByAddrGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *GossiperDowntimeByAddrGetOK) 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 +} + +// NewGossiperDowntimeByAddrGetDefault creates a GossiperDowntimeByAddrGetDefault with default headers values +func NewGossiperDowntimeByAddrGetDefault(code int) *GossiperDowntimeByAddrGetDefault { + return &GossiperDowntimeByAddrGetDefault{ + _statusCode: code, + } +} + +/*GossiperDowntimeByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type GossiperDowntimeByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper downtime by addr get default response +func (o *GossiperDowntimeByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *GossiperDowntimeByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperDowntimeByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperDowntimeByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_parameters.go new file mode 100644 index 00000000000..ceeacafbc5c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperEndpointDownGetParams creates a new GossiperEndpointDownGetParams object +// with the default values initialized. +func NewGossiperEndpointDownGetParams() *GossiperEndpointDownGetParams { + + return &GossiperEndpointDownGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperEndpointDownGetParamsWithTimeout creates a new GossiperEndpointDownGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperEndpointDownGetParamsWithTimeout(timeout time.Duration) *GossiperEndpointDownGetParams { + + return &GossiperEndpointDownGetParams{ + + timeout: timeout, + } +} + +// NewGossiperEndpointDownGetParamsWithContext creates a new GossiperEndpointDownGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperEndpointDownGetParamsWithContext(ctx context.Context) *GossiperEndpointDownGetParams { + + return &GossiperEndpointDownGetParams{ + + Context: ctx, + } +} + +// NewGossiperEndpointDownGetParamsWithHTTPClient creates a new GossiperEndpointDownGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperEndpointDownGetParamsWithHTTPClient(client *http.Client) *GossiperEndpointDownGetParams { + + return &GossiperEndpointDownGetParams{ + HTTPClient: client, + } +} + +/*GossiperEndpointDownGetParams contains all the parameters to send to the API endpoint +for the gossiper endpoint down get operation typically these are written to a http.Request +*/ +type GossiperEndpointDownGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) WithTimeout(timeout time.Duration) *GossiperEndpointDownGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) WithContext(ctx context.Context) *GossiperEndpointDownGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) WithHTTPClient(client *http.Client) *GossiperEndpointDownGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper endpoint down get params +func (o *GossiperEndpointDownGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperEndpointDownGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_responses.go new file mode 100644 index 00000000000..04149c8c8c8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_down_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperEndpointDownGetReader is a Reader for the GossiperEndpointDownGet structure. +type GossiperEndpointDownGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperEndpointDownGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperEndpointDownGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperEndpointDownGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperEndpointDownGetOK creates a GossiperEndpointDownGetOK with default headers values +func NewGossiperEndpointDownGetOK() *GossiperEndpointDownGetOK { + return &GossiperEndpointDownGetOK{} +} + +/*GossiperEndpointDownGetOK handles this case with default header values. + +GossiperEndpointDownGetOK gossiper endpoint down get o k +*/ +type GossiperEndpointDownGetOK struct { + Payload []string +} + +func (o *GossiperEndpointDownGetOK) GetPayload() []string { + return o.Payload +} + +func (o *GossiperEndpointDownGetOK) 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 +} + +// NewGossiperEndpointDownGetDefault creates a GossiperEndpointDownGetDefault with default headers values +func NewGossiperEndpointDownGetDefault(code int) *GossiperEndpointDownGetDefault { + return &GossiperEndpointDownGetDefault{ + _statusCode: code, + } +} + +/*GossiperEndpointDownGetDefault handles this case with default header values. + +internal server error +*/ +type GossiperEndpointDownGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper endpoint down get default response +func (o *GossiperEndpointDownGetDefault) Code() int { + return o._statusCode +} + +func (o *GossiperEndpointDownGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperEndpointDownGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperEndpointDownGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_parameters.go new file mode 100644 index 00000000000..375312dfda4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperEndpointLiveGetParams creates a new GossiperEndpointLiveGetParams object +// with the default values initialized. +func NewGossiperEndpointLiveGetParams() *GossiperEndpointLiveGetParams { + + return &GossiperEndpointLiveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperEndpointLiveGetParamsWithTimeout creates a new GossiperEndpointLiveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperEndpointLiveGetParamsWithTimeout(timeout time.Duration) *GossiperEndpointLiveGetParams { + + return &GossiperEndpointLiveGetParams{ + + timeout: timeout, + } +} + +// NewGossiperEndpointLiveGetParamsWithContext creates a new GossiperEndpointLiveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperEndpointLiveGetParamsWithContext(ctx context.Context) *GossiperEndpointLiveGetParams { + + return &GossiperEndpointLiveGetParams{ + + Context: ctx, + } +} + +// NewGossiperEndpointLiveGetParamsWithHTTPClient creates a new GossiperEndpointLiveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperEndpointLiveGetParamsWithHTTPClient(client *http.Client) *GossiperEndpointLiveGetParams { + + return &GossiperEndpointLiveGetParams{ + HTTPClient: client, + } +} + +/*GossiperEndpointLiveGetParams contains all the parameters to send to the API endpoint +for the gossiper endpoint live get operation typically these are written to a http.Request +*/ +type GossiperEndpointLiveGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) WithTimeout(timeout time.Duration) *GossiperEndpointLiveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) WithContext(ctx context.Context) *GossiperEndpointLiveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) WithHTTPClient(client *http.Client) *GossiperEndpointLiveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper endpoint live get params +func (o *GossiperEndpointLiveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperEndpointLiveGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_responses.go new file mode 100644 index 00000000000..06b0b3bee3b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_endpoint_live_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperEndpointLiveGetReader is a Reader for the GossiperEndpointLiveGet structure. +type GossiperEndpointLiveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperEndpointLiveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperEndpointLiveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperEndpointLiveGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperEndpointLiveGetOK creates a GossiperEndpointLiveGetOK with default headers values +func NewGossiperEndpointLiveGetOK() *GossiperEndpointLiveGetOK { + return &GossiperEndpointLiveGetOK{} +} + +/*GossiperEndpointLiveGetOK handles this case with default header values. + +GossiperEndpointLiveGetOK gossiper endpoint live get o k +*/ +type GossiperEndpointLiveGetOK struct { + Payload []string +} + +func (o *GossiperEndpointLiveGetOK) GetPayload() []string { + return o.Payload +} + +func (o *GossiperEndpointLiveGetOK) 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 +} + +// NewGossiperEndpointLiveGetDefault creates a GossiperEndpointLiveGetDefault with default headers values +func NewGossiperEndpointLiveGetDefault(code int) *GossiperEndpointLiveGetDefault { + return &GossiperEndpointLiveGetDefault{ + _statusCode: code, + } +} + +/*GossiperEndpointLiveGetDefault handles this case with default header values. + +internal server error +*/ +type GossiperEndpointLiveGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper endpoint live get default response +func (o *GossiperEndpointLiveGetDefault) Code() int { + return o._statusCode +} + +func (o *GossiperEndpointLiveGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperEndpointLiveGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperEndpointLiveGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_parameters.go new file mode 100644 index 00000000000..f02f0e76ff5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperGenerationNumberByAddrGetParams creates a new GossiperGenerationNumberByAddrGetParams object +// with the default values initialized. +func NewGossiperGenerationNumberByAddrGetParams() *GossiperGenerationNumberByAddrGetParams { + var () + return &GossiperGenerationNumberByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperGenerationNumberByAddrGetParamsWithTimeout creates a new GossiperGenerationNumberByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperGenerationNumberByAddrGetParamsWithTimeout(timeout time.Duration) *GossiperGenerationNumberByAddrGetParams { + var () + return &GossiperGenerationNumberByAddrGetParams{ + + timeout: timeout, + } +} + +// NewGossiperGenerationNumberByAddrGetParamsWithContext creates a new GossiperGenerationNumberByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperGenerationNumberByAddrGetParamsWithContext(ctx context.Context) *GossiperGenerationNumberByAddrGetParams { + var () + return &GossiperGenerationNumberByAddrGetParams{ + + Context: ctx, + } +} + +// NewGossiperGenerationNumberByAddrGetParamsWithHTTPClient creates a new GossiperGenerationNumberByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperGenerationNumberByAddrGetParamsWithHTTPClient(client *http.Client) *GossiperGenerationNumberByAddrGetParams { + var () + return &GossiperGenerationNumberByAddrGetParams{ + HTTPClient: client, + } +} + +/*GossiperGenerationNumberByAddrGetParams contains all the parameters to send to the API endpoint +for the gossiper generation number by addr get operation typically these are written to a http.Request +*/ +type GossiperGenerationNumberByAddrGetParams struct { + + /*Addr + The endpoint address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) WithTimeout(timeout time.Duration) *GossiperGenerationNumberByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) WithContext(ctx context.Context) *GossiperGenerationNumberByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) WithHTTPClient(client *http.Client) *GossiperGenerationNumberByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) WithAddr(addr string) *GossiperGenerationNumberByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the gossiper generation number by addr get params +func (o *GossiperGenerationNumberByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperGenerationNumberByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_responses.go new file mode 100644 index 00000000000..ceb80fd62b7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_generation_number_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperGenerationNumberByAddrGetReader is a Reader for the GossiperGenerationNumberByAddrGet structure. +type GossiperGenerationNumberByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperGenerationNumberByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperGenerationNumberByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperGenerationNumberByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperGenerationNumberByAddrGetOK creates a GossiperGenerationNumberByAddrGetOK with default headers values +func NewGossiperGenerationNumberByAddrGetOK() *GossiperGenerationNumberByAddrGetOK { + return &GossiperGenerationNumberByAddrGetOK{} +} + +/*GossiperGenerationNumberByAddrGetOK handles this case with default header values. + +GossiperGenerationNumberByAddrGetOK gossiper generation number by addr get o k +*/ +type GossiperGenerationNumberByAddrGetOK struct { + Payload int32 +} + +func (o *GossiperGenerationNumberByAddrGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *GossiperGenerationNumberByAddrGetOK) 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 +} + +// NewGossiperGenerationNumberByAddrGetDefault creates a GossiperGenerationNumberByAddrGetDefault with default headers values +func NewGossiperGenerationNumberByAddrGetDefault(code int) *GossiperGenerationNumberByAddrGetDefault { + return &GossiperGenerationNumberByAddrGetDefault{ + _statusCode: code, + } +} + +/*GossiperGenerationNumberByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type GossiperGenerationNumberByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper generation number by addr get default response +func (o *GossiperGenerationNumberByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *GossiperGenerationNumberByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperGenerationNumberByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperGenerationNumberByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_parameters.go new file mode 100644 index 00000000000..2634d53cb86 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewGossiperHeartBeatVersionByAddrGetParams creates a new GossiperHeartBeatVersionByAddrGetParams object +// with the default values initialized. +func NewGossiperHeartBeatVersionByAddrGetParams() *GossiperHeartBeatVersionByAddrGetParams { + var () + return &GossiperHeartBeatVersionByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewGossiperHeartBeatVersionByAddrGetParamsWithTimeout creates a new GossiperHeartBeatVersionByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewGossiperHeartBeatVersionByAddrGetParamsWithTimeout(timeout time.Duration) *GossiperHeartBeatVersionByAddrGetParams { + var () + return &GossiperHeartBeatVersionByAddrGetParams{ + + timeout: timeout, + } +} + +// NewGossiperHeartBeatVersionByAddrGetParamsWithContext creates a new GossiperHeartBeatVersionByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewGossiperHeartBeatVersionByAddrGetParamsWithContext(ctx context.Context) *GossiperHeartBeatVersionByAddrGetParams { + var () + return &GossiperHeartBeatVersionByAddrGetParams{ + + Context: ctx, + } +} + +// NewGossiperHeartBeatVersionByAddrGetParamsWithHTTPClient creates a new GossiperHeartBeatVersionByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewGossiperHeartBeatVersionByAddrGetParamsWithHTTPClient(client *http.Client) *GossiperHeartBeatVersionByAddrGetParams { + var () + return &GossiperHeartBeatVersionByAddrGetParams{ + HTTPClient: client, + } +} + +/*GossiperHeartBeatVersionByAddrGetParams contains all the parameters to send to the API endpoint +for the gossiper heart beat version by addr get operation typically these are written to a http.Request +*/ +type GossiperHeartBeatVersionByAddrGetParams struct { + + /*Addr + The endpoint address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) WithTimeout(timeout time.Duration) *GossiperHeartBeatVersionByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) WithContext(ctx context.Context) *GossiperHeartBeatVersionByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) WithHTTPClient(client *http.Client) *GossiperHeartBeatVersionByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) WithAddr(addr string) *GossiperHeartBeatVersionByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the gossiper heart beat version by addr get params +func (o *GossiperHeartBeatVersionByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *GossiperHeartBeatVersionByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_responses.go new file mode 100644 index 00000000000..7472b275352 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/gossiper_heart_beat_version_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// GossiperHeartBeatVersionByAddrGetReader is a Reader for the GossiperHeartBeatVersionByAddrGet structure. +type GossiperHeartBeatVersionByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GossiperHeartBeatVersionByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewGossiperHeartBeatVersionByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGossiperHeartBeatVersionByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGossiperHeartBeatVersionByAddrGetOK creates a GossiperHeartBeatVersionByAddrGetOK with default headers values +func NewGossiperHeartBeatVersionByAddrGetOK() *GossiperHeartBeatVersionByAddrGetOK { + return &GossiperHeartBeatVersionByAddrGetOK{} +} + +/*GossiperHeartBeatVersionByAddrGetOK handles this case with default header values. + +GossiperHeartBeatVersionByAddrGetOK gossiper heart beat version by addr get o k +*/ +type GossiperHeartBeatVersionByAddrGetOK struct { + Payload int32 +} + +func (o *GossiperHeartBeatVersionByAddrGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *GossiperHeartBeatVersionByAddrGetOK) 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 +} + +// NewGossiperHeartBeatVersionByAddrGetDefault creates a GossiperHeartBeatVersionByAddrGetDefault with default headers values +func NewGossiperHeartBeatVersionByAddrGetDefault(code int) *GossiperHeartBeatVersionByAddrGetDefault { + return &GossiperHeartBeatVersionByAddrGetDefault{ + _statusCode: code, + } +} + +/*GossiperHeartBeatVersionByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type GossiperHeartBeatVersionByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the gossiper heart beat version by addr get default response +func (o *GossiperHeartBeatVersionByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *GossiperHeartBeatVersionByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *GossiperHeartBeatVersionByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *GossiperHeartBeatVersionByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_parameters.go new file mode 100644 index 00000000000..e9ba067b5f0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffHintsDeleteParams creates a new HintedHandoffHintsDeleteParams object +// with the default values initialized. +func NewHintedHandoffHintsDeleteParams() *HintedHandoffHintsDeleteParams { + var () + return &HintedHandoffHintsDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffHintsDeleteParamsWithTimeout creates a new HintedHandoffHintsDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffHintsDeleteParamsWithTimeout(timeout time.Duration) *HintedHandoffHintsDeleteParams { + var () + return &HintedHandoffHintsDeleteParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffHintsDeleteParamsWithContext creates a new HintedHandoffHintsDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffHintsDeleteParamsWithContext(ctx context.Context) *HintedHandoffHintsDeleteParams { + var () + return &HintedHandoffHintsDeleteParams{ + + Context: ctx, + } +} + +// NewHintedHandoffHintsDeleteParamsWithHTTPClient creates a new HintedHandoffHintsDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffHintsDeleteParamsWithHTTPClient(client *http.Client) *HintedHandoffHintsDeleteParams { + var () + return &HintedHandoffHintsDeleteParams{ + HTTPClient: client, + } +} + +/*HintedHandoffHintsDeleteParams contains all the parameters to send to the API endpoint +for the hinted handoff hints delete operation typically these are written to a http.Request +*/ +type HintedHandoffHintsDeleteParams struct { + + /*Host + Optional String rep. of endpoint address to delete hints for + + */ + Host *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) WithTimeout(timeout time.Duration) *HintedHandoffHintsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) WithContext(ctx context.Context) *HintedHandoffHintsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) WithHTTPClient(client *http.Client) *HintedHandoffHintsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHost adds the host to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) WithHost(host *string) *HintedHandoffHintsDeleteParams { + o.SetHost(host) + return o +} + +// SetHost adds the host to the hinted handoff hints delete params +func (o *HintedHandoffHintsDeleteParams) SetHost(host *string) { + o.Host = host +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffHintsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Host != nil { + + // query param host + var qrHost string + if o.Host != nil { + qrHost = *o.Host + } + qHost := qrHost + if qHost != "" { + if err := r.SetQueryParam("host", qHost); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_responses.go new file mode 100644 index 00000000000..982b0e33cd3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffHintsDeleteReader is a Reader for the HintedHandoffHintsDelete structure. +type HintedHandoffHintsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffHintsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffHintsDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffHintsDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffHintsDeleteOK creates a HintedHandoffHintsDeleteOK with default headers values +func NewHintedHandoffHintsDeleteOK() *HintedHandoffHintsDeleteOK { + return &HintedHandoffHintsDeleteOK{} +} + +/*HintedHandoffHintsDeleteOK handles this case with default header values. + +HintedHandoffHintsDeleteOK hinted handoff hints delete o k +*/ +type HintedHandoffHintsDeleteOK struct { +} + +func (o *HintedHandoffHintsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewHintedHandoffHintsDeleteDefault creates a HintedHandoffHintsDeleteDefault with default headers values +func NewHintedHandoffHintsDeleteDefault(code int) *HintedHandoffHintsDeleteDefault { + return &HintedHandoffHintsDeleteDefault{ + _statusCode: code, + } +} + +/*HintedHandoffHintsDeleteDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffHintsDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff hints delete default response +func (o *HintedHandoffHintsDeleteDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffHintsDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffHintsDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffHintsDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_parameters.go new file mode 100644 index 00000000000..c990b81c69e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffHintsGetParams creates a new HintedHandoffHintsGetParams object +// with the default values initialized. +func NewHintedHandoffHintsGetParams() *HintedHandoffHintsGetParams { + + return &HintedHandoffHintsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffHintsGetParamsWithTimeout creates a new HintedHandoffHintsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffHintsGetParamsWithTimeout(timeout time.Duration) *HintedHandoffHintsGetParams { + + return &HintedHandoffHintsGetParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffHintsGetParamsWithContext creates a new HintedHandoffHintsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffHintsGetParamsWithContext(ctx context.Context) *HintedHandoffHintsGetParams { + + return &HintedHandoffHintsGetParams{ + + Context: ctx, + } +} + +// NewHintedHandoffHintsGetParamsWithHTTPClient creates a new HintedHandoffHintsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffHintsGetParamsWithHTTPClient(client *http.Client) *HintedHandoffHintsGetParams { + + return &HintedHandoffHintsGetParams{ + HTTPClient: client, + } +} + +/*HintedHandoffHintsGetParams contains all the parameters to send to the API endpoint +for the hinted handoff hints get operation typically these are written to a http.Request +*/ +type HintedHandoffHintsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) WithTimeout(timeout time.Duration) *HintedHandoffHintsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) WithContext(ctx context.Context) *HintedHandoffHintsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) WithHTTPClient(client *http.Client) *HintedHandoffHintsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff hints get params +func (o *HintedHandoffHintsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffHintsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_responses.go new file mode 100644 index 00000000000..fd726538223 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_hints_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffHintsGetReader is a Reader for the HintedHandoffHintsGet structure. +type HintedHandoffHintsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffHintsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffHintsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffHintsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffHintsGetOK creates a HintedHandoffHintsGetOK with default headers values +func NewHintedHandoffHintsGetOK() *HintedHandoffHintsGetOK { + return &HintedHandoffHintsGetOK{} +} + +/*HintedHandoffHintsGetOK handles this case with default header values. + +HintedHandoffHintsGetOK hinted handoff hints get o k +*/ +type HintedHandoffHintsGetOK struct { + Payload []string +} + +func (o *HintedHandoffHintsGetOK) GetPayload() []string { + return o.Payload +} + +func (o *HintedHandoffHintsGetOK) 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 +} + +// NewHintedHandoffHintsGetDefault creates a HintedHandoffHintsGetDefault with default headers values +func NewHintedHandoffHintsGetDefault(code int) *HintedHandoffHintsGetDefault { + return &HintedHandoffHintsGetDefault{ + _statusCode: code, + } +} + +/*HintedHandoffHintsGetDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffHintsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff hints get default response +func (o *HintedHandoffHintsGetDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffHintsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffHintsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffHintsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_parameters.go new file mode 100644 index 00000000000..c64dfc2265e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffMetricsCreateHintByAddrGetParams creates a new HintedHandoffMetricsCreateHintByAddrGetParams object +// with the default values initialized. +func NewHintedHandoffMetricsCreateHintByAddrGetParams() *HintedHandoffMetricsCreateHintByAddrGetParams { + var () + return &HintedHandoffMetricsCreateHintByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffMetricsCreateHintByAddrGetParamsWithTimeout creates a new HintedHandoffMetricsCreateHintByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffMetricsCreateHintByAddrGetParamsWithTimeout(timeout time.Duration) *HintedHandoffMetricsCreateHintByAddrGetParams { + var () + return &HintedHandoffMetricsCreateHintByAddrGetParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffMetricsCreateHintByAddrGetParamsWithContext creates a new HintedHandoffMetricsCreateHintByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffMetricsCreateHintByAddrGetParamsWithContext(ctx context.Context) *HintedHandoffMetricsCreateHintByAddrGetParams { + var () + return &HintedHandoffMetricsCreateHintByAddrGetParams{ + + Context: ctx, + } +} + +// NewHintedHandoffMetricsCreateHintByAddrGetParamsWithHTTPClient creates a new HintedHandoffMetricsCreateHintByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffMetricsCreateHintByAddrGetParamsWithHTTPClient(client *http.Client) *HintedHandoffMetricsCreateHintByAddrGetParams { + var () + return &HintedHandoffMetricsCreateHintByAddrGetParams{ + HTTPClient: client, + } +} + +/*HintedHandoffMetricsCreateHintByAddrGetParams contains all the parameters to send to the API endpoint +for the hinted handoff metrics create hint by addr get operation typically these are written to a http.Request +*/ +type HintedHandoffMetricsCreateHintByAddrGetParams struct { + + /*Addr + The peer address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) WithTimeout(timeout time.Duration) *HintedHandoffMetricsCreateHintByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) WithContext(ctx context.Context) *HintedHandoffMetricsCreateHintByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) WithHTTPClient(client *http.Client) *HintedHandoffMetricsCreateHintByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) WithAddr(addr string) *HintedHandoffMetricsCreateHintByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the hinted handoff metrics create hint by addr get params +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffMetricsCreateHintByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_responses.go new file mode 100644 index 00000000000..73dd9c51484 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_create_hint_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffMetricsCreateHintByAddrGetReader is a Reader for the HintedHandoffMetricsCreateHintByAddrGet structure. +type HintedHandoffMetricsCreateHintByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffMetricsCreateHintByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffMetricsCreateHintByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffMetricsCreateHintByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffMetricsCreateHintByAddrGetOK creates a HintedHandoffMetricsCreateHintByAddrGetOK with default headers values +func NewHintedHandoffMetricsCreateHintByAddrGetOK() *HintedHandoffMetricsCreateHintByAddrGetOK { + return &HintedHandoffMetricsCreateHintByAddrGetOK{} +} + +/*HintedHandoffMetricsCreateHintByAddrGetOK handles this case with default header values. + +HintedHandoffMetricsCreateHintByAddrGetOK hinted handoff metrics create hint by addr get o k +*/ +type HintedHandoffMetricsCreateHintByAddrGetOK struct { + Payload int32 +} + +func (o *HintedHandoffMetricsCreateHintByAddrGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *HintedHandoffMetricsCreateHintByAddrGetOK) 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 +} + +// NewHintedHandoffMetricsCreateHintByAddrGetDefault creates a HintedHandoffMetricsCreateHintByAddrGetDefault with default headers values +func NewHintedHandoffMetricsCreateHintByAddrGetDefault(code int) *HintedHandoffMetricsCreateHintByAddrGetDefault { + return &HintedHandoffMetricsCreateHintByAddrGetDefault{ + _statusCode: code, + } +} + +/*HintedHandoffMetricsCreateHintByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffMetricsCreateHintByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff metrics create hint by addr get default response +func (o *HintedHandoffMetricsCreateHintByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffMetricsCreateHintByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffMetricsCreateHintByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffMetricsCreateHintByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_parameters.go new file mode 100644 index 00000000000..79c7c3a5f70 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetParams creates a new HintedHandoffMetricsNotStoredHintsByAddrGetParams object +// with the default values initialized. +func NewHintedHandoffMetricsNotStoredHintsByAddrGetParams() *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + var () + return &HintedHandoffMetricsNotStoredHintsByAddrGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithTimeout creates a new HintedHandoffMetricsNotStoredHintsByAddrGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithTimeout(timeout time.Duration) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + var () + return &HintedHandoffMetricsNotStoredHintsByAddrGetParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithContext creates a new HintedHandoffMetricsNotStoredHintsByAddrGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithContext(ctx context.Context) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + var () + return &HintedHandoffMetricsNotStoredHintsByAddrGetParams{ + + Context: ctx, + } +} + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithHTTPClient creates a new HintedHandoffMetricsNotStoredHintsByAddrGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffMetricsNotStoredHintsByAddrGetParamsWithHTTPClient(client *http.Client) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + var () + return &HintedHandoffMetricsNotStoredHintsByAddrGetParams{ + HTTPClient: client, + } +} + +/*HintedHandoffMetricsNotStoredHintsByAddrGetParams contains all the parameters to send to the API endpoint +for the hinted handoff metrics not stored hints by addr get operation typically these are written to a http.Request +*/ +type HintedHandoffMetricsNotStoredHintsByAddrGetParams struct { + + /*Addr + The peer address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) WithTimeout(timeout time.Duration) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) WithContext(ctx context.Context) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) WithHTTPClient(client *http.Client) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) WithAddr(addr string) *HintedHandoffMetricsNotStoredHintsByAddrGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the hinted handoff metrics not stored hints by addr get params +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param addr + if err := r.SetPathParam("addr", o.Addr); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_responses.go new file mode 100644 index 00000000000..b3e19034b60 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_metrics_not_stored_hints_by_addr_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffMetricsNotStoredHintsByAddrGetReader is a Reader for the HintedHandoffMetricsNotStoredHintsByAddrGet structure. +type HintedHandoffMetricsNotStoredHintsByAddrGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffMetricsNotStoredHintsByAddrGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffMetricsNotStoredHintsByAddrGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetOK creates a HintedHandoffMetricsNotStoredHintsByAddrGetOK with default headers values +func NewHintedHandoffMetricsNotStoredHintsByAddrGetOK() *HintedHandoffMetricsNotStoredHintsByAddrGetOK { + return &HintedHandoffMetricsNotStoredHintsByAddrGetOK{} +} + +/*HintedHandoffMetricsNotStoredHintsByAddrGetOK handles this case with default header values. + +HintedHandoffMetricsNotStoredHintsByAddrGetOK hinted handoff metrics not stored hints by addr get o k +*/ +type HintedHandoffMetricsNotStoredHintsByAddrGetOK struct { + Payload int32 +} + +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetOK) 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 +} + +// NewHintedHandoffMetricsNotStoredHintsByAddrGetDefault creates a HintedHandoffMetricsNotStoredHintsByAddrGetDefault with default headers values +func NewHintedHandoffMetricsNotStoredHintsByAddrGetDefault(code int) *HintedHandoffMetricsNotStoredHintsByAddrGetDefault { + return &HintedHandoffMetricsNotStoredHintsByAddrGetDefault{ + _statusCode: code, + } +} + +/*HintedHandoffMetricsNotStoredHintsByAddrGetDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffMetricsNotStoredHintsByAddrGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff metrics not stored hints by addr get default response +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffMetricsNotStoredHintsByAddrGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_parameters.go new file mode 100644 index 00000000000..ae07b4d14fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffPausePostParams creates a new HintedHandoffPausePostParams object +// with the default values initialized. +func NewHintedHandoffPausePostParams() *HintedHandoffPausePostParams { + var () + return &HintedHandoffPausePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffPausePostParamsWithTimeout creates a new HintedHandoffPausePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffPausePostParamsWithTimeout(timeout time.Duration) *HintedHandoffPausePostParams { + var () + return &HintedHandoffPausePostParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffPausePostParamsWithContext creates a new HintedHandoffPausePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffPausePostParamsWithContext(ctx context.Context) *HintedHandoffPausePostParams { + var () + return &HintedHandoffPausePostParams{ + + Context: ctx, + } +} + +// NewHintedHandoffPausePostParamsWithHTTPClient creates a new HintedHandoffPausePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffPausePostParamsWithHTTPClient(client *http.Client) *HintedHandoffPausePostParams { + var () + return &HintedHandoffPausePostParams{ + HTTPClient: client, + } +} + +/*HintedHandoffPausePostParams contains all the parameters to send to the API endpoint +for the hinted handoff pause post operation typically these are written to a http.Request +*/ +type HintedHandoffPausePostParams struct { + + /*Pause + pause status + + */ + Pause bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) WithTimeout(timeout time.Duration) *HintedHandoffPausePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) WithContext(ctx context.Context) *HintedHandoffPausePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) WithHTTPClient(client *http.Client) *HintedHandoffPausePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPause adds the pause to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) WithPause(pause bool) *HintedHandoffPausePostParams { + o.SetPause(pause) + return o +} + +// SetPause adds the pause to the hinted handoff pause post params +func (o *HintedHandoffPausePostParams) SetPause(pause bool) { + o.Pause = pause +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffPausePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param pause + qrPause := o.Pause + qPause := swag.FormatBool(qrPause) + if qPause != "" { + if err := r.SetQueryParam("pause", qPause); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_responses.go new file mode 100644 index 00000000000..dfa1e6f802d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_pause_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffPausePostReader is a Reader for the HintedHandoffPausePost structure. +type HintedHandoffPausePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffPausePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffPausePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffPausePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffPausePostOK creates a HintedHandoffPausePostOK with default headers values +func NewHintedHandoffPausePostOK() *HintedHandoffPausePostOK { + return &HintedHandoffPausePostOK{} +} + +/*HintedHandoffPausePostOK handles this case with default header values. + +HintedHandoffPausePostOK hinted handoff pause post o k +*/ +type HintedHandoffPausePostOK struct { +} + +func (o *HintedHandoffPausePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewHintedHandoffPausePostDefault creates a HintedHandoffPausePostDefault with default headers values +func NewHintedHandoffPausePostDefault(code int) *HintedHandoffPausePostDefault { + return &HintedHandoffPausePostDefault{ + _statusCode: code, + } +} + +/*HintedHandoffPausePostDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffPausePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff pause post default response +func (o *HintedHandoffPausePostDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffPausePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffPausePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffPausePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_parameters.go new file mode 100644 index 00000000000..c1b43e73979 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewHintedHandoffSchedulePostParams creates a new HintedHandoffSchedulePostParams object +// with the default values initialized. +func NewHintedHandoffSchedulePostParams() *HintedHandoffSchedulePostParams { + var () + return &HintedHandoffSchedulePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewHintedHandoffSchedulePostParamsWithTimeout creates a new HintedHandoffSchedulePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewHintedHandoffSchedulePostParamsWithTimeout(timeout time.Duration) *HintedHandoffSchedulePostParams { + var () + return &HintedHandoffSchedulePostParams{ + + timeout: timeout, + } +} + +// NewHintedHandoffSchedulePostParamsWithContext creates a new HintedHandoffSchedulePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewHintedHandoffSchedulePostParamsWithContext(ctx context.Context) *HintedHandoffSchedulePostParams { + var () + return &HintedHandoffSchedulePostParams{ + + Context: ctx, + } +} + +// NewHintedHandoffSchedulePostParamsWithHTTPClient creates a new HintedHandoffSchedulePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewHintedHandoffSchedulePostParamsWithHTTPClient(client *http.Client) *HintedHandoffSchedulePostParams { + var () + return &HintedHandoffSchedulePostParams{ + HTTPClient: client, + } +} + +/*HintedHandoffSchedulePostParams contains all the parameters to send to the API endpoint +for the hinted handoff schedule post operation typically these are written to a http.Request +*/ +type HintedHandoffSchedulePostParams struct { + + /*Host + String rep. of endpoint address + + */ + Host string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) WithTimeout(timeout time.Duration) *HintedHandoffSchedulePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) WithContext(ctx context.Context) *HintedHandoffSchedulePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) WithHTTPClient(client *http.Client) *HintedHandoffSchedulePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHost adds the host to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) WithHost(host string) *HintedHandoffSchedulePostParams { + o.SetHost(host) + return o +} + +// SetHost adds the host to the hinted handoff schedule post params +func (o *HintedHandoffSchedulePostParams) SetHost(host string) { + o.Host = host +} + +// WriteToRequest writes these params to a swagger request +func (o *HintedHandoffSchedulePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param host + qrHost := o.Host + qHost := qrHost + if qHost != "" { + if err := r.SetQueryParam("host", qHost); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_responses.go new file mode 100644 index 00000000000..d4344f7d437 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/hinted_handoff_schedule_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// HintedHandoffSchedulePostReader is a Reader for the HintedHandoffSchedulePost structure. +type HintedHandoffSchedulePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *HintedHandoffSchedulePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewHintedHandoffSchedulePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewHintedHandoffSchedulePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewHintedHandoffSchedulePostOK creates a HintedHandoffSchedulePostOK with default headers values +func NewHintedHandoffSchedulePostOK() *HintedHandoffSchedulePostOK { + return &HintedHandoffSchedulePostOK{} +} + +/*HintedHandoffSchedulePostOK handles this case with default header values. + +HintedHandoffSchedulePostOK hinted handoff schedule post o k +*/ +type HintedHandoffSchedulePostOK struct { +} + +func (o *HintedHandoffSchedulePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewHintedHandoffSchedulePostDefault creates a HintedHandoffSchedulePostDefault with default headers values +func NewHintedHandoffSchedulePostDefault(code int) *HintedHandoffSchedulePostDefault { + return &HintedHandoffSchedulePostDefault{ + _statusCode: code, + } +} + +/*HintedHandoffSchedulePostDefault handles this case with default header values. + +internal server error +*/ +type HintedHandoffSchedulePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the hinted handoff schedule post default response +func (o *HintedHandoffSchedulePostDefault) Code() int { + return o._statusCode +} + +func (o *HintedHandoffSchedulePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *HintedHandoffSchedulePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *HintedHandoffSchedulePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_parameters.go new file mode 100644 index 00000000000..a6a7f79e335 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewLsaCompactPostParams creates a new LsaCompactPostParams object +// with the default values initialized. +func NewLsaCompactPostParams() *LsaCompactPostParams { + + return &LsaCompactPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewLsaCompactPostParamsWithTimeout creates a new LsaCompactPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewLsaCompactPostParamsWithTimeout(timeout time.Duration) *LsaCompactPostParams { + + return &LsaCompactPostParams{ + + timeout: timeout, + } +} + +// NewLsaCompactPostParamsWithContext creates a new LsaCompactPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewLsaCompactPostParamsWithContext(ctx context.Context) *LsaCompactPostParams { + + return &LsaCompactPostParams{ + + Context: ctx, + } +} + +// NewLsaCompactPostParamsWithHTTPClient creates a new LsaCompactPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewLsaCompactPostParamsWithHTTPClient(client *http.Client) *LsaCompactPostParams { + + return &LsaCompactPostParams{ + HTTPClient: client, + } +} + +/*LsaCompactPostParams contains all the parameters to send to the API endpoint +for the lsa compact post operation typically these are written to a http.Request +*/ +type LsaCompactPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the lsa compact post params +func (o *LsaCompactPostParams) WithTimeout(timeout time.Duration) *LsaCompactPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lsa compact post params +func (o *LsaCompactPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lsa compact post params +func (o *LsaCompactPostParams) WithContext(ctx context.Context) *LsaCompactPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lsa compact post params +func (o *LsaCompactPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lsa compact post params +func (o *LsaCompactPostParams) WithHTTPClient(client *http.Client) *LsaCompactPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lsa compact post params +func (o *LsaCompactPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *LsaCompactPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_responses.go new file mode 100644 index 00000000000..9265bd49f16 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/lsa_compact_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// LsaCompactPostReader is a Reader for the LsaCompactPost structure. +type LsaCompactPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LsaCompactPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLsaCompactPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewLsaCompactPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewLsaCompactPostOK creates a LsaCompactPostOK with default headers values +func NewLsaCompactPostOK() *LsaCompactPostOK { + return &LsaCompactPostOK{} +} + +/*LsaCompactPostOK handles this case with default header values. + +LsaCompactPostOK lsa compact post o k +*/ +type LsaCompactPostOK struct { +} + +func (o *LsaCompactPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewLsaCompactPostDefault creates a LsaCompactPostDefault with default headers values +func NewLsaCompactPostDefault(code int) *LsaCompactPostDefault { + return &LsaCompactPostDefault{ + _statusCode: code, + } +} + +/*LsaCompactPostDefault handles this case with default header values. + +internal server error +*/ +type LsaCompactPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the lsa compact post default response +func (o *LsaCompactPostDefault) Code() int { + return o._statusCode +} + +func (o *LsaCompactPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *LsaCompactPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *LsaCompactPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_parameters.go new file mode 100644 index 00000000000..b2ebb2076f1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesDroppedByVerGetParams creates a new MessagingServiceMessagesDroppedByVerGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesDroppedByVerGetParams() *MessagingServiceMessagesDroppedByVerGetParams { + + return &MessagingServiceMessagesDroppedByVerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesDroppedByVerGetParamsWithTimeout creates a new MessagingServiceMessagesDroppedByVerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesDroppedByVerGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesDroppedByVerGetParams { + + return &MessagingServiceMessagesDroppedByVerGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesDroppedByVerGetParamsWithContext creates a new MessagingServiceMessagesDroppedByVerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesDroppedByVerGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesDroppedByVerGetParams { + + return &MessagingServiceMessagesDroppedByVerGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesDroppedByVerGetParamsWithHTTPClient creates a new MessagingServiceMessagesDroppedByVerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesDroppedByVerGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesDroppedByVerGetParams { + + return &MessagingServiceMessagesDroppedByVerGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesDroppedByVerGetParams contains all the parameters to send to the API endpoint +for the messaging service messages dropped by ver get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesDroppedByVerGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesDroppedByVerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesDroppedByVerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesDroppedByVerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages dropped by ver get params +func (o *MessagingServiceMessagesDroppedByVerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesDroppedByVerGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_responses.go new file mode 100644 index 00000000000..0b9d457a8ef --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_by_ver_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesDroppedByVerGetReader is a Reader for the MessagingServiceMessagesDroppedByVerGet structure. +type MessagingServiceMessagesDroppedByVerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesDroppedByVerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesDroppedByVerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesDroppedByVerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesDroppedByVerGetOK creates a MessagingServiceMessagesDroppedByVerGetOK with default headers values +func NewMessagingServiceMessagesDroppedByVerGetOK() *MessagingServiceMessagesDroppedByVerGetOK { + return &MessagingServiceMessagesDroppedByVerGetOK{} +} + +/*MessagingServiceMessagesDroppedByVerGetOK handles this case with default header values. + +MessagingServiceMessagesDroppedByVerGetOK messaging service messages dropped by ver get o k +*/ +type MessagingServiceMessagesDroppedByVerGetOK struct { + Payload []*models.VerbCounter +} + +func (o *MessagingServiceMessagesDroppedByVerGetOK) GetPayload() []*models.VerbCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesDroppedByVerGetOK) 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 +} + +// NewMessagingServiceMessagesDroppedByVerGetDefault creates a MessagingServiceMessagesDroppedByVerGetDefault with default headers values +func NewMessagingServiceMessagesDroppedByVerGetDefault(code int) *MessagingServiceMessagesDroppedByVerGetDefault { + return &MessagingServiceMessagesDroppedByVerGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesDroppedByVerGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesDroppedByVerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages dropped by ver get default response +func (o *MessagingServiceMessagesDroppedByVerGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesDroppedByVerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesDroppedByVerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesDroppedByVerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_parameters.go new file mode 100644 index 00000000000..a18b4f749fe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesDroppedGetParams creates a new MessagingServiceMessagesDroppedGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesDroppedGetParams() *MessagingServiceMessagesDroppedGetParams { + + return &MessagingServiceMessagesDroppedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesDroppedGetParamsWithTimeout creates a new MessagingServiceMessagesDroppedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesDroppedGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesDroppedGetParams { + + return &MessagingServiceMessagesDroppedGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesDroppedGetParamsWithContext creates a new MessagingServiceMessagesDroppedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesDroppedGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesDroppedGetParams { + + return &MessagingServiceMessagesDroppedGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesDroppedGetParamsWithHTTPClient creates a new MessagingServiceMessagesDroppedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesDroppedGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesDroppedGetParams { + + return &MessagingServiceMessagesDroppedGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesDroppedGetParams contains all the parameters to send to the API endpoint +for the messaging service messages dropped get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesDroppedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesDroppedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesDroppedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesDroppedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages dropped get params +func (o *MessagingServiceMessagesDroppedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesDroppedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_responses.go new file mode 100644 index 00000000000..312d63e5b61 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_dropped_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesDroppedGetReader is a Reader for the MessagingServiceMessagesDroppedGet structure. +type MessagingServiceMessagesDroppedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesDroppedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesDroppedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesDroppedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesDroppedGetOK creates a MessagingServiceMessagesDroppedGetOK with default headers values +func NewMessagingServiceMessagesDroppedGetOK() *MessagingServiceMessagesDroppedGetOK { + return &MessagingServiceMessagesDroppedGetOK{} +} + +/*MessagingServiceMessagesDroppedGetOK handles this case with default header values. + +MessagingServiceMessagesDroppedGetOK messaging service messages dropped get o k +*/ +type MessagingServiceMessagesDroppedGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesDroppedGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesDroppedGetOK) 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 +} + +// NewMessagingServiceMessagesDroppedGetDefault creates a MessagingServiceMessagesDroppedGetDefault with default headers values +func NewMessagingServiceMessagesDroppedGetDefault(code int) *MessagingServiceMessagesDroppedGetDefault { + return &MessagingServiceMessagesDroppedGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesDroppedGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesDroppedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages dropped get default response +func (o *MessagingServiceMessagesDroppedGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesDroppedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesDroppedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesDroppedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_parameters.go new file mode 100644 index 00000000000..42769ca4b3e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesExceptionGetParams creates a new MessagingServiceMessagesExceptionGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesExceptionGetParams() *MessagingServiceMessagesExceptionGetParams { + + return &MessagingServiceMessagesExceptionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesExceptionGetParamsWithTimeout creates a new MessagingServiceMessagesExceptionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesExceptionGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesExceptionGetParams { + + return &MessagingServiceMessagesExceptionGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesExceptionGetParamsWithContext creates a new MessagingServiceMessagesExceptionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesExceptionGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesExceptionGetParams { + + return &MessagingServiceMessagesExceptionGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesExceptionGetParamsWithHTTPClient creates a new MessagingServiceMessagesExceptionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesExceptionGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesExceptionGetParams { + + return &MessagingServiceMessagesExceptionGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesExceptionGetParams contains all the parameters to send to the API endpoint +for the messaging service messages exception get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesExceptionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesExceptionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesExceptionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesExceptionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages exception get params +func (o *MessagingServiceMessagesExceptionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesExceptionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_responses.go new file mode 100644 index 00000000000..9f9fff10b4c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_exception_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesExceptionGetReader is a Reader for the MessagingServiceMessagesExceptionGet structure. +type MessagingServiceMessagesExceptionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesExceptionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesExceptionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesExceptionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesExceptionGetOK creates a MessagingServiceMessagesExceptionGetOK with default headers values +func NewMessagingServiceMessagesExceptionGetOK() *MessagingServiceMessagesExceptionGetOK { + return &MessagingServiceMessagesExceptionGetOK{} +} + +/*MessagingServiceMessagesExceptionGetOK handles this case with default header values. + +MessagingServiceMessagesExceptionGetOK messaging service messages exception get o k +*/ +type MessagingServiceMessagesExceptionGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesExceptionGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesExceptionGetOK) 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 +} + +// NewMessagingServiceMessagesExceptionGetDefault creates a MessagingServiceMessagesExceptionGetDefault with default headers values +func NewMessagingServiceMessagesExceptionGetDefault(code int) *MessagingServiceMessagesExceptionGetDefault { + return &MessagingServiceMessagesExceptionGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesExceptionGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesExceptionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages exception get default response +func (o *MessagingServiceMessagesExceptionGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesExceptionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesExceptionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesExceptionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_parameters.go new file mode 100644 index 00000000000..c18564a3c7f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesPendingGetParams creates a new MessagingServiceMessagesPendingGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesPendingGetParams() *MessagingServiceMessagesPendingGetParams { + + return &MessagingServiceMessagesPendingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesPendingGetParamsWithTimeout creates a new MessagingServiceMessagesPendingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesPendingGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesPendingGetParams { + + return &MessagingServiceMessagesPendingGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesPendingGetParamsWithContext creates a new MessagingServiceMessagesPendingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesPendingGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesPendingGetParams { + + return &MessagingServiceMessagesPendingGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesPendingGetParamsWithHTTPClient creates a new MessagingServiceMessagesPendingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesPendingGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesPendingGetParams { + + return &MessagingServiceMessagesPendingGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesPendingGetParams contains all the parameters to send to the API endpoint +for the messaging service messages pending get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesPendingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesPendingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesPendingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesPendingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages pending get params +func (o *MessagingServiceMessagesPendingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesPendingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_responses.go new file mode 100644 index 00000000000..5d1db662b16 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_pending_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesPendingGetReader is a Reader for the MessagingServiceMessagesPendingGet structure. +type MessagingServiceMessagesPendingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesPendingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesPendingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesPendingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesPendingGetOK creates a MessagingServiceMessagesPendingGetOK with default headers values +func NewMessagingServiceMessagesPendingGetOK() *MessagingServiceMessagesPendingGetOK { + return &MessagingServiceMessagesPendingGetOK{} +} + +/*MessagingServiceMessagesPendingGetOK handles this case with default header values. + +MessagingServiceMessagesPendingGetOK messaging service messages pending get o k +*/ +type MessagingServiceMessagesPendingGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesPendingGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesPendingGetOK) 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 +} + +// NewMessagingServiceMessagesPendingGetDefault creates a MessagingServiceMessagesPendingGetDefault with default headers values +func NewMessagingServiceMessagesPendingGetDefault(code int) *MessagingServiceMessagesPendingGetDefault { + return &MessagingServiceMessagesPendingGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesPendingGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesPendingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages pending get default response +func (o *MessagingServiceMessagesPendingGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesPendingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesPendingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesPendingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_parameters.go new file mode 100644 index 00000000000..f0ae2d2879a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesRepliedGetParams creates a new MessagingServiceMessagesRepliedGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesRepliedGetParams() *MessagingServiceMessagesRepliedGetParams { + + return &MessagingServiceMessagesRepliedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesRepliedGetParamsWithTimeout creates a new MessagingServiceMessagesRepliedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesRepliedGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesRepliedGetParams { + + return &MessagingServiceMessagesRepliedGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesRepliedGetParamsWithContext creates a new MessagingServiceMessagesRepliedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesRepliedGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesRepliedGetParams { + + return &MessagingServiceMessagesRepliedGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesRepliedGetParamsWithHTTPClient creates a new MessagingServiceMessagesRepliedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesRepliedGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesRepliedGetParams { + + return &MessagingServiceMessagesRepliedGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesRepliedGetParams contains all the parameters to send to the API endpoint +for the messaging service messages replied get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesRepliedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesRepliedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesRepliedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesRepliedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages replied get params +func (o *MessagingServiceMessagesRepliedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesRepliedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_responses.go new file mode 100644 index 00000000000..64a2c0f2347 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_replied_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesRepliedGetReader is a Reader for the MessagingServiceMessagesRepliedGet structure. +type MessagingServiceMessagesRepliedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesRepliedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesRepliedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesRepliedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesRepliedGetOK creates a MessagingServiceMessagesRepliedGetOK with default headers values +func NewMessagingServiceMessagesRepliedGetOK() *MessagingServiceMessagesRepliedGetOK { + return &MessagingServiceMessagesRepliedGetOK{} +} + +/*MessagingServiceMessagesRepliedGetOK handles this case with default header values. + +MessagingServiceMessagesRepliedGetOK messaging service messages replied get o k +*/ +type MessagingServiceMessagesRepliedGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesRepliedGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesRepliedGetOK) 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 +} + +// NewMessagingServiceMessagesRepliedGetDefault creates a MessagingServiceMessagesRepliedGetDefault with default headers values +func NewMessagingServiceMessagesRepliedGetDefault(code int) *MessagingServiceMessagesRepliedGetDefault { + return &MessagingServiceMessagesRepliedGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesRepliedGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesRepliedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages replied get default response +func (o *MessagingServiceMessagesRepliedGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesRepliedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesRepliedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesRepliedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_parameters.go new file mode 100644 index 00000000000..64108025d5c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesRespondCompletedGetParams creates a new MessagingServiceMessagesRespondCompletedGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesRespondCompletedGetParams() *MessagingServiceMessagesRespondCompletedGetParams { + + return &MessagingServiceMessagesRespondCompletedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesRespondCompletedGetParamsWithTimeout creates a new MessagingServiceMessagesRespondCompletedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesRespondCompletedGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesRespondCompletedGetParams { + + return &MessagingServiceMessagesRespondCompletedGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesRespondCompletedGetParamsWithContext creates a new MessagingServiceMessagesRespondCompletedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesRespondCompletedGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesRespondCompletedGetParams { + + return &MessagingServiceMessagesRespondCompletedGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesRespondCompletedGetParamsWithHTTPClient creates a new MessagingServiceMessagesRespondCompletedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesRespondCompletedGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesRespondCompletedGetParams { + + return &MessagingServiceMessagesRespondCompletedGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesRespondCompletedGetParams contains all the parameters to send to the API endpoint +for the messaging service messages respond completed get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesRespondCompletedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesRespondCompletedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesRespondCompletedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesRespondCompletedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages respond completed get params +func (o *MessagingServiceMessagesRespondCompletedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesRespondCompletedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_responses.go new file mode 100644 index 00000000000..0301e85d04f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_completed_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesRespondCompletedGetReader is a Reader for the MessagingServiceMessagesRespondCompletedGet structure. +type MessagingServiceMessagesRespondCompletedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesRespondCompletedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesRespondCompletedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesRespondCompletedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesRespondCompletedGetOK creates a MessagingServiceMessagesRespondCompletedGetOK with default headers values +func NewMessagingServiceMessagesRespondCompletedGetOK() *MessagingServiceMessagesRespondCompletedGetOK { + return &MessagingServiceMessagesRespondCompletedGetOK{} +} + +/*MessagingServiceMessagesRespondCompletedGetOK handles this case with default header values. + +MessagingServiceMessagesRespondCompletedGetOK messaging service messages respond completed get o k +*/ +type MessagingServiceMessagesRespondCompletedGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesRespondCompletedGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesRespondCompletedGetOK) 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 +} + +// NewMessagingServiceMessagesRespondCompletedGetDefault creates a MessagingServiceMessagesRespondCompletedGetDefault with default headers values +func NewMessagingServiceMessagesRespondCompletedGetDefault(code int) *MessagingServiceMessagesRespondCompletedGetDefault { + return &MessagingServiceMessagesRespondCompletedGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesRespondCompletedGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesRespondCompletedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages respond completed get default response +func (o *MessagingServiceMessagesRespondCompletedGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesRespondCompletedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesRespondCompletedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesRespondCompletedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_parameters.go new file mode 100644 index 00000000000..b9d639fbddc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesRespondPendingGetParams creates a new MessagingServiceMessagesRespondPendingGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesRespondPendingGetParams() *MessagingServiceMessagesRespondPendingGetParams { + + return &MessagingServiceMessagesRespondPendingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesRespondPendingGetParamsWithTimeout creates a new MessagingServiceMessagesRespondPendingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesRespondPendingGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesRespondPendingGetParams { + + return &MessagingServiceMessagesRespondPendingGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesRespondPendingGetParamsWithContext creates a new MessagingServiceMessagesRespondPendingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesRespondPendingGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesRespondPendingGetParams { + + return &MessagingServiceMessagesRespondPendingGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesRespondPendingGetParamsWithHTTPClient creates a new MessagingServiceMessagesRespondPendingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesRespondPendingGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesRespondPendingGetParams { + + return &MessagingServiceMessagesRespondPendingGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesRespondPendingGetParams contains all the parameters to send to the API endpoint +for the messaging service messages respond pending get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesRespondPendingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesRespondPendingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesRespondPendingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesRespondPendingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages respond pending get params +func (o *MessagingServiceMessagesRespondPendingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesRespondPendingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_responses.go new file mode 100644 index 00000000000..629c2c925cb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_respond_pending_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesRespondPendingGetReader is a Reader for the MessagingServiceMessagesRespondPendingGet structure. +type MessagingServiceMessagesRespondPendingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesRespondPendingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesRespondPendingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesRespondPendingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesRespondPendingGetOK creates a MessagingServiceMessagesRespondPendingGetOK with default headers values +func NewMessagingServiceMessagesRespondPendingGetOK() *MessagingServiceMessagesRespondPendingGetOK { + return &MessagingServiceMessagesRespondPendingGetOK{} +} + +/*MessagingServiceMessagesRespondPendingGetOK handles this case with default header values. + +MessagingServiceMessagesRespondPendingGetOK messaging service messages respond pending get o k +*/ +type MessagingServiceMessagesRespondPendingGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesRespondPendingGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesRespondPendingGetOK) 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 +} + +// NewMessagingServiceMessagesRespondPendingGetDefault creates a MessagingServiceMessagesRespondPendingGetDefault with default headers values +func NewMessagingServiceMessagesRespondPendingGetDefault(code int) *MessagingServiceMessagesRespondPendingGetDefault { + return &MessagingServiceMessagesRespondPendingGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesRespondPendingGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesRespondPendingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages respond pending get default response +func (o *MessagingServiceMessagesRespondPendingGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesRespondPendingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesRespondPendingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesRespondPendingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_parameters.go new file mode 100644 index 00000000000..f5dcb09c009 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesSentGetParams creates a new MessagingServiceMessagesSentGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesSentGetParams() *MessagingServiceMessagesSentGetParams { + + return &MessagingServiceMessagesSentGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesSentGetParamsWithTimeout creates a new MessagingServiceMessagesSentGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesSentGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesSentGetParams { + + return &MessagingServiceMessagesSentGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesSentGetParamsWithContext creates a new MessagingServiceMessagesSentGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesSentGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesSentGetParams { + + return &MessagingServiceMessagesSentGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesSentGetParamsWithHTTPClient creates a new MessagingServiceMessagesSentGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesSentGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesSentGetParams { + + return &MessagingServiceMessagesSentGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesSentGetParams contains all the parameters to send to the API endpoint +for the messaging service messages sent get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesSentGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesSentGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesSentGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesSentGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages sent get params +func (o *MessagingServiceMessagesSentGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesSentGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_responses.go new file mode 100644 index 00000000000..c2e1f091325 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_sent_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesSentGetReader is a Reader for the MessagingServiceMessagesSentGet structure. +type MessagingServiceMessagesSentGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesSentGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesSentGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesSentGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesSentGetOK creates a MessagingServiceMessagesSentGetOK with default headers values +func NewMessagingServiceMessagesSentGetOK() *MessagingServiceMessagesSentGetOK { + return &MessagingServiceMessagesSentGetOK{} +} + +/*MessagingServiceMessagesSentGetOK handles this case with default header values. + +MessagingServiceMessagesSentGetOK messaging service messages sent get o k +*/ +type MessagingServiceMessagesSentGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesSentGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesSentGetOK) 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 +} + +// NewMessagingServiceMessagesSentGetDefault creates a MessagingServiceMessagesSentGetDefault with default headers values +func NewMessagingServiceMessagesSentGetDefault(code int) *MessagingServiceMessagesSentGetDefault { + return &MessagingServiceMessagesSentGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesSentGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesSentGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages sent get default response +func (o *MessagingServiceMessagesSentGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesSentGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesSentGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesSentGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_parameters.go new file mode 100644 index 00000000000..20d8cc4b1a8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceMessagesTimeoutGetParams creates a new MessagingServiceMessagesTimeoutGetParams object +// with the default values initialized. +func NewMessagingServiceMessagesTimeoutGetParams() *MessagingServiceMessagesTimeoutGetParams { + + return &MessagingServiceMessagesTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceMessagesTimeoutGetParamsWithTimeout creates a new MessagingServiceMessagesTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceMessagesTimeoutGetParamsWithTimeout(timeout time.Duration) *MessagingServiceMessagesTimeoutGetParams { + + return &MessagingServiceMessagesTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceMessagesTimeoutGetParamsWithContext creates a new MessagingServiceMessagesTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceMessagesTimeoutGetParamsWithContext(ctx context.Context) *MessagingServiceMessagesTimeoutGetParams { + + return &MessagingServiceMessagesTimeoutGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceMessagesTimeoutGetParamsWithHTTPClient creates a new MessagingServiceMessagesTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceMessagesTimeoutGetParamsWithHTTPClient(client *http.Client) *MessagingServiceMessagesTimeoutGetParams { + + return &MessagingServiceMessagesTimeoutGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceMessagesTimeoutGetParams contains all the parameters to send to the API endpoint +for the messaging service messages timeout get operation typically these are written to a http.Request +*/ +type MessagingServiceMessagesTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) WithTimeout(timeout time.Duration) *MessagingServiceMessagesTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) WithContext(ctx context.Context) *MessagingServiceMessagesTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) WithHTTPClient(client *http.Client) *MessagingServiceMessagesTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service messages timeout get params +func (o *MessagingServiceMessagesTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceMessagesTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_responses.go new file mode 100644 index 00000000000..c000b8e0732 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_messages_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceMessagesTimeoutGetReader is a Reader for the MessagingServiceMessagesTimeoutGet structure. +type MessagingServiceMessagesTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceMessagesTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceMessagesTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceMessagesTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceMessagesTimeoutGetOK creates a MessagingServiceMessagesTimeoutGetOK with default headers values +func NewMessagingServiceMessagesTimeoutGetOK() *MessagingServiceMessagesTimeoutGetOK { + return &MessagingServiceMessagesTimeoutGetOK{} +} + +/*MessagingServiceMessagesTimeoutGetOK handles this case with default header values. + +MessagingServiceMessagesTimeoutGetOK messaging service messages timeout get o k +*/ +type MessagingServiceMessagesTimeoutGetOK struct { + Payload []*models.MessageCounter +} + +func (o *MessagingServiceMessagesTimeoutGetOK) GetPayload() []*models.MessageCounter { + return o.Payload +} + +func (o *MessagingServiceMessagesTimeoutGetOK) 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 +} + +// NewMessagingServiceMessagesTimeoutGetDefault creates a MessagingServiceMessagesTimeoutGetDefault with default headers values +func NewMessagingServiceMessagesTimeoutGetDefault(code int) *MessagingServiceMessagesTimeoutGetDefault { + return &MessagingServiceMessagesTimeoutGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceMessagesTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceMessagesTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service messages timeout get default response +func (o *MessagingServiceMessagesTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceMessagesTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceMessagesTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceMessagesTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_parameters.go new file mode 100644 index 00000000000..0d4cd40aebc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewMessagingServiceVersionGetParams creates a new MessagingServiceVersionGetParams object +// with the default values initialized. +func NewMessagingServiceVersionGetParams() *MessagingServiceVersionGetParams { + var () + return &MessagingServiceVersionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewMessagingServiceVersionGetParamsWithTimeout creates a new MessagingServiceVersionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewMessagingServiceVersionGetParamsWithTimeout(timeout time.Duration) *MessagingServiceVersionGetParams { + var () + return &MessagingServiceVersionGetParams{ + + timeout: timeout, + } +} + +// NewMessagingServiceVersionGetParamsWithContext creates a new MessagingServiceVersionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewMessagingServiceVersionGetParamsWithContext(ctx context.Context) *MessagingServiceVersionGetParams { + var () + return &MessagingServiceVersionGetParams{ + + Context: ctx, + } +} + +// NewMessagingServiceVersionGetParamsWithHTTPClient creates a new MessagingServiceVersionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewMessagingServiceVersionGetParamsWithHTTPClient(client *http.Client) *MessagingServiceVersionGetParams { + var () + return &MessagingServiceVersionGetParams{ + HTTPClient: client, + } +} + +/*MessagingServiceVersionGetParams contains all the parameters to send to the API endpoint +for the messaging service version get operation typically these are written to a http.Request +*/ +type MessagingServiceVersionGetParams struct { + + /*Addr + Address + + */ + Addr string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the messaging service version get params +func (o *MessagingServiceVersionGetParams) WithTimeout(timeout time.Duration) *MessagingServiceVersionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the messaging service version get params +func (o *MessagingServiceVersionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the messaging service version get params +func (o *MessagingServiceVersionGetParams) WithContext(ctx context.Context) *MessagingServiceVersionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the messaging service version get params +func (o *MessagingServiceVersionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the messaging service version get params +func (o *MessagingServiceVersionGetParams) WithHTTPClient(client *http.Client) *MessagingServiceVersionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the messaging service version get params +func (o *MessagingServiceVersionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAddr adds the addr to the messaging service version get params +func (o *MessagingServiceVersionGetParams) WithAddr(addr string) *MessagingServiceVersionGetParams { + o.SetAddr(addr) + return o +} + +// SetAddr adds the addr to the messaging service version get params +func (o *MessagingServiceVersionGetParams) SetAddr(addr string) { + o.Addr = addr +} + +// WriteToRequest writes these params to a swagger request +func (o *MessagingServiceVersionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param addr + qrAddr := o.Addr + qAddr := qrAddr + if qAddr != "" { + if err := r.SetQueryParam("addr", qAddr); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_responses.go new file mode 100644 index 00000000000..e9050244e4a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/messaging_service_version_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// MessagingServiceVersionGetReader is a Reader for the MessagingServiceVersionGet structure. +type MessagingServiceVersionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *MessagingServiceVersionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewMessagingServiceVersionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewMessagingServiceVersionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewMessagingServiceVersionGetOK creates a MessagingServiceVersionGetOK with default headers values +func NewMessagingServiceVersionGetOK() *MessagingServiceVersionGetOK { + return &MessagingServiceVersionGetOK{} +} + +/*MessagingServiceVersionGetOK handles this case with default header values. + +MessagingServiceVersionGetOK messaging service version get o k +*/ +type MessagingServiceVersionGetOK struct { + Payload int32 +} + +func (o *MessagingServiceVersionGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *MessagingServiceVersionGetOK) 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 +} + +// NewMessagingServiceVersionGetDefault creates a MessagingServiceVersionGetDefault with default headers values +func NewMessagingServiceVersionGetDefault(code int) *MessagingServiceVersionGetDefault { + return &MessagingServiceVersionGetDefault{ + _statusCode: code, + } +} + +/*MessagingServiceVersionGetDefault handles this case with default header values. + +internal server error +*/ +type MessagingServiceVersionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the messaging service version get default response +func (o *MessagingServiceVersionGetDefault) Code() int { + return o._statusCode +} + +func (o *MessagingServiceVersionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *MessagingServiceVersionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *MessagingServiceVersionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/operations_client.go b/pkg/scyllaclient/internal/scylla/client/operations/operations_client.go new file mode 100644 index 00000000000..a7ed45d94c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/operations_client.go @@ -0,0 +1,13845 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// New creates a new operations API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client for operations API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +/* +CacheServiceCounterCacheCapacityPost sets counter cache capacity in mb + +set counter cache capacity in mb +*/ +func (a *Client) CacheServiceCounterCacheCapacityPost(params *CacheServiceCounterCacheCapacityPostParams) (*CacheServiceCounterCacheCapacityPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceCounterCacheCapacityPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceCounterCacheCapacityPost", + Method: "POST", + PathPattern: "/cache_service/counter_cache_capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceCounterCacheCapacityPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceCounterCacheCapacityPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceCounterCacheCapacityPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceCounterCacheKeysToSaveGet gets counter cache keys to save + +get counter cache keys to save +*/ +func (a *Client) CacheServiceCounterCacheKeysToSaveGet(params *CacheServiceCounterCacheKeysToSaveGetParams) (*CacheServiceCounterCacheKeysToSaveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceCounterCacheKeysToSaveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceCounterCacheKeysToSaveGet", + Method: "GET", + PathPattern: "/cache_service/counter_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceCounterCacheKeysToSaveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceCounterCacheKeysToSaveGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceCounterCacheKeysToSaveGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceCounterCacheKeysToSavePost sets counter cache keys to save + +set counter cache keys to save +*/ +func (a *Client) CacheServiceCounterCacheKeysToSavePost(params *CacheServiceCounterCacheKeysToSavePostParams) (*CacheServiceCounterCacheKeysToSavePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceCounterCacheKeysToSavePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceCounterCacheKeysToSavePost", + Method: "POST", + PathPattern: "/cache_service/counter_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceCounterCacheKeysToSavePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceCounterCacheKeysToSavePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceCounterCacheKeysToSavePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceCounterCacheSavePeriodGet gets counter cache save period in seconds + +get counter cache save period in seconds +*/ +func (a *Client) CacheServiceCounterCacheSavePeriodGet(params *CacheServiceCounterCacheSavePeriodGetParams) (*CacheServiceCounterCacheSavePeriodGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceCounterCacheSavePeriodGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceCounterCacheSavePeriodGet", + Method: "GET", + PathPattern: "/cache_service/counter_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceCounterCacheSavePeriodGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceCounterCacheSavePeriodGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceCounterCacheSavePeriodGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceCounterCacheSavePeriodPost sets counter cache save period in seconds + +set counter cache save period in seconds +*/ +func (a *Client) CacheServiceCounterCacheSavePeriodPost(params *CacheServiceCounterCacheSavePeriodPostParams) (*CacheServiceCounterCacheSavePeriodPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceCounterCacheSavePeriodPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceCounterCacheSavePeriodPost", + Method: "POST", + PathPattern: "/cache_service/counter_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceCounterCacheSavePeriodPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceCounterCacheSavePeriodPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceCounterCacheSavePeriodPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceInvalidateCounterCachePost invalidates counter cache + +invalidate counter cache +*/ +func (a *Client) CacheServiceInvalidateCounterCachePost(params *CacheServiceInvalidateCounterCachePostParams) (*CacheServiceInvalidateCounterCachePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceInvalidateCounterCachePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceInvalidateCounterCachePost", + Method: "POST", + PathPattern: "/cache_service/invalidate_counter_cache", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceInvalidateCounterCachePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceInvalidateCounterCachePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceInvalidateCounterCachePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceInvalidateKeyCachePost invalidates key cache + +invalidate the key cache; for use after invalidating row cache +*/ +func (a *Client) CacheServiceInvalidateKeyCachePost(params *CacheServiceInvalidateKeyCachePostParams) (*CacheServiceInvalidateKeyCachePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceInvalidateKeyCachePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceInvalidateKeyCachePost", + Method: "POST", + PathPattern: "/cache_service/invalidate_key_cache", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceInvalidateKeyCachePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceInvalidateKeyCachePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceInvalidateKeyCachePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceKeyCacheCapacityPost sets key cache capacity in mb + +set key cache capacity in mb +*/ +func (a *Client) CacheServiceKeyCacheCapacityPost(params *CacheServiceKeyCacheCapacityPostParams) (*CacheServiceKeyCacheCapacityPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceKeyCacheCapacityPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceKeyCacheCapacityPost", + Method: "POST", + PathPattern: "/cache_service/key_cache_capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceKeyCacheCapacityPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceKeyCacheCapacityPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceKeyCacheCapacityPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceKeyCacheKeysToSaveGet gets key cache keys to save + +get key cache keys to save +*/ +func (a *Client) CacheServiceKeyCacheKeysToSaveGet(params *CacheServiceKeyCacheKeysToSaveGetParams) (*CacheServiceKeyCacheKeysToSaveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceKeyCacheKeysToSaveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceKeyCacheKeysToSaveGet", + Method: "GET", + PathPattern: "/cache_service/key_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceKeyCacheKeysToSaveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceKeyCacheKeysToSaveGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceKeyCacheKeysToSaveGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceKeyCacheKeysToSavePost sets key cache keys to save + +set key cache keys to save +*/ +func (a *Client) CacheServiceKeyCacheKeysToSavePost(params *CacheServiceKeyCacheKeysToSavePostParams) (*CacheServiceKeyCacheKeysToSavePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceKeyCacheKeysToSavePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceKeyCacheKeysToSavePost", + Method: "POST", + PathPattern: "/cache_service/key_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceKeyCacheKeysToSavePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceKeyCacheKeysToSavePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceKeyCacheKeysToSavePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceKeyCacheSavePeriodGet gets key cache save period in seconds + +get key cache save period in seconds +*/ +func (a *Client) CacheServiceKeyCacheSavePeriodGet(params *CacheServiceKeyCacheSavePeriodGetParams) (*CacheServiceKeyCacheSavePeriodGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceKeyCacheSavePeriodGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceKeyCacheSavePeriodGet", + Method: "GET", + PathPattern: "/cache_service/key_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceKeyCacheSavePeriodGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceKeyCacheSavePeriodGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceKeyCacheSavePeriodGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceKeyCacheSavePeriodPost sets key cache save period in seconds + +set key cache save period in seconds +*/ +func (a *Client) CacheServiceKeyCacheSavePeriodPost(params *CacheServiceKeyCacheSavePeriodPostParams) (*CacheServiceKeyCacheSavePeriodPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceKeyCacheSavePeriodPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceKeyCacheSavePeriodPost", + Method: "POST", + PathPattern: "/cache_service/key_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceKeyCacheSavePeriodPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceKeyCacheSavePeriodPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceKeyCacheSavePeriodPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterCapacityGet gets counter capacity + +Get counter capacity +*/ +func (a *Client) CacheServiceMetricsCounterCapacityGet(params *CacheServiceMetricsCounterCapacityGetParams) (*CacheServiceMetricsCounterCapacityGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterCapacityGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterCapacityGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterCapacityGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterCapacityGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterCapacityGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterEntriesGet gets counter entries + +Get counter entries +*/ +func (a *Client) CacheServiceMetricsCounterEntriesGet(params *CacheServiceMetricsCounterEntriesGetParams) (*CacheServiceMetricsCounterEntriesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterEntriesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterEntriesGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/entries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterEntriesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterEntriesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterEntriesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterHitRateGet gets counter hit rate + +Get counter hit rate +*/ +func (a *Client) CacheServiceMetricsCounterHitRateGet(params *CacheServiceMetricsCounterHitRateGetParams) (*CacheServiceMetricsCounterHitRateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterHitRateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterHitRateGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/hit_rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterHitRateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterHitRateGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterHitRateGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterHitsGet gets counter hits + +Get counter hits +*/ +func (a *Client) CacheServiceMetricsCounterHitsGet(params *CacheServiceMetricsCounterHitsGetParams) (*CacheServiceMetricsCounterHitsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterHitsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterHitsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/hits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterHitsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterHitsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterHitsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterHitsMovingAvrageGet gets counter hits moving avrage + +Get counter hits moving avrage +*/ +func (a *Client) CacheServiceMetricsCounterHitsMovingAvrageGet(params *CacheServiceMetricsCounterHitsMovingAvrageGetParams) (*CacheServiceMetricsCounterHitsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterHitsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterHitsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/hits_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterHitsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterHitsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterHitsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterRequestsGet gets counter requests + +Get counter requests +*/ +func (a *Client) CacheServiceMetricsCounterRequestsGet(params *CacheServiceMetricsCounterRequestsGetParams) (*CacheServiceMetricsCounterRequestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterRequestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterRequestsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/requests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterRequestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterRequestsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterRequestsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterRequestsMovingAvrageGet gets counter requests moving avrage + +Get counter requests moving avrage +*/ +func (a *Client) CacheServiceMetricsCounterRequestsMovingAvrageGet(params *CacheServiceMetricsCounterRequestsMovingAvrageGetParams) (*CacheServiceMetricsCounterRequestsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterRequestsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterRequestsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/requests_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterRequestsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterRequestsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterRequestsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsCounterSizeGet gets counter size + +Get counter cache waited size +*/ +func (a *Client) CacheServiceMetricsCounterSizeGet(params *CacheServiceMetricsCounterSizeGetParams) (*CacheServiceMetricsCounterSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsCounterSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsCounterSizeGet", + Method: "GET", + PathPattern: "/cache_service/metrics/counter/size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsCounterSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsCounterSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsCounterSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyCapacityGet gets key capacity + +Get key capacity +*/ +func (a *Client) CacheServiceMetricsKeyCapacityGet(params *CacheServiceMetricsKeyCapacityGetParams) (*CacheServiceMetricsKeyCapacityGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyCapacityGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyCapacityGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyCapacityGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyCapacityGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyCapacityGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyEntriesGet gets key entries + +Get key entries +*/ +func (a *Client) CacheServiceMetricsKeyEntriesGet(params *CacheServiceMetricsKeyEntriesGetParams) (*CacheServiceMetricsKeyEntriesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyEntriesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyEntriesGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/entries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyEntriesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyEntriesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyEntriesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyHitRateGet gets key hit rate + +Get key hit rate +*/ +func (a *Client) CacheServiceMetricsKeyHitRateGet(params *CacheServiceMetricsKeyHitRateGetParams) (*CacheServiceMetricsKeyHitRateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyHitRateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyHitRateGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/hit_rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyHitRateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyHitRateGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyHitRateGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyHitsGet gets key hits + +Get key hits +*/ +func (a *Client) CacheServiceMetricsKeyHitsGet(params *CacheServiceMetricsKeyHitsGetParams) (*CacheServiceMetricsKeyHitsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyHitsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyHitsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/hits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyHitsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyHitsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyHitsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyHitsMovingAvrageGet gets key hits moving avrage + +Get key hits moving avrage +*/ +func (a *Client) CacheServiceMetricsKeyHitsMovingAvrageGet(params *CacheServiceMetricsKeyHitsMovingAvrageGetParams) (*CacheServiceMetricsKeyHitsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyHitsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyHitsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/hits_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyHitsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyHitsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyHitsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyRequestsGet gets key requests + +Get key requests +*/ +func (a *Client) CacheServiceMetricsKeyRequestsGet(params *CacheServiceMetricsKeyRequestsGetParams) (*CacheServiceMetricsKeyRequestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyRequestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyRequestsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/requests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyRequestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyRequestsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyRequestsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeyRequestsMovingAvrageGet gets key requests moving avrage + +Get key requests moving avrage +*/ +func (a *Client) CacheServiceMetricsKeyRequestsMovingAvrageGet(params *CacheServiceMetricsKeyRequestsMovingAvrageGetParams) (*CacheServiceMetricsKeyRequestsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeyRequestsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeyRequestsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/requests_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeyRequestsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeyRequestsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeyRequestsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsKeySizeGet gets key size + +Get key cache waited size +*/ +func (a *Client) CacheServiceMetricsKeySizeGet(params *CacheServiceMetricsKeySizeGetParams) (*CacheServiceMetricsKeySizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsKeySizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsKeySizeGet", + Method: "GET", + PathPattern: "/cache_service/metrics/key/size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsKeySizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsKeySizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsKeySizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowCapacityGet gets row capacity + +Get row capacity +*/ +func (a *Client) CacheServiceMetricsRowCapacityGet(params *CacheServiceMetricsRowCapacityGetParams) (*CacheServiceMetricsRowCapacityGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowCapacityGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowCapacityGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowCapacityGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowCapacityGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowCapacityGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowEntriesGet gets row entries + +Get row entries +*/ +func (a *Client) CacheServiceMetricsRowEntriesGet(params *CacheServiceMetricsRowEntriesGetParams) (*CacheServiceMetricsRowEntriesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowEntriesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowEntriesGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/entries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowEntriesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowEntriesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowEntriesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowHitRateGet gets row hit rate + +Get row hit rate +*/ +func (a *Client) CacheServiceMetricsRowHitRateGet(params *CacheServiceMetricsRowHitRateGetParams) (*CacheServiceMetricsRowHitRateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowHitRateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowHitRateGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/hit_rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowHitRateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowHitRateGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowHitRateGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowHitsGet gets row hits + +Get row hits +*/ +func (a *Client) CacheServiceMetricsRowHitsGet(params *CacheServiceMetricsRowHitsGetParams) (*CacheServiceMetricsRowHitsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowHitsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowHitsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/hits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowHitsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowHitsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowHitsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowHitsMovingAvrageGet gets row hits moving avrage + +Get row hits moving avrage +*/ +func (a *Client) CacheServiceMetricsRowHitsMovingAvrageGet(params *CacheServiceMetricsRowHitsMovingAvrageGetParams) (*CacheServiceMetricsRowHitsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowHitsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowHitsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/hits_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowHitsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowHitsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowHitsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowRequestsGet gets row requests + +Get row requests +*/ +func (a *Client) CacheServiceMetricsRowRequestsGet(params *CacheServiceMetricsRowRequestsGetParams) (*CacheServiceMetricsRowRequestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowRequestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowRequestsGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/requests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowRequestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowRequestsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowRequestsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowRequestsMovingAvrageGet gets row requests moving avrage + +Get row requests moving avrage +*/ +func (a *Client) CacheServiceMetricsRowRequestsMovingAvrageGet(params *CacheServiceMetricsRowRequestsMovingAvrageGetParams) (*CacheServiceMetricsRowRequestsMovingAvrageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowRequestsMovingAvrageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowRequestsMovingAvrageGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/requests_moving_avrage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowRequestsMovingAvrageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowRequestsMovingAvrageGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowRequestsMovingAvrageGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceMetricsRowSizeGet gets row size + +Get row cache waited size +*/ +func (a *Client) CacheServiceMetricsRowSizeGet(params *CacheServiceMetricsRowSizeGetParams) (*CacheServiceMetricsRowSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceMetricsRowSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceMetricsRowSizeGet", + Method: "GET", + PathPattern: "/cache_service/metrics/row/size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceMetricsRowSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceMetricsRowSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceMetricsRowSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceRowCacheCapacityPost sets row cache capacity in mb + +set row cache capacity in mb +*/ +func (a *Client) CacheServiceRowCacheCapacityPost(params *CacheServiceRowCacheCapacityPostParams) (*CacheServiceRowCacheCapacityPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceRowCacheCapacityPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceRowCacheCapacityPost", + Method: "POST", + PathPattern: "/cache_service/row_cache_capacity", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceRowCacheCapacityPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceRowCacheCapacityPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceRowCacheCapacityPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceRowCacheKeysToSaveGet gets row cache keys to save + +get row cache keys to save +*/ +func (a *Client) CacheServiceRowCacheKeysToSaveGet(params *CacheServiceRowCacheKeysToSaveGetParams) (*CacheServiceRowCacheKeysToSaveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceRowCacheKeysToSaveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceRowCacheKeysToSaveGet", + Method: "GET", + PathPattern: "/cache_service/row_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceRowCacheKeysToSaveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceRowCacheKeysToSaveGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceRowCacheKeysToSaveGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceRowCacheKeysToSavePost sets row cache keys to save + +set row cache keys to save +*/ +func (a *Client) CacheServiceRowCacheKeysToSavePost(params *CacheServiceRowCacheKeysToSavePostParams) (*CacheServiceRowCacheKeysToSavePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceRowCacheKeysToSavePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceRowCacheKeysToSavePost", + Method: "POST", + PathPattern: "/cache_service/row_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceRowCacheKeysToSavePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceRowCacheKeysToSavePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceRowCacheKeysToSavePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceRowCacheSavePeriodGet gets row cache save period in seconds + +get row cache save period in seconds +*/ +func (a *Client) CacheServiceRowCacheSavePeriodGet(params *CacheServiceRowCacheSavePeriodGetParams) (*CacheServiceRowCacheSavePeriodGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceRowCacheSavePeriodGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceRowCacheSavePeriodGet", + Method: "GET", + PathPattern: "/cache_service/row_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceRowCacheSavePeriodGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceRowCacheSavePeriodGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceRowCacheSavePeriodGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceRowCacheSavePeriodPost sets row cache save period in seconds + +set row cache save period in seconds +*/ +func (a *Client) CacheServiceRowCacheSavePeriodPost(params *CacheServiceRowCacheSavePeriodPostParams) (*CacheServiceRowCacheSavePeriodPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceRowCacheSavePeriodPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceRowCacheSavePeriodPost", + Method: "POST", + PathPattern: "/cache_service/row_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceRowCacheSavePeriodPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceRowCacheSavePeriodPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceRowCacheSavePeriodPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CacheServiceSaveCachesPost saves caches + +save row and key caches +*/ +func (a *Client) CacheServiceSaveCachesPost(params *CacheServiceSaveCachesPostParams) (*CacheServiceSaveCachesPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCacheServiceSaveCachesPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CacheServiceSaveCachesPost", + Method: "POST", + PathPattern: "/cache_service/save_caches", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CacheServiceSaveCachesPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CacheServiceSaveCachesPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CacheServiceSaveCachesPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CollectdByPluginidGet gets collectd + +Get a collectd value +*/ +func (a *Client) CollectdByPluginidGet(params *CollectdByPluginidGetParams) (*CollectdByPluginidGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCollectdByPluginidGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CollectdByPluginidGet", + Method: "GET", + PathPattern: "/collectd/{pluginid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CollectdByPluginidGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CollectdByPluginidGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CollectdByPluginidGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CollectdByPluginidPost enables collectd + +Start reporting on one or more collectd metric +*/ +func (a *Client) CollectdByPluginidPost(params *CollectdByPluginidPostParams) (*CollectdByPluginidPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCollectdByPluginidPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CollectdByPluginidPost", + Method: "POST", + PathPattern: "/collectd/{pluginid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CollectdByPluginidPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CollectdByPluginidPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CollectdByPluginidPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CollectdGet gets collectd items + +Get a list of all collectd metrics and their status +*/ +func (a *Client) CollectdGet(params *CollectdGetParams) (*CollectdGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCollectdGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CollectdGet", + Method: "GET", + PathPattern: "/collectd/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CollectdGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CollectdGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CollectdGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CollectdPost enables all collectd + +Enable or disable all collectd metrics +*/ +func (a *Client) CollectdPost(params *CollectdPostParams) (*CollectdPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCollectdPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CollectdPost", + Method: "POST", + PathPattern: "/collectd/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CollectdPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CollectdPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CollectdPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyAutocompactionByNameGet is auto compaction disabled + +check if the auto compaction disabled +*/ +func (a *Client) ColumnFamilyAutocompactionByNameGet(params *ColumnFamilyAutocompactionByNameGetParams) (*ColumnFamilyAutocompactionByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyAutocompactionByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyAutocompactionByNameGet", + Method: "GET", + PathPattern: "/column_family/autocompaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyAutocompactionByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyAutocompactionByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyAutocompactionByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyBuiltIndexesByNameGet gets built indexes + +Returns a list of the names of the built column indexes for current store +*/ +func (a *Client) ColumnFamilyBuiltIndexesByNameGet(params *ColumnFamilyBuiltIndexesByNameGetParams) (*ColumnFamilyBuiltIndexesByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyBuiltIndexesByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyBuiltIndexesByNameGet", + Method: "GET", + PathPattern: "/column_family/built_indexes/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyBuiltIndexesByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyBuiltIndexesByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyBuiltIndexesByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCompactionByNamePost sets compaction threshold + +Sets the minumum and maximum number of sstables in queue before compaction kicks off +*/ +func (a *Client) ColumnFamilyCompactionByNamePost(params *ColumnFamilyCompactionByNamePostParams) (*ColumnFamilyCompactionByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCompactionByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCompactionByNamePost", + Method: "POST", + PathPattern: "/column_family/compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCompactionByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCompactionByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCompactionByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCompactionStrategyByNameGet gets compaction strategy class + +Gets the compaction strategy class name +*/ +func (a *Client) ColumnFamilyCompactionStrategyByNameGet(params *ColumnFamilyCompactionStrategyByNameGetParams) (*ColumnFamilyCompactionStrategyByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCompactionStrategyByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCompactionStrategyByNameGet", + Method: "GET", + PathPattern: "/column_family/compaction_strategy/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCompactionStrategyByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCompactionStrategyByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCompactionStrategyByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCompactionStrategyByNamePost sets compaction strategy class + +Sets the compaction strategy by class name +*/ +func (a *Client) ColumnFamilyCompactionStrategyByNamePost(params *ColumnFamilyCompactionStrategyByNamePostParams) (*ColumnFamilyCompactionStrategyByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCompactionStrategyByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCompactionStrategyByNamePost", + Method: "POST", + PathPattern: "/column_family/compaction_strategy/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCompactionStrategyByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCompactionStrategyByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCompactionStrategyByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCompressionParametersByNameGet gets compression parameters + +get the compression parameters +*/ +func (a *Client) ColumnFamilyCompressionParametersByNameGet(params *ColumnFamilyCompressionParametersByNameGetParams) (*ColumnFamilyCompressionParametersByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCompressionParametersByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCompressionParametersByNameGet", + Method: "GET", + PathPattern: "/column_family/compression_parameters/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCompressionParametersByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCompressionParametersByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCompressionParametersByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCompressionParametersByNamePost sets compression parameters + +Sets the compression parameters +*/ +func (a *Client) ColumnFamilyCompressionParametersByNamePost(params *ColumnFamilyCompressionParametersByNamePostParams) (*ColumnFamilyCompressionParametersByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCompressionParametersByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCompressionParametersByNamePost", + Method: "POST", + PathPattern: "/column_family/compression_parameters/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCompressionParametersByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCompressionParametersByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCompressionParametersByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyCrcCheckChanceByNamePost sets crc check chance + +Set new crc check chance +*/ +func (a *Client) ColumnFamilyCrcCheckChanceByNamePost(params *ColumnFamilyCrcCheckChanceByNamePostParams) (*ColumnFamilyCrcCheckChanceByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyCrcCheckChanceByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyCrcCheckChanceByNamePost", + Method: "POST", + PathPattern: "/column_family/crc_check_chance/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyCrcCheckChanceByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyCrcCheckChanceByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyCrcCheckChanceByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyDroppableRatioByNameGet gets droppable tombstone ratio + +Get the ratio of droppable tombstones to real columns (and non-droppable tombstones) +*/ +func (a *Client) ColumnFamilyDroppableRatioByNameGet(params *ColumnFamilyDroppableRatioByNameGetParams) (*ColumnFamilyDroppableRatioByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyDroppableRatioByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyDroppableRatioByNameGet", + Method: "GET", + PathPattern: "/column_family/droppable_ratio/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyDroppableRatioByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyDroppableRatioByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyDroppableRatioByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyEstimateKeysByNameGet estimates keys + +Get the estimate keys +*/ +func (a *Client) ColumnFamilyEstimateKeysByNameGet(params *ColumnFamilyEstimateKeysByNameGetParams) (*ColumnFamilyEstimateKeysByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyEstimateKeysByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyEstimateKeysByNameGet", + Method: "GET", + PathPattern: "/column_family/estimate_keys/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyEstimateKeysByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyEstimateKeysByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyEstimateKeysByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyGet gets column family + +Get a list of all column family info +*/ +func (a *Client) ColumnFamilyGet(params *ColumnFamilyGetParams) (*ColumnFamilyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyGet", + Method: "GET", + PathPattern: "/column_family/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyLoadSstableByNamePost loads new sstables + +Scan through Keyspace/ColumnFamily's data directory determine which SSTables should be loaded and load them +*/ +func (a *Client) ColumnFamilyLoadSstableByNamePost(params *ColumnFamilyLoadSstableByNamePostParams) (*ColumnFamilyLoadSstableByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyLoadSstableByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyLoadSstableByNamePost", + Method: "POST", + PathPattern: "/column_family/load/sstable/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyLoadSstableByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyLoadSstableByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyLoadSstableByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMajorCompactionByNamePost forces major compaction + +Force a major compaction of this column family +*/ +func (a *Client) ColumnFamilyMajorCompactionByNamePost(params *ColumnFamilyMajorCompactionByNamePostParams) (*ColumnFamilyMajorCompactionByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMajorCompactionByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMajorCompactionByNamePost", + Method: "POST", + PathPattern: "/column_family/major_compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMajorCompactionByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMajorCompactionByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMajorCompactionByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMaximumCompactionByNameGet gets maximum compaction threshold + +get the maximum number of sstables in queue before compaction kicks off +*/ +func (a *Client) ColumnFamilyMaximumCompactionByNameGet(params *ColumnFamilyMaximumCompactionByNameGetParams) (*ColumnFamilyMaximumCompactionByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMaximumCompactionByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMaximumCompactionByNameGet", + Method: "GET", + PathPattern: "/column_family/maximum_compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMaximumCompactionByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMaximumCompactionByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMaximumCompactionByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMaximumCompactionByNamePost sets maximum compaction threshold + +Sets the maximum number of sstables in queue before compaction kicks off +*/ +func (a *Client) ColumnFamilyMaximumCompactionByNamePost(params *ColumnFamilyMaximumCompactionByNamePostParams) (*ColumnFamilyMaximumCompactionByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMaximumCompactionByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMaximumCompactionByNamePost", + Method: "POST", + PathPattern: "/column_family/maximum_compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMaximumCompactionByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMaximumCompactionByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMaximumCompactionByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGet gets cf all memtables live data size + +Get all of the column family active and not memtables live data size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGet(params *ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams) (*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_live_data_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesLiveDataSizeGet gets all cf all memtables live data size + +Get all memtables active and not of all column family live data size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesLiveDataSizeGet(params *ColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams) (*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesLiveDataSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesLiveDataSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_live_data_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesLiveDataSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesLiveDataSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGet gets cf all memtables off heap size + +Get all of the column family active and not memtables off heap size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGet(params *ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams) (*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_off_heap_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesOffHeapSizeGet gets all cf all memtables off heap size + +Get all memtables active and not of all column family off heap size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesOffHeapSizeGet(params *ColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams) (*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesOffHeapSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesOffHeapSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_off_heap_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesOffHeapSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesOffHeapSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGet gets cf all memtables on heap size + +Get all of the column family active and not memtables on heap size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGet(params *ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams) (*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_on_heap_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsAllMemtablesOnHeapSizeGet gets all cf all memtables on heap size + +Get all memtables active and not of all column family on heap size +*/ +func (a *Client) ColumnFamilyMetricsAllMemtablesOnHeapSizeGet(params *ColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams) (*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsAllMemtablesOnHeapSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsAllMemtablesOnHeapSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/all_memtables_on_heap_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsAllMemtablesOnHeapSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsAllMemtablesOnHeapSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGet gets bloom filter disk space used + +Get bloom filter disk space used +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGet(params *ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams) (*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_disk_space_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterDiskSpaceUsedGet gets all bloom filter disk space used + +Get all bloom filter disk space used +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterDiskSpaceUsedGet(params *ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams) (*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterDiskSpaceUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterDiskSpaceUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_disk_space_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterDiskSpaceUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterFalsePositivesByNameGet gets bloom filter false positives + +Get bloom filter false positives +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterFalsePositivesByNameGet(params *ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams) (*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterFalsePositivesByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterFalsePositivesByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_false_positives/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterFalsePositivesByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterFalsePositivesGet gets all bloom filter false positives + +Get all bloom filter false positives +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterFalsePositivesGet(params *ColumnFamilyMetricsBloomFilterFalsePositivesGetParams) (*ColumnFamilyMetricsBloomFilterFalsePositivesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterFalsePositivesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterFalsePositivesGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_false_positives", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterFalsePositivesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterFalsePositivesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterFalsePositivesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterFalseRatioByNameGet gets bloom filter false ratio + +Get bloom filter false ratio +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterFalseRatioByNameGet(params *ColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams) (*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterFalseRatioByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterFalseRatioByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_false_ratio/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterFalseRatioByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterFalseRatioByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterFalseRatioGet gets all bloom filter false ratio + +Get all bloom filter false ratio +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterFalseRatioGet(params *ColumnFamilyMetricsBloomFilterFalseRatioGetParams) (*ColumnFamilyMetricsBloomFilterFalseRatioGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterFalseRatioGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterFalseRatioGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_false_ratio", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterFalseRatioGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterFalseRatioGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterFalseRatioGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGet gets bloom filter off heap memory used + +Get bloom filter off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGet(params *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams) (*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_off_heap_memory_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGet gets all bloom filter off heap memory used + +Get all bloom filter off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGet(params *ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams) (*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/bloom_filter_off_heap_memory_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasCommitByNameGet gets cas commit + +Get cas commit +*/ +func (a *Client) ColumnFamilyMetricsCasCommitByNameGet(params *ColumnFamilyMetricsCasCommitByNameGetParams) (*ColumnFamilyMetricsCasCommitByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasCommitByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasCommitByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_commit/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasCommitByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasCommitByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasCommitByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGet gets cas commit estimated histogram + +Get cas commit +*/ +func (a *Client) ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGet(params *ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_commit/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGet gets cas commit estimated recent histogram + +Get cas commit +*/ +func (a *Client) ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_commit/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasPrepareByNameGet gets cas prepare + +Get cas prepare +*/ +func (a *Client) ColumnFamilyMetricsCasPrepareByNameGet(params *ColumnFamilyMetricsCasPrepareByNameGetParams) (*ColumnFamilyMetricsCasPrepareByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasPrepareByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasPrepareByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_prepare/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasPrepareByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasPrepareByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasPrepareByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGet gets cas prepare estimated histogram + +Get cas prepare +*/ +func (a *Client) ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGet(params *ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_prepare/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGet gets cas prepare estimated recent histogram + +Get cas prepare +*/ +func (a *Client) ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_prepare/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasProposeByNameGet gets cas propose + +Get cas propose +*/ +func (a *Client) ColumnFamilyMetricsCasProposeByNameGet(params *ColumnFamilyMetricsCasProposeByNameGetParams) (*ColumnFamilyMetricsCasProposeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasProposeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasProposeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_propose/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasProposeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasProposeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasProposeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGet gets cas propose estimated histogram + +Get cas propose +*/ +func (a *Client) ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGet(params *ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_propose/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGet gets cas propose estimated recent histogram + +Get cas propose +*/ +func (a *Client) ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/cas_propose/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGet gets col update time delta histogram + +Get col update time delta histogram +*/ +func (a *Client) ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGet(params *ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams) (*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/col_update_time_delta_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGet gets compression metadata off heap memory used + +Get compression metadata off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGet(params *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams) (*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/compression_metadata_off_heap_memory_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGet gets all compression metadata off heap memory used + +Get all compression metadata off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGet(params *ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams) (*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/compression_metadata_off_heap_memory_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCompressionRatioByNameGet gets compression ratio + +Get compression ratio +*/ +func (a *Client) ColumnFamilyMetricsCompressionRatioByNameGet(params *ColumnFamilyMetricsCompressionRatioByNameGetParams) (*ColumnFamilyMetricsCompressionRatioByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCompressionRatioByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCompressionRatioByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/compression_ratio/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCompressionRatioByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCompressionRatioByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCompressionRatioByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCompressionRatioGet gets all compression ratio + +Get all compression ratio +*/ +func (a *Client) ColumnFamilyMetricsCompressionRatioGet(params *ColumnFamilyMetricsCompressionRatioGetParams) (*ColumnFamilyMetricsCompressionRatioGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCompressionRatioGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCompressionRatioGet", + Method: "GET", + PathPattern: "/column_family/metrics/compression_ratio", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCompressionRatioGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCompressionRatioGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCompressionRatioGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCoordinatorReadGet gets coordinator read latency + +Get coordinator read latency +*/ +func (a *Client) ColumnFamilyMetricsCoordinatorReadGet(params *ColumnFamilyMetricsCoordinatorReadGetParams) (*ColumnFamilyMetricsCoordinatorReadGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCoordinatorReadGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCoordinatorReadGet", + Method: "GET", + PathPattern: "/column_family/metrics/coordinator/read", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCoordinatorReadGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCoordinatorReadGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCoordinatorReadGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsCoordinatorScanGet gets coordinator scan latency + +Get coordinator scan latency +*/ +func (a *Client) ColumnFamilyMetricsCoordinatorScanGet(params *ColumnFamilyMetricsCoordinatorScanGetParams) (*ColumnFamilyMetricsCoordinatorScanGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsCoordinatorScanGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsCoordinatorScanGet", + Method: "GET", + PathPattern: "/column_family/metrics/coordinator/scan", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsCoordinatorScanGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsCoordinatorScanGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsCoordinatorScanGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGet gets estimated column count histogram + +Get estimated column count histogram +*/ +func (a *Client) ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGet(params *ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams) (*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/estimated_column_count_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsEstimatedRowCountByNameGet gets estimated row count + +Get estimated row count +*/ +func (a *Client) ColumnFamilyMetricsEstimatedRowCountByNameGet(params *ColumnFamilyMetricsEstimatedRowCountByNameGetParams) (*ColumnFamilyMetricsEstimatedRowCountByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsEstimatedRowCountByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsEstimatedRowCountByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/estimated_row_count/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsEstimatedRowCountByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsEstimatedRowCountByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsEstimatedRowCountByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGet gets estimated row size histogram + +Get estimated row size histogram +*/ +func (a *Client) ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGet(params *ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams) (*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/estimated_row_size_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGet gets index summary off heap memory used + +Get index summary off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGet(params *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams) (*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/index_summary_off_heap_memory_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGet gets all index summary off heap memory used + +Get all index summary off heap memory used +*/ +func (a *Client) ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGet(params *ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams) (*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/index_summary_off_heap_memory_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsKeyCacheHitRateByNameGet gets key cache hit rate + +Get key cache hit rate +*/ +func (a *Client) ColumnFamilyMetricsKeyCacheHitRateByNameGet(params *ColumnFamilyMetricsKeyCacheHitRateByNameGetParams) (*ColumnFamilyMetricsKeyCacheHitRateByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsKeyCacheHitRateByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsKeyCacheHitRateByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/key_cache_hit_rate/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsKeyCacheHitRateByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsKeyCacheHitRateByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsKeyCacheHitRateByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsLiveDiskSpaceUsedByNameGet gets live disk space used + +Get live disk space used +*/ +func (a *Client) ColumnFamilyMetricsLiveDiskSpaceUsedByNameGet(params *ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams) (*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsLiveDiskSpaceUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsLiveDiskSpaceUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/live_disk_space_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsLiveDiskSpaceUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsLiveDiskSpaceUsedGet gets all live disk space used + +Get all live disk space used +*/ +func (a *Client) ColumnFamilyMetricsLiveDiskSpaceUsedGet(params *ColumnFamilyMetricsLiveDiskSpaceUsedGetParams) (*ColumnFamilyMetricsLiveDiskSpaceUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsLiveDiskSpaceUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsLiveDiskSpaceUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/live_disk_space_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsLiveDiskSpaceUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsLiveDiskSpaceUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsLiveDiskSpaceUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsLiveScannedHistogramByNameGet gets live scanned histogram + +Get live scanned histogram +*/ +func (a *Client) ColumnFamilyMetricsLiveScannedHistogramByNameGet(params *ColumnFamilyMetricsLiveScannedHistogramByNameGetParams) (*ColumnFamilyMetricsLiveScannedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsLiveScannedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsLiveScannedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/live_scanned_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsLiveScannedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsLiveScannedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsLiveScannedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsLiveSsTableCountByNameGet gets live ss table count + +Get live ss table count +*/ +func (a *Client) ColumnFamilyMetricsLiveSsTableCountByNameGet(params *ColumnFamilyMetricsLiveSsTableCountByNameGetParams) (*ColumnFamilyMetricsLiveSsTableCountByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsLiveSsTableCountByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsLiveSsTableCountByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/live_ss_table_count/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsLiveSsTableCountByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsLiveSsTableCountByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsLiveSsTableCountByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsLiveSsTableCountGet gets all live ss table count + +Get all live ss table count +*/ +func (a *Client) ColumnFamilyMetricsLiveSsTableCountGet(params *ColumnFamilyMetricsLiveSsTableCountGetParams) (*ColumnFamilyMetricsLiveSsTableCountGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsLiveSsTableCountGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsLiveSsTableCountGet", + Method: "GET", + PathPattern: "/column_family/metrics/live_ss_table_count", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsLiveSsTableCountGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsLiveSsTableCountGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsLiveSsTableCountGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMaxRowSizeByNameGet gets max row size + +Get max row size +*/ +func (a *Client) ColumnFamilyMetricsMaxRowSizeByNameGet(params *ColumnFamilyMetricsMaxRowSizeByNameGetParams) (*ColumnFamilyMetricsMaxRowSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMaxRowSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMaxRowSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/max_row_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMaxRowSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMaxRowSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMaxRowSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMaxRowSizeGet gets all max row size + +Get all max row size +*/ +func (a *Client) ColumnFamilyMetricsMaxRowSizeGet(params *ColumnFamilyMetricsMaxRowSizeGetParams) (*ColumnFamilyMetricsMaxRowSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMaxRowSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMaxRowSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/max_row_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMaxRowSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMaxRowSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMaxRowSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMeanRowSizeByNameGet gets mean row size + +Get mean row size +*/ +func (a *Client) ColumnFamilyMetricsMeanRowSizeByNameGet(params *ColumnFamilyMetricsMeanRowSizeByNameGetParams) (*ColumnFamilyMetricsMeanRowSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMeanRowSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMeanRowSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/mean_row_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMeanRowSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMeanRowSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMeanRowSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMeanRowSizeGet gets all mean row size + +Get all mean row size +*/ +func (a *Client) ColumnFamilyMetricsMeanRowSizeGet(params *ColumnFamilyMetricsMeanRowSizeGetParams) (*ColumnFamilyMetricsMeanRowSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMeanRowSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMeanRowSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/mean_row_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMeanRowSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMeanRowSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMeanRowSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableColumnsCountByNameGet gets memtable columns count + +get memtable columns count +*/ +func (a *Client) ColumnFamilyMetricsMemtableColumnsCountByNameGet(params *ColumnFamilyMetricsMemtableColumnsCountByNameGetParams) (*ColumnFamilyMetricsMemtableColumnsCountByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableColumnsCountByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableColumnsCountByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_columns_count/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableColumnsCountByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableColumnsCountByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableColumnsCountByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableColumnsCountGet gets all memtable columns count + +get all memtable columns count +*/ +func (a *Client) ColumnFamilyMetricsMemtableColumnsCountGet(params *ColumnFamilyMetricsMemtableColumnsCountGetParams) (*ColumnFamilyMetricsMemtableColumnsCountGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableColumnsCountGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableColumnsCountGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_columns_count/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableColumnsCountGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableColumnsCountGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableColumnsCountGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableLiveDataSizeByNameGet gets memtable live data size + +Get the column family active memtable live data size +*/ +func (a *Client) ColumnFamilyMetricsMemtableLiveDataSizeByNameGet(params *ColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams) (*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableLiveDataSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableLiveDataSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_live_data_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableLiveDataSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableLiveDataSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableLiveDataSizeGet gets all memtable live data size + +Get all active memtable of all column family live data size +*/ +func (a *Client) ColumnFamilyMetricsMemtableLiveDataSizeGet(params *ColumnFamilyMetricsMemtableLiveDataSizeGetParams) (*ColumnFamilyMetricsMemtableLiveDataSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableLiveDataSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableLiveDataSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_live_data_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableLiveDataSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableLiveDataSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableLiveDataSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableOffHeapSizeByNameGet gets memtable off heap size + +Get the column family active memtable off heap size +*/ +func (a *Client) ColumnFamilyMetricsMemtableOffHeapSizeByNameGet(params *ColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams) (*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableOffHeapSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableOffHeapSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_off_heap_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableOffHeapSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableOffHeapSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableOffHeapSizeGet gets all memtable off heap size + +Get all active memtable of all column family off heap size +*/ +func (a *Client) ColumnFamilyMetricsMemtableOffHeapSizeGet(params *ColumnFamilyMetricsMemtableOffHeapSizeGetParams) (*ColumnFamilyMetricsMemtableOffHeapSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableOffHeapSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableOffHeapSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_off_heap_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableOffHeapSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableOffHeapSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableOffHeapSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableOnHeapSizeByNameGet gets memtable on heap size + +Get the column family active memtable on heap size +*/ +func (a *Client) ColumnFamilyMetricsMemtableOnHeapSizeByNameGet(params *ColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams) (*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableOnHeapSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableOnHeapSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_on_heap_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableOnHeapSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableOnHeapSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableOnHeapSizeGet gets all memtable on heap size + +Get all active memtable of all column family on heap size +*/ +func (a *Client) ColumnFamilyMetricsMemtableOnHeapSizeGet(params *ColumnFamilyMetricsMemtableOnHeapSizeGetParams) (*ColumnFamilyMetricsMemtableOnHeapSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableOnHeapSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableOnHeapSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_on_heap_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableOnHeapSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableOnHeapSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableOnHeapSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableSwitchCountByNameGet gets memtable switch count + +Get memtable switch count +*/ +func (a *Client) ColumnFamilyMetricsMemtableSwitchCountByNameGet(params *ColumnFamilyMetricsMemtableSwitchCountByNameGetParams) (*ColumnFamilyMetricsMemtableSwitchCountByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableSwitchCountByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableSwitchCountByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_switch_count/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableSwitchCountByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableSwitchCountByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableSwitchCountByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMemtableSwitchCountGet gets all memtable switch count + +Get all memtable switch count +*/ +func (a *Client) ColumnFamilyMetricsMemtableSwitchCountGet(params *ColumnFamilyMetricsMemtableSwitchCountGetParams) (*ColumnFamilyMetricsMemtableSwitchCountGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMemtableSwitchCountGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMemtableSwitchCountGet", + Method: "GET", + PathPattern: "/column_family/metrics/memtable_switch_count", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMemtableSwitchCountGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMemtableSwitchCountGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMemtableSwitchCountGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMinRowSizeByNameGet gets min row size + +Get min row size +*/ +func (a *Client) ColumnFamilyMetricsMinRowSizeByNameGet(params *ColumnFamilyMetricsMinRowSizeByNameGetParams) (*ColumnFamilyMetricsMinRowSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMinRowSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMinRowSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/min_row_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMinRowSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMinRowSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMinRowSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsMinRowSizeGet gets all min row size + +Get all min row size +*/ +func (a *Client) ColumnFamilyMetricsMinRowSizeGet(params *ColumnFamilyMetricsMinRowSizeGetParams) (*ColumnFamilyMetricsMinRowSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsMinRowSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsMinRowSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/min_row_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsMinRowSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsMinRowSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsMinRowSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsPendingCompactionsByNameGet gets pending compactions + +Get pending compactions +*/ +func (a *Client) ColumnFamilyMetricsPendingCompactionsByNameGet(params *ColumnFamilyMetricsPendingCompactionsByNameGetParams) (*ColumnFamilyMetricsPendingCompactionsByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsPendingCompactionsByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsPendingCompactionsByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/pending_compactions/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsPendingCompactionsByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsPendingCompactionsByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsPendingCompactionsByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsPendingCompactionsGet gets all pending compactions + +Get all pending compactions +*/ +func (a *Client) ColumnFamilyMetricsPendingCompactionsGet(params *ColumnFamilyMetricsPendingCompactionsGetParams) (*ColumnFamilyMetricsPendingCompactionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsPendingCompactionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsPendingCompactionsGet", + Method: "GET", + PathPattern: "/column_family/metrics/pending_compactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsPendingCompactionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsPendingCompactionsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsPendingCompactionsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsPendingFlushesByNameGet gets pending flushes + +Get pending flushes +*/ +func (a *Client) ColumnFamilyMetricsPendingFlushesByNameGet(params *ColumnFamilyMetricsPendingFlushesByNameGetParams) (*ColumnFamilyMetricsPendingFlushesByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsPendingFlushesByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsPendingFlushesByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/pending_flushes/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsPendingFlushesByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsPendingFlushesByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsPendingFlushesByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsPendingFlushesGet gets all pending flushes + +Get all pending flushes +*/ +func (a *Client) ColumnFamilyMetricsPendingFlushesGet(params *ColumnFamilyMetricsPendingFlushesGetParams) (*ColumnFamilyMetricsPendingFlushesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsPendingFlushesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsPendingFlushesGet", + Method: "GET", + PathPattern: "/column_family/metrics/pending_flushes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsPendingFlushesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsPendingFlushesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsPendingFlushesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRangeLatencyByNameGet gets range latency + +Get range latency +*/ +func (a *Client) ColumnFamilyMetricsRangeLatencyByNameGet(params *ColumnFamilyMetricsRangeLatencyByNameGetParams) (*ColumnFamilyMetricsRangeLatencyByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRangeLatencyByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRangeLatencyByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/range_latency/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRangeLatencyByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRangeLatencyByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRangeLatencyByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGet gets range latency estimated histogram + +Get range latency +*/ +func (a *Client) ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGet(params *ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/range_latency/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGet gets range latency estimated recent histogram + +Get range latency +*/ +func (a *Client) ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/range_latency/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRangeLatencyGet gets all range latency + +Get all range latency +*/ +func (a *Client) ColumnFamilyMetricsRangeLatencyGet(params *ColumnFamilyMetricsRangeLatencyGetParams) (*ColumnFamilyMetricsRangeLatencyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRangeLatencyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRangeLatencyGet", + Method: "GET", + PathPattern: "/column_family/metrics/range_latency", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRangeLatencyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRangeLatencyGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRangeLatencyGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadByNameGet gets read + +Get number of reads +*/ +func (a *Client) ColumnFamilyMetricsReadByNameGet(params *ColumnFamilyMetricsReadByNameGetParams) (*ColumnFamilyMetricsReadByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadGet gets all read + +Get number of reads from all column family, per shard +*/ +func (a *Client) ColumnFamilyMetricsReadGet(params *ColumnFamilyMetricsReadGetParams) (*ColumnFamilyMetricsReadGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadGet", + Method: "GET", + PathPattern: "/column_family/metrics/read/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyByNameGet gets read latency + +Get read latency +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyByNameGet(params *ColumnFamilyMetricsReadLatencyByNameGetParams) (*ColumnFamilyMetricsReadLatencyByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGet gets read latency estimated histogram + +Get read latency +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGet(params *ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGet gets read latency estimated recent histogram + +Get read latency +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyGet gets all read latency + +Get all read latency +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyGet(params *ColumnFamilyMetricsReadLatencyGetParams) (*ColumnFamilyMetricsReadLatencyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyHistogramByNameGet gets read latency histogram depricated + +Get read latency histogram +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyHistogramByNameGet(params *ColumnFamilyMetricsReadLatencyHistogramByNameGetParams) (*ColumnFamilyMetricsReadLatencyHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyHistogramGet gets all read latency histogram depricated + +Get read latency histogram from all column family +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyHistogramGet(params *ColumnFamilyMetricsReadLatencyHistogramGetParams) (*ColumnFamilyMetricsReadLatencyHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyHistogramGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGet gets read latency histogram + +Get read latency moving avrage histogram +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGet(params *ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams) (*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/moving_average_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsReadLatencyMovingAverageHistogramGet gets all read latency histogram + +Get read latency moving avrage histogram from all column family +*/ +func (a *Client) ColumnFamilyMetricsReadLatencyMovingAverageHistogramGet(params *ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams) (*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsReadLatencyMovingAverageHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsReadLatencyMovingAverageHistogramGet", + Method: "GET", + PathPattern: "/column_family/metrics/read_latency/moving_average_histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsReadLatencyMovingAverageHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGet gets recent bloom filter false positives + +Get recent bloom filter false positives +*/ +func (a *Client) ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGet(params *ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams) (*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/recent_bloom_filter_false_positives/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRecentBloomFilterFalsePositivesGet gets all recent bloom filter false positives + +Get all recent bloom filter false positives +*/ +func (a *Client) ColumnFamilyMetricsRecentBloomFilterFalsePositivesGet(params *ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams) (*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRecentBloomFilterFalsePositivesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRecentBloomFilterFalsePositivesGet", + Method: "GET", + PathPattern: "/column_family/metrics/recent_bloom_filter_false_positives", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRecentBloomFilterFalsePositivesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGet gets recent bloom filter false ratio + +Get recent bloom filter false ratio +*/ +func (a *Client) ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGet(params *ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams) (*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/recent_bloom_filter_false_ratio/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRecentBloomFilterFalseRatioGet gets all recent bloom filter false ratio + +Get all recent bloom filter false ratio +*/ +func (a *Client) ColumnFamilyMetricsRecentBloomFilterFalseRatioGet(params *ColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams) (*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRecentBloomFilterFalseRatioGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRecentBloomFilterFalseRatioGet", + Method: "GET", + PathPattern: "/column_family/metrics/recent_bloom_filter_false_ratio", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRecentBloomFilterFalseRatioGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRecentBloomFilterFalseRatioGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheHitByNameGet gets row cache hit + +Get row cache hit +*/ +func (a *Client) ColumnFamilyMetricsRowCacheHitByNameGet(params *ColumnFamilyMetricsRowCacheHitByNameGetParams) (*ColumnFamilyMetricsRowCacheHitByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheHitByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheHitByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_hit/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheHitByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheHitByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheHitByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheHitGet gets all row cache hit + +Get all row cache hit +*/ +func (a *Client) ColumnFamilyMetricsRowCacheHitGet(params *ColumnFamilyMetricsRowCacheHitGetParams) (*ColumnFamilyMetricsRowCacheHitGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheHitGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheHitGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_hit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheHitGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheHitGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheHitGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGet gets row cache hit out of range + +Get row cache hit out of range +*/ +func (a *Client) ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGet(params *ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams) (*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_hit_out_of_range/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheHitOutOfRangeGet gets all row cache hit out of range + +Get all row cache hit out of range +*/ +func (a *Client) ColumnFamilyMetricsRowCacheHitOutOfRangeGet(params *ColumnFamilyMetricsRowCacheHitOutOfRangeGetParams) (*ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheHitOutOfRangeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheHitOutOfRangeGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_hit_out_of_range", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheHitOutOfRangeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheHitOutOfRangeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheHitOutOfRangeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheMissByNameGet gets row cache miss + +Get row cache miss +*/ +func (a *Client) ColumnFamilyMetricsRowCacheMissByNameGet(params *ColumnFamilyMetricsRowCacheMissByNameGetParams) (*ColumnFamilyMetricsRowCacheMissByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheMissByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheMissByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_miss/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheMissByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheMissByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheMissByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsRowCacheMissGet gets all row cache miss + +Get all row cache miss +*/ +func (a *Client) ColumnFamilyMetricsRowCacheMissGet(params *ColumnFamilyMetricsRowCacheMissGetParams) (*ColumnFamilyMetricsRowCacheMissGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsRowCacheMissGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsRowCacheMissGet", + Method: "GET", + PathPattern: "/column_family/metrics/row_cache_miss", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsRowCacheMissGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsRowCacheMissGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsRowCacheMissGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsSnapshotsSizeByNameGet gets true snapshots size + +Get true snapshots size +*/ +func (a *Client) ColumnFamilyMetricsSnapshotsSizeByNameGet(params *ColumnFamilyMetricsSnapshotsSizeByNameGetParams) (*ColumnFamilyMetricsSnapshotsSizeByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsSnapshotsSizeByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsSnapshotsSizeByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/snapshots_size/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsSnapshotsSizeByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsSnapshotsSizeByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsSnapshotsSizeByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsSpeculativeRetriesByNameGet gets speculative retries + +Get speculative retries +*/ +func (a *Client) ColumnFamilyMetricsSpeculativeRetriesByNameGet(params *ColumnFamilyMetricsSpeculativeRetriesByNameGetParams) (*ColumnFamilyMetricsSpeculativeRetriesByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsSpeculativeRetriesByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsSpeculativeRetriesByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/speculative_retries/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsSpeculativeRetriesByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsSpeculativeRetriesByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsSpeculativeRetriesByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsSpeculativeRetriesGet gets all speculative retries + +Get all speculative retries +*/ +func (a *Client) ColumnFamilyMetricsSpeculativeRetriesGet(params *ColumnFamilyMetricsSpeculativeRetriesGetParams) (*ColumnFamilyMetricsSpeculativeRetriesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsSpeculativeRetriesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsSpeculativeRetriesGet", + Method: "GET", + PathPattern: "/column_family/metrics/speculative_retries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsSpeculativeRetriesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsSpeculativeRetriesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsSpeculativeRetriesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsSstablesPerReadHistogramByNameGet gets sstables per read histogram + +Get sstables per read histogram +*/ +func (a *Client) ColumnFamilyMetricsSstablesPerReadHistogramByNameGet(params *ColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams) (*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsSstablesPerReadHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsSstablesPerReadHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/sstables_per_read_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsSstablesPerReadHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsSstablesPerReadHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsTombstoneScannedHistogramByNameGet gets tombstone scanned histogram + +Get tombstone scanned histogram +*/ +func (a *Client) ColumnFamilyMetricsTombstoneScannedHistogramByNameGet(params *ColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams) (*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsTombstoneScannedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsTombstoneScannedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/tombstone_scanned_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsTombstoneScannedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsTombstoneScannedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsTotalDiskSpaceUsedByNameGet gets total disk space used + +Get total disk space used +*/ +func (a *Client) ColumnFamilyMetricsTotalDiskSpaceUsedByNameGet(params *ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams) (*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsTotalDiskSpaceUsedByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsTotalDiskSpaceUsedByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/total_disk_space_used/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsTotalDiskSpaceUsedByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsTotalDiskSpaceUsedGet gets all total disk space used + +Get all total disk space used +*/ +func (a *Client) ColumnFamilyMetricsTotalDiskSpaceUsedGet(params *ColumnFamilyMetricsTotalDiskSpaceUsedGetParams) (*ColumnFamilyMetricsTotalDiskSpaceUsedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsTotalDiskSpaceUsedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsTotalDiskSpaceUsedGet", + Method: "GET", + PathPattern: "/column_family/metrics/total_disk_space_used", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsTotalDiskSpaceUsedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsTotalDiskSpaceUsedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsTotalDiskSpaceUsedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsTrueSnapshotsSizeGet gets all true snapshots size + +Get all true snapshots size +*/ +func (a *Client) ColumnFamilyMetricsTrueSnapshotsSizeGet(params *ColumnFamilyMetricsTrueSnapshotsSizeGetParams) (*ColumnFamilyMetricsTrueSnapshotsSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsTrueSnapshotsSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsTrueSnapshotsSizeGet", + Method: "GET", + PathPattern: "/column_family/metrics/true_snapshots_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsTrueSnapshotsSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsTrueSnapshotsSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsTrueSnapshotsSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWaitingOnFreeMemtableGet gets waiting on free memtable space + +Get waiting on free memtable space +*/ +func (a *Client) ColumnFamilyMetricsWaitingOnFreeMemtableGet(params *ColumnFamilyMetricsWaitingOnFreeMemtableGetParams) (*ColumnFamilyMetricsWaitingOnFreeMemtableGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWaitingOnFreeMemtableGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWaitingOnFreeMemtableGet", + Method: "GET", + PathPattern: "/column_family/metrics/waiting_on_free_memtable", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWaitingOnFreeMemtableGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWaitingOnFreeMemtableGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWaitingOnFreeMemtableGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteByNameGet gets write + +Get number of writes +*/ +func (a *Client) ColumnFamilyMetricsWriteByNameGet(params *ColumnFamilyMetricsWriteByNameGetParams) (*ColumnFamilyMetricsWriteByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteGet gets all write + +Get number of writes from all column family, per shard +*/ +func (a *Client) ColumnFamilyMetricsWriteGet(params *ColumnFamilyMetricsWriteGetParams) (*ColumnFamilyMetricsWriteGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteGet", + Method: "GET", + PathPattern: "/column_family/metrics/write/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyByNameGet gets write latency + +Get write latency +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyByNameGet(params *ColumnFamilyMetricsWriteLatencyByNameGetParams) (*ColumnFamilyMetricsWriteLatencyByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGet gets write latency estimated histogram + +Get write latency +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGet(params *ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams) (*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/estimated_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGet gets write latency estimated recent histogram + +Get write latency +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGet(params *ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams) (*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/estimated_recent_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyGet gets all write latency + +Get all write latency +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyGet(params *ColumnFamilyMetricsWriteLatencyGetParams) (*ColumnFamilyMetricsWriteLatencyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyHistogramByNameGet gets write latency histogram depricated + +Get write latency histogram +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyHistogramByNameGet(params *ColumnFamilyMetricsWriteLatencyHistogramByNameGetParams) (*ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyHistogramGet gets all write latency histogram depricated + +Get write latency histogram of all column family +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyHistogramGet(params *ColumnFamilyMetricsWriteLatencyHistogramGetParams) (*ColumnFamilyMetricsWriteLatencyHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyHistogramGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGet gets write latency histogram + +Get write latency moving average histogram +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGet(params *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams) (*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/moving_average_histogram/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGet gets all write latency histogram + +Get write latency moving average histogram of all column family +*/ +func (a *Client) ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGet(params *ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams) (*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGet", + Method: "GET", + PathPattern: "/column_family/metrics/write_latency/moving_average_histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMinimumCompactionByNameGet gets minimum compaction threshold + +get the minimum number of sstables in queue before compaction kicks off +*/ +func (a *Client) ColumnFamilyMinimumCompactionByNameGet(params *ColumnFamilyMinimumCompactionByNameGetParams) (*ColumnFamilyMinimumCompactionByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMinimumCompactionByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMinimumCompactionByNameGet", + Method: "GET", + PathPattern: "/column_family/minimum_compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMinimumCompactionByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMinimumCompactionByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMinimumCompactionByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyMinimumCompactionByNamePost sets minimum compaction threshold + +Sets the minimum number of sstables in queue before compaction kicks off +*/ +func (a *Client) ColumnFamilyMinimumCompactionByNamePost(params *ColumnFamilyMinimumCompactionByNamePostParams) (*ColumnFamilyMinimumCompactionByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyMinimumCompactionByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyMinimumCompactionByNamePost", + Method: "POST", + PathPattern: "/column_family/minimum_compaction/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyMinimumCompactionByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyMinimumCompactionByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyMinimumCompactionByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyNameGet gets column family name + +Get a list of all column family names +*/ +func (a *Client) ColumnFamilyNameGet(params *ColumnFamilyNameGetParams) (*ColumnFamilyNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyNameGet", + Method: "GET", + PathPattern: "/column_family/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilyNameKeyspaceGet gets column family name keyspace + +Get a list of the key space names +*/ +func (a *Client) ColumnFamilyNameKeyspaceGet(params *ColumnFamilyNameKeyspaceGetParams) (*ColumnFamilyNameKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilyNameKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilyNameKeyspaceGet", + Method: "GET", + PathPattern: "/column_family/name/keyspace", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilyNameKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilyNameKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilyNameKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilySstablesByKeyByNameGet gets sstables for key + +Returns a list of sstable filenames that contain the given partition key on this node +*/ +func (a *Client) ColumnFamilySstablesByKeyByNameGet(params *ColumnFamilySstablesByKeyByNameGetParams) (*ColumnFamilySstablesByKeyByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilySstablesByKeyByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilySstablesByKeyByNameGet", + Method: "GET", + PathPattern: "/column_family/sstables/by_key/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilySstablesByKeyByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilySstablesByKeyByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilySstablesByKeyByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilySstablesPerLevelByNameGet gets sstable count per level + +sstable count for each level. empty unless leveled compaction is used +*/ +func (a *Client) ColumnFamilySstablesPerLevelByNameGet(params *ColumnFamilySstablesPerLevelByNameGetParams) (*ColumnFamilySstablesPerLevelByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilySstablesPerLevelByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilySstablesPerLevelByNameGet", + Method: "GET", + PathPattern: "/column_family/sstables/per_level/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilySstablesPerLevelByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilySstablesPerLevelByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilySstablesPerLevelByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ColumnFamilySstablesUnleveledByNameGet gets unleveled sstables + +the number of SSTables in L0. Always return 0 if Leveled compaction is not enabled. +*/ +func (a *Client) ColumnFamilySstablesUnleveledByNameGet(params *ColumnFamilySstablesUnleveledByNameGetParams) (*ColumnFamilySstablesUnleveledByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewColumnFamilySstablesUnleveledByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "ColumnFamilySstablesUnleveledByNameGet", + Method: "GET", + PathPattern: "/column_family/sstables/unleveled/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ColumnFamilySstablesUnleveledByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*ColumnFamilySstablesUnleveledByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ColumnFamilySstablesUnleveledByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitLogMetricsWaitingOnCommitGet gets waiting on commit + +Get waiting on commit +*/ +func (a *Client) CommitLogMetricsWaitingOnCommitGet(params *CommitLogMetricsWaitingOnCommitGetParams) (*CommitLogMetricsWaitingOnCommitGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitLogMetricsWaitingOnCommitGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitLogMetricsWaitingOnCommitGet", + Method: "GET", + PathPattern: "/commit_log/metrics/waiting_on_commit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitLogMetricsWaitingOnCommitGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitLogMetricsWaitingOnCommitGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitLogMetricsWaitingOnCommitGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitLogMetricsWaitingOnSegmentAllocationGet gets waiting on segment allocation + +Get waiting on segment allocation +*/ +func (a *Client) CommitLogMetricsWaitingOnSegmentAllocationGet(params *CommitLogMetricsWaitingOnSegmentAllocationGetParams) (*CommitLogMetricsWaitingOnSegmentAllocationGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitLogMetricsWaitingOnSegmentAllocationGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitLogMetricsWaitingOnSegmentAllocationGet", + Method: "GET", + PathPattern: "/commit_log/metrics/waiting_on_segment_allocation", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitLogMetricsWaitingOnSegmentAllocationGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitLogMetricsWaitingOnSegmentAllocationGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitLogMetricsWaitingOnSegmentAllocationGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogMetricsCompletedTasksGet gets completed tasks + +Get completed tasks +*/ +func (a *Client) CommitlogMetricsCompletedTasksGet(params *CommitlogMetricsCompletedTasksGetParams) (*CommitlogMetricsCompletedTasksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogMetricsCompletedTasksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogMetricsCompletedTasksGet", + Method: "GET", + PathPattern: "/commitlog/metrics/completed_tasks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogMetricsCompletedTasksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogMetricsCompletedTasksGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogMetricsCompletedTasksGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogMetricsPendingTasksGet gets pending tasks + +Get pending tasks +*/ +func (a *Client) CommitlogMetricsPendingTasksGet(params *CommitlogMetricsPendingTasksGetParams) (*CommitlogMetricsPendingTasksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogMetricsPendingTasksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogMetricsPendingTasksGet", + Method: "GET", + PathPattern: "/commitlog/metrics/pending_tasks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogMetricsPendingTasksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogMetricsPendingTasksGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogMetricsPendingTasksGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogMetricsTotalCommitLogSizeGet gets total commit log size + +Get total commit log size +*/ +func (a *Client) CommitlogMetricsTotalCommitLogSizeGet(params *CommitlogMetricsTotalCommitLogSizeGetParams) (*CommitlogMetricsTotalCommitLogSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogMetricsTotalCommitLogSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogMetricsTotalCommitLogSizeGet", + Method: "GET", + PathPattern: "/commitlog/metrics/total_commit_log_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogMetricsTotalCommitLogSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogMetricsTotalCommitLogSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogMetricsTotalCommitLogSizeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogRecoverByPathPost commitlogs recover + +Recover a single file +*/ +func (a *Client) CommitlogRecoverByPathPost(params *CommitlogRecoverByPathPostParams) (*CommitlogRecoverByPathPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogRecoverByPathPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogRecoverByPathPost", + Method: "POST", + PathPattern: "/commitlog/recover/{path}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogRecoverByPathPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogRecoverByPathPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogRecoverByPathPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogSegmentsActiveGet gets active segment names + +file names (not full paths) of active commit log segments (segments containing unflushed data) +*/ +func (a *Client) CommitlogSegmentsActiveGet(params *CommitlogSegmentsActiveGetParams) (*CommitlogSegmentsActiveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogSegmentsActiveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogSegmentsActiveGet", + Method: "GET", + PathPattern: "/commitlog/segments/active", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogSegmentsActiveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogSegmentsActiveGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogSegmentsActiveGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CommitlogSegmentsArchivingGet gets archiving segment names + +Returns files which are pending for archival attempt. Does NOT include failed archive attempts +*/ +func (a *Client) CommitlogSegmentsArchivingGet(params *CommitlogSegmentsArchivingGetParams) (*CommitlogSegmentsArchivingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCommitlogSegmentsArchivingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CommitlogSegmentsArchivingGet", + Method: "GET", + PathPattern: "/commitlog/segments/archiving", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CommitlogSegmentsArchivingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CommitlogSegmentsArchivingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CommitlogSegmentsArchivingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerCompactionHistoryGet gets compaction history + +get List of the compaction history +*/ +func (a *Client) CompactionManagerCompactionHistoryGet(params *CompactionManagerCompactionHistoryGetParams) (*CompactionManagerCompactionHistoryGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerCompactionHistoryGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerCompactionHistoryGet", + Method: "GET", + PathPattern: "/compaction_manager/compaction_history", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerCompactionHistoryGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerCompactionHistoryGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerCompactionHistoryGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerCompactionInfoGet gets compaction info + +get a list of all active compaction info +*/ +func (a *Client) CompactionManagerCompactionInfoGet(params *CompactionManagerCompactionInfoGetParams) (*CompactionManagerCompactionInfoGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerCompactionInfoGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerCompactionInfoGet", + Method: "GET", + PathPattern: "/compaction_manager/compaction_info", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerCompactionInfoGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerCompactionInfoGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerCompactionInfoGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerCompactionsGet gets compactions + +get List of running compactions +*/ +func (a *Client) CompactionManagerCompactionsGet(params *CompactionManagerCompactionsGetParams) (*CompactionManagerCompactionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerCompactionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerCompactionsGet", + Method: "GET", + PathPattern: "/compaction_manager/compactions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerCompactionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerCompactionsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerCompactionsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerForceUserDefinedCompactionPost forces user defined compaction + +Triggers the compaction of user specified sstables. You can specify files from various keyspaces and columnfamilies. If you do so, user defined compaction is performed several times to the groups of files in the same keyspace/columnfamily. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself. +*/ +func (a *Client) CompactionManagerForceUserDefinedCompactionPost(params *CompactionManagerForceUserDefinedCompactionPostParams) (*CompactionManagerForceUserDefinedCompactionPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerForceUserDefinedCompactionPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerForceUserDefinedCompactionPost", + Method: "POST", + PathPattern: "/compaction_manager/force_user_defined_compaction", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerForceUserDefinedCompactionPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerForceUserDefinedCompactionPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerForceUserDefinedCompactionPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerMetricsBytesCompactedGet gets bytes compacted + +Get bytes compacted +*/ +func (a *Client) CompactionManagerMetricsBytesCompactedGet(params *CompactionManagerMetricsBytesCompactedGetParams) (*CompactionManagerMetricsBytesCompactedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerMetricsBytesCompactedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerMetricsBytesCompactedGet", + Method: "GET", + PathPattern: "/compaction_manager/metrics/bytes_compacted", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerMetricsBytesCompactedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerMetricsBytesCompactedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerMetricsBytesCompactedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerMetricsCompletedTasksGet gets completed tasks1 + +Get completed tasks +*/ +func (a *Client) CompactionManagerMetricsCompletedTasksGet(params *CompactionManagerMetricsCompletedTasksGetParams) (*CompactionManagerMetricsCompletedTasksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerMetricsCompletedTasksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerMetricsCompletedTasksGet", + Method: "GET", + PathPattern: "/compaction_manager/metrics/completed_tasks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerMetricsCompletedTasksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerMetricsCompletedTasksGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerMetricsCompletedTasksGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerMetricsPendingTasksGet gets pending tasks1 + +Get pending tasks +*/ +func (a *Client) CompactionManagerMetricsPendingTasksGet(params *CompactionManagerMetricsPendingTasksGetParams) (*CompactionManagerMetricsPendingTasksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerMetricsPendingTasksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerMetricsPendingTasksGet", + Method: "GET", + PathPattern: "/compaction_manager/metrics/pending_tasks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerMetricsPendingTasksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerMetricsPendingTasksGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerMetricsPendingTasksGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerMetricsTotalCompactionsCompletedGet gets total compactions completed + +Get total compactions completed +*/ +func (a *Client) CompactionManagerMetricsTotalCompactionsCompletedGet(params *CompactionManagerMetricsTotalCompactionsCompletedGetParams) (*CompactionManagerMetricsTotalCompactionsCompletedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerMetricsTotalCompactionsCompletedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerMetricsTotalCompactionsCompletedGet", + Method: "GET", + PathPattern: "/compaction_manager/metrics/total_compactions_completed", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerMetricsTotalCompactionsCompletedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerMetricsTotalCompactionsCompletedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerMetricsTotalCompactionsCompletedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +CompactionManagerStopCompactionPost stops compaction + +Stop all running compaction-like tasks having the provided type +*/ +func (a *Client) CompactionManagerStopCompactionPost(params *CompactionManagerStopCompactionPostParams) (*CompactionManagerStopCompactionPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCompactionManagerStopCompactionPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CompactionManagerStopCompactionPost", + Method: "POST", + PathPattern: "/compaction_manager/stop_compaction", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CompactionManagerStopCompactionPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CompactionManagerStopCompactionPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CompactionManagerStopCompactionPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorCountEndpointDownGet gets down endpoint count + +Get count down endpoint +*/ +func (a *Client) FailureDetectorCountEndpointDownGet(params *FailureDetectorCountEndpointDownGetParams) (*FailureDetectorCountEndpointDownGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorCountEndpointDownGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorCountEndpointDownGet", + Method: "GET", + PathPattern: "/failure_detector/count/endpoint/down", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorCountEndpointDownGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorCountEndpointDownGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorCountEndpointDownGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorCountEndpointUpGet gets up endpoint count + +Get count up endpoint +*/ +func (a *Client) FailureDetectorCountEndpointUpGet(params *FailureDetectorCountEndpointUpGetParams) (*FailureDetectorCountEndpointUpGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorCountEndpointUpGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorCountEndpointUpGet", + Method: "GET", + PathPattern: "/failure_detector/count/endpoint/up", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorCountEndpointUpGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorCountEndpointUpGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorCountEndpointUpGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorEndpointPhiValuesGet gets endpoint phi values + +Get end point phi values +*/ +func (a *Client) FailureDetectorEndpointPhiValuesGet(params *FailureDetectorEndpointPhiValuesGetParams) (*FailureDetectorEndpointPhiValuesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorEndpointPhiValuesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorEndpointPhiValuesGet", + Method: "GET", + PathPattern: "/failure_detector/endpoint_phi_values", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorEndpointPhiValuesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorEndpointPhiValuesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorEndpointPhiValuesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorEndpointsGet gets all endpoint states + +Get all endpoint states +*/ +func (a *Client) FailureDetectorEndpointsGet(params *FailureDetectorEndpointsGetParams) (*FailureDetectorEndpointsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorEndpointsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorEndpointsGet", + Method: "GET", + PathPattern: "/failure_detector/endpoints/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorEndpointsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorEndpointsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorEndpointsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorEndpointsStatesByAddrGet gets endpoint state + +Get endpoint states +*/ +func (a *Client) FailureDetectorEndpointsStatesByAddrGet(params *FailureDetectorEndpointsStatesByAddrGetParams) (*FailureDetectorEndpointsStatesByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorEndpointsStatesByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorEndpointsStatesByAddrGet", + Method: "GET", + PathPattern: "/failure_detector/endpoints/states/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorEndpointsStatesByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorEndpointsStatesByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorEndpointsStatesByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorPhiGet gets phi convict threshold + +Get the phi convict threshold +*/ +func (a *Client) FailureDetectorPhiGet(params *FailureDetectorPhiGetParams) (*FailureDetectorPhiGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorPhiGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorPhiGet", + Method: "GET", + PathPattern: "/failure_detector/phi", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorPhiGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorPhiGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorPhiGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorPhiPost sets phi convict threshold + +Set the phi convict threshold +*/ +func (a *Client) FailureDetectorPhiPost(params *FailureDetectorPhiPostParams) (*FailureDetectorPhiPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorPhiPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorPhiPost", + Method: "POST", + PathPattern: "/failure_detector/phi", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorPhiPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorPhiPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorPhiPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FailureDetectorSimpleStatesGet gets simple states + +Get simple_states +*/ +func (a *Client) FailureDetectorSimpleStatesGet(params *FailureDetectorSimpleStatesGetParams) (*FailureDetectorSimpleStatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFailureDetectorSimpleStatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "FailureDetectorSimpleStatesGet", + Method: "GET", + PathPattern: "/failure_detector/simple_states", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FailureDetectorSimpleStatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FailureDetectorSimpleStatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FailureDetectorSimpleStatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperAssassinateByAddrPost assassinates endpoint + +Assassinate an end point +*/ +func (a *Client) GossiperAssassinateByAddrPost(params *GossiperAssassinateByAddrPostParams) (*GossiperAssassinateByAddrPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperAssassinateByAddrPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperAssassinateByAddrPost", + Method: "POST", + PathPattern: "/gossiper/assassinate/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperAssassinateByAddrPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperAssassinateByAddrPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperAssassinateByAddrPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperDowntimeByAddrGet gets endpoint downtime + +Get the downtime of an end point +*/ +func (a *Client) GossiperDowntimeByAddrGet(params *GossiperDowntimeByAddrGetParams) (*GossiperDowntimeByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperDowntimeByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperDowntimeByAddrGet", + Method: "GET", + PathPattern: "/gossiper/downtime/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperDowntimeByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperDowntimeByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperDowntimeByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperEndpointDownGet gets down endpoint + +Get the addreses of the down endpoints +*/ +func (a *Client) GossiperEndpointDownGet(params *GossiperEndpointDownGetParams) (*GossiperEndpointDownGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperEndpointDownGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperEndpointDownGet", + Method: "GET", + PathPattern: "/gossiper/endpoint/down/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperEndpointDownGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperEndpointDownGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperEndpointDownGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperEndpointLiveGet gets live endpoint + +Get the addreses of live endpoints +*/ +func (a *Client) GossiperEndpointLiveGet(params *GossiperEndpointLiveGetParams) (*GossiperEndpointLiveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperEndpointLiveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperEndpointLiveGet", + Method: "GET", + PathPattern: "/gossiper/endpoint/live/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperEndpointLiveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperEndpointLiveGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperEndpointLiveGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperGenerationNumberByAddrGet gets current generation number + +Returns files which are pending for archival attempt. Does NOT include failed archive attempts +*/ +func (a *Client) GossiperGenerationNumberByAddrGet(params *GossiperGenerationNumberByAddrGetParams) (*GossiperGenerationNumberByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperGenerationNumberByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperGenerationNumberByAddrGet", + Method: "GET", + PathPattern: "/gossiper/generation_number/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperGenerationNumberByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperGenerationNumberByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperGenerationNumberByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +GossiperHeartBeatVersionByAddrGet gets current heart beat version + +Get heart beat version for a node +*/ +func (a *Client) GossiperHeartBeatVersionByAddrGet(params *GossiperHeartBeatVersionByAddrGetParams) (*GossiperHeartBeatVersionByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewGossiperHeartBeatVersionByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "GossiperHeartBeatVersionByAddrGet", + Method: "GET", + PathPattern: "/gossiper/heart_beat_version/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &GossiperHeartBeatVersionByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*GossiperHeartBeatVersionByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*GossiperHeartBeatVersionByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffHintsDelete truncates all hints + +Truncate all the hints +*/ +func (a *Client) HintedHandoffHintsDelete(params *HintedHandoffHintsDeleteParams) (*HintedHandoffHintsDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffHintsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffHintsDelete", + Method: "DELETE", + PathPattern: "/hinted_handoff/hints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffHintsDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffHintsDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffHintsDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffHintsGet lists endpoints pending hints + +List all the endpoints that this node has hints for. +*/ +func (a *Client) HintedHandoffHintsGet(params *HintedHandoffHintsGetParams) (*HintedHandoffHintsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffHintsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffHintsGet", + Method: "GET", + PathPattern: "/hinted_handoff/hints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffHintsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffHintsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffHintsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffMetricsCreateHintByAddrGet gets create hint count + +Get create hint count +*/ +func (a *Client) HintedHandoffMetricsCreateHintByAddrGet(params *HintedHandoffMetricsCreateHintByAddrGetParams) (*HintedHandoffMetricsCreateHintByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffMetricsCreateHintByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffMetricsCreateHintByAddrGet", + Method: "GET", + PathPattern: "/hinted_handoff/metrics/create_hint/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffMetricsCreateHintByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffMetricsCreateHintByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffMetricsCreateHintByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffMetricsNotStoredHintsByAddrGet gets not stored hints count + +Get not stored hints count +*/ +func (a *Client) HintedHandoffMetricsNotStoredHintsByAddrGet(params *HintedHandoffMetricsNotStoredHintsByAddrGetParams) (*HintedHandoffMetricsNotStoredHintsByAddrGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffMetricsNotStoredHintsByAddrGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffMetricsNotStoredHintsByAddrGet", + Method: "GET", + PathPattern: "/hinted_handoff/metrics/not_stored_hints/{addr}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffMetricsNotStoredHintsByAddrGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffMetricsNotStoredHintsByAddrGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffMetricsNotStoredHintsByAddrGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffPausePost pauses hints delivery + +pause hints delivery +*/ +func (a *Client) HintedHandoffPausePost(params *HintedHandoffPausePostParams) (*HintedHandoffPausePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffPausePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffPausePost", + Method: "POST", + PathPattern: "/hinted_handoff/pause", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffPausePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffPausePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffPausePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +HintedHandoffSchedulePost schedules hint delivery + +force hint delivery to an endpoint +*/ +func (a *Client) HintedHandoffSchedulePost(params *HintedHandoffSchedulePostParams) (*HintedHandoffSchedulePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewHintedHandoffSchedulePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "HintedHandoffSchedulePost", + Method: "POST", + PathPattern: "/hinted_handoff/schedule", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &HintedHandoffSchedulePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*HintedHandoffSchedulePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*HintedHandoffSchedulePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +LsaCompactPost lsas compact + +Force compaction of all regions +*/ +func (a *Client) LsaCompactPost(params *LsaCompactPostParams) (*LsaCompactPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLsaCompactPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "LsaCompactPost", + Method: "POST", + PathPattern: "/lsa/compact", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &LsaCompactPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*LsaCompactPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*LsaCompactPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesDroppedByVerGet gets dropped messages by ver + +Get the number of dropped messages per verb +*/ +func (a *Client) MessagingServiceMessagesDroppedByVerGet(params *MessagingServiceMessagesDroppedByVerGetParams) (*MessagingServiceMessagesDroppedByVerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesDroppedByVerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesDroppedByVerGet", + Method: "GET", + PathPattern: "/messaging_service/messages/dropped_by_ver", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesDroppedByVerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesDroppedByVerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesDroppedByVerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesDroppedGet gets dropped messages + +Get the number of messages that were dropped before sending +*/ +func (a *Client) MessagingServiceMessagesDroppedGet(params *MessagingServiceMessagesDroppedGetParams) (*MessagingServiceMessagesDroppedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesDroppedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesDroppedGet", + Method: "GET", + PathPattern: "/messaging_service/messages/dropped", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesDroppedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesDroppedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesDroppedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesExceptionGet gets exception messages + +Get the number of messages return with an exception +*/ +func (a *Client) MessagingServiceMessagesExceptionGet(params *MessagingServiceMessagesExceptionGetParams) (*MessagingServiceMessagesExceptionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesExceptionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesExceptionGet", + Method: "GET", + PathPattern: "/messaging_service/messages/exception", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesExceptionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesExceptionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesExceptionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesPendingGet gets pending messages + +Get the number of pending messages +*/ +func (a *Client) MessagingServiceMessagesPendingGet(params *MessagingServiceMessagesPendingGetParams) (*MessagingServiceMessagesPendingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesPendingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesPendingGet", + Method: "GET", + PathPattern: "/messaging_service/messages/pending", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesPendingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesPendingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesPendingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesRepliedGet gets completed messages + +Get the number of replied messages +*/ +func (a *Client) MessagingServiceMessagesRepliedGet(params *MessagingServiceMessagesRepliedGetParams) (*MessagingServiceMessagesRepliedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesRepliedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesRepliedGet", + Method: "GET", + PathPattern: "/messaging_service/messages/replied", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesRepliedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesRepliedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesRepliedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesRespondCompletedGet gets respond completed messages + +Get the number of completed respond messages +*/ +func (a *Client) MessagingServiceMessagesRespondCompletedGet(params *MessagingServiceMessagesRespondCompletedGetParams) (*MessagingServiceMessagesRespondCompletedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesRespondCompletedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesRespondCompletedGet", + Method: "GET", + PathPattern: "/messaging_service/messages/respond_completed", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesRespondCompletedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesRespondCompletedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesRespondCompletedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesRespondPendingGet gets respond pending messages + +Get the number of messages waiting for respond +*/ +func (a *Client) MessagingServiceMessagesRespondPendingGet(params *MessagingServiceMessagesRespondPendingGetParams) (*MessagingServiceMessagesRespondPendingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesRespondPendingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesRespondPendingGet", + Method: "GET", + PathPattern: "/messaging_service/messages/respond_pending", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesRespondPendingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesRespondPendingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesRespondPendingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesSentGet gets sent messages + +Get the number of sent messages +*/ +func (a *Client) MessagingServiceMessagesSentGet(params *MessagingServiceMessagesSentGetParams) (*MessagingServiceMessagesSentGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesSentGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesSentGet", + Method: "GET", + PathPattern: "/messaging_service/messages/sent", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesSentGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesSentGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesSentGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceMessagesTimeoutGet gets timeout messages + +Get the number of timeout messages +*/ +func (a *Client) MessagingServiceMessagesTimeoutGet(params *MessagingServiceMessagesTimeoutGetParams) (*MessagingServiceMessagesTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceMessagesTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceMessagesTimeoutGet", + Method: "GET", + PathPattern: "/messaging_service/messages/timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceMessagesTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceMessagesTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceMessagesTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +MessagingServiceVersionGet gets version + +Get the version number +*/ +func (a *Client) MessagingServiceVersionGet(params *MessagingServiceVersionGetParams) (*MessagingServiceVersionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewMessagingServiceVersionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "MessagingServiceVersionGet", + Method: "GET", + PathPattern: "/messaging_service/version", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &MessagingServiceVersionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*MessagingServiceVersionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*MessagingServiceVersionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SnitchDatacenterGet gets datacenter + +Provides the Datacenter name depending on the respective snitch used, given the hostname/ip +*/ +func (a *Client) SnitchDatacenterGet(params *SnitchDatacenterGetParams) (*SnitchDatacenterGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSnitchDatacenterGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SnitchDatacenterGet", + Method: "GET", + PathPattern: "/snitch/datacenter", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SnitchDatacenterGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SnitchDatacenterGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SnitchDatacenterGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SnitchNameGet gets snitch name + +Provides the snitch name of the cluster +*/ +func (a *Client) SnitchNameGet(params *SnitchNameGetParams) (*SnitchNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSnitchNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SnitchNameGet", + Method: "GET", + PathPattern: "/snitch/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SnitchNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SnitchNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SnitchNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SnitchRackGet gets rack + +Provides the Rack name depending on the respective snitch used, given the host name/ip +*/ +func (a *Client) SnitchRackGet(params *SnitchRackGetParams) (*SnitchRackGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSnitchRackGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SnitchRackGet", + Method: "GET", + PathPattern: "/snitch/rack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SnitchRackGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SnitchRackGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SnitchRackGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyCasContentionTimeoutGet gets cas contention timeout + +Get CAS contention timeout in seconds +*/ +func (a *Client) StorageProxyCasContentionTimeoutGet(params *StorageProxyCasContentionTimeoutGetParams) (*StorageProxyCasContentionTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyCasContentionTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyCasContentionTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/cas_contention_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyCasContentionTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyCasContentionTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyCasContentionTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyCasContentionTimeoutPost sets cas contention timeout + +Set CAS contention timeout +*/ +func (a *Client) StorageProxyCasContentionTimeoutPost(params *StorageProxyCasContentionTimeoutPostParams) (*StorageProxyCasContentionTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyCasContentionTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyCasContentionTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/cas_contention_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyCasContentionTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyCasContentionTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyCasContentionTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyCounterWriteRPCTimeoutGet gets counter write rpc timeout + +Get counter write rpc timeout in seconds +*/ +func (a *Client) StorageProxyCounterWriteRPCTimeoutGet(params *StorageProxyCounterWriteRPCTimeoutGetParams) (*StorageProxyCounterWriteRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyCounterWriteRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyCounterWriteRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/counter_write_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyCounterWriteRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyCounterWriteRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyCounterWriteRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyCounterWriteRPCTimeoutPost sets counter write rpc timeout + +Set counter write rpc timeout +*/ +func (a *Client) StorageProxyCounterWriteRPCTimeoutPost(params *StorageProxyCounterWriteRPCTimeoutPostParams) (*StorageProxyCounterWriteRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyCounterWriteRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyCounterWriteRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/counter_write_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyCounterWriteRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyCounterWriteRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyCounterWriteRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyHintedHandoffEnabledByDcGet gets hinted handoff enabled by dc + +Get the hinted handoff enabled by dc +*/ +func (a *Client) StorageProxyHintedHandoffEnabledByDcGet(params *StorageProxyHintedHandoffEnabledByDcGetParams) (*StorageProxyHintedHandoffEnabledByDcGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyHintedHandoffEnabledByDcGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyHintedHandoffEnabledByDcGet", + Method: "GET", + PathPattern: "/storage_proxy/hinted_handoff_enabled_by_dc", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyHintedHandoffEnabledByDcGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyHintedHandoffEnabledByDcGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyHintedHandoffEnabledByDcGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyHintedHandoffEnabledByDcPost sets hinted handoff enabled by dc list + +Set the hinted handoff enabled by dc +*/ +func (a *Client) StorageProxyHintedHandoffEnabledByDcPost(params *StorageProxyHintedHandoffEnabledByDcPostParams) (*StorageProxyHintedHandoffEnabledByDcPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyHintedHandoffEnabledByDcPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyHintedHandoffEnabledByDcPost", + Method: "POST", + PathPattern: "/storage_proxy/hinted_handoff_enabled_by_dc", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyHintedHandoffEnabledByDcPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyHintedHandoffEnabledByDcPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyHintedHandoffEnabledByDcPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyHintedHandoffEnabledGet gets hinted handoff enabled + +Return true if hinted handoff enabled +*/ +func (a *Client) StorageProxyHintedHandoffEnabledGet(params *StorageProxyHintedHandoffEnabledGetParams) (*StorageProxyHintedHandoffEnabledGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyHintedHandoffEnabledGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyHintedHandoffEnabledGet", + Method: "GET", + PathPattern: "/storage_proxy/hinted_handoff_enabled", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyHintedHandoffEnabledGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyHintedHandoffEnabledGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyHintedHandoffEnabledGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyHintedHandoffEnabledPost sets hinted handoff enabled + +Set hinted handoff status +*/ +func (a *Client) StorageProxyHintedHandoffEnabledPost(params *StorageProxyHintedHandoffEnabledPostParams) (*StorageProxyHintedHandoffEnabledPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyHintedHandoffEnabledPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyHintedHandoffEnabledPost", + Method: "POST", + PathPattern: "/storage_proxy/hinted_handoff_enabled", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyHintedHandoffEnabledPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyHintedHandoffEnabledPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyHintedHandoffEnabledPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyHintsInProgressGet gets hints in progress + +get hints in progress +*/ +func (a *Client) StorageProxyHintsInProgressGet(params *StorageProxyHintsInProgressGetParams) (*StorageProxyHintsInProgressGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyHintsInProgressGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyHintsInProgressGet", + Method: "GET", + PathPattern: "/storage_proxy/hints_in_progress", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyHintsInProgressGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyHintsInProgressGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyHintsInProgressGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMaxHintWindowGet gets max hint window + +Get the max hint window +*/ +func (a *Client) StorageProxyMaxHintWindowGet(params *StorageProxyMaxHintWindowGetParams) (*StorageProxyMaxHintWindowGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMaxHintWindowGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMaxHintWindowGet", + Method: "GET", + PathPattern: "/storage_proxy/max_hint_window", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMaxHintWindowGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMaxHintWindowGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMaxHintWindowGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMaxHintWindowPost sets max hint window + +Set the max hint window +*/ +func (a *Client) StorageProxyMaxHintWindowPost(params *StorageProxyMaxHintWindowPostParams) (*StorageProxyMaxHintWindowPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMaxHintWindowPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMaxHintWindowPost", + Method: "POST", + PathPattern: "/storage_proxy/max_hint_window", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMaxHintWindowPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMaxHintWindowPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMaxHintWindowPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMaxHintsInProgressGet gets max hints in progress + +Get max hints in progress +*/ +func (a *Client) StorageProxyMaxHintsInProgressGet(params *StorageProxyMaxHintsInProgressGetParams) (*StorageProxyMaxHintsInProgressGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMaxHintsInProgressGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMaxHintsInProgressGet", + Method: "GET", + PathPattern: "/storage_proxy/max_hints_in_progress", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMaxHintsInProgressGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMaxHintsInProgressGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMaxHintsInProgressGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMaxHintsInProgressPost sets max hints in progress + +Set max hints in progress +*/ +func (a *Client) StorageProxyMaxHintsInProgressPost(params *StorageProxyMaxHintsInProgressPostParams) (*StorageProxyMaxHintsInProgressPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMaxHintsInProgressPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMaxHintsInProgressPost", + Method: "POST", + PathPattern: "/storage_proxy/max_hints_in_progress", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMaxHintsInProgressPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMaxHintsInProgressPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMaxHintsInProgressPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasReadConditionNotMetGet gets cas read metrics condition not met + +Get cas read metrics +*/ +func (a *Client) StorageProxyMetricsCasReadConditionNotMetGet(params *StorageProxyMetricsCasReadConditionNotMetGetParams) (*StorageProxyMetricsCasReadConditionNotMetGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasReadConditionNotMetGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasReadConditionNotMetGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_read/condition_not_met", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasReadConditionNotMetGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasReadConditionNotMetGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasReadConditionNotMetGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasReadContentionGet gets cas read metrics contention + +Get cas read metrics +*/ +func (a *Client) StorageProxyMetricsCasReadContentionGet(params *StorageProxyMetricsCasReadContentionGetParams) (*StorageProxyMetricsCasReadContentionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasReadContentionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasReadContentionGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_read/contention", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasReadContentionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasReadContentionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasReadContentionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasReadTimeoutsGet gets cas read timeouts + +Get CAS read timeout +*/ +func (a *Client) StorageProxyMetricsCasReadTimeoutsGet(params *StorageProxyMetricsCasReadTimeoutsGetParams) (*StorageProxyMetricsCasReadTimeoutsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasReadTimeoutsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasReadTimeoutsGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_read/timeouts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasReadTimeoutsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasReadTimeoutsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasReadTimeoutsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasReadUnavailablesGet gets cas read unavailables + +Get CAS read unavailables +*/ +func (a *Client) StorageProxyMetricsCasReadUnavailablesGet(params *StorageProxyMetricsCasReadUnavailablesGetParams) (*StorageProxyMetricsCasReadUnavailablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasReadUnavailablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasReadUnavailablesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_read/unavailables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasReadUnavailablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasReadUnavailablesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasReadUnavailablesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasReadUnfinishedCommitGet gets cas read metrics unfinished commit + +Get cas read metrics +*/ +func (a *Client) StorageProxyMetricsCasReadUnfinishedCommitGet(params *StorageProxyMetricsCasReadUnfinishedCommitGetParams) (*StorageProxyMetricsCasReadUnfinishedCommitGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasReadUnfinishedCommitGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasReadUnfinishedCommitGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_read/unfinished_commit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasReadUnfinishedCommitGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasReadUnfinishedCommitGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasReadUnfinishedCommitGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasWriteConditionNotMetGet gets cas write metrics condition not met + +Get cas write metrics +*/ +func (a *Client) StorageProxyMetricsCasWriteConditionNotMetGet(params *StorageProxyMetricsCasWriteConditionNotMetGetParams) (*StorageProxyMetricsCasWriteConditionNotMetGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasWriteConditionNotMetGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasWriteConditionNotMetGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_write/condition_not_met", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasWriteConditionNotMetGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasWriteConditionNotMetGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasWriteConditionNotMetGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasWriteContentionGet gets cas write metrics contention + +Get cas write metrics +*/ +func (a *Client) StorageProxyMetricsCasWriteContentionGet(params *StorageProxyMetricsCasWriteContentionGetParams) (*StorageProxyMetricsCasWriteContentionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasWriteContentionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasWriteContentionGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_write/contention", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasWriteContentionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasWriteContentionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasWriteContentionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasWriteTimeoutsGet gets cas write timeouts + +Get CAS write timeout +*/ +func (a *Client) StorageProxyMetricsCasWriteTimeoutsGet(params *StorageProxyMetricsCasWriteTimeoutsGetParams) (*StorageProxyMetricsCasWriteTimeoutsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasWriteTimeoutsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasWriteTimeoutsGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_write/timeouts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasWriteTimeoutsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasWriteTimeoutsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasWriteTimeoutsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasWriteUnavailablesGet gets cas write unavailables + +Get CAS write unavailables +*/ +func (a *Client) StorageProxyMetricsCasWriteUnavailablesGet(params *StorageProxyMetricsCasWriteUnavailablesGetParams) (*StorageProxyMetricsCasWriteUnavailablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasWriteUnavailablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasWriteUnavailablesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_write/unavailables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasWriteUnavailablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasWriteUnavailablesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasWriteUnavailablesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsCasWriteUnfinishedCommitGet gets cas write metrics unfinished commit + +Get cas write metrics +*/ +func (a *Client) StorageProxyMetricsCasWriteUnfinishedCommitGet(params *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) (*StorageProxyMetricsCasWriteUnfinishedCommitGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsCasWriteUnfinishedCommitGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsCasWriteUnfinishedCommitGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/cas_write/unfinished_commit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsCasWriteUnfinishedCommitGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsCasWriteUnfinishedCommitGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsCasWriteUnfinishedCommitGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeEstimatedHistogramGet gets range estimated histogram + +Get range estimated latency +*/ +func (a *Client) StorageProxyMetricsRangeEstimatedHistogramGet(params *StorageProxyMetricsRangeEstimatedHistogramGetParams) (*StorageProxyMetricsRangeEstimatedHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeEstimatedHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeEstimatedHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/estimated_histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeEstimatedHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeEstimatedHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeEstimatedHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeGet gets range latency + +Get range latency +*/ +func (a *Client) StorageProxyMetricsRangeGet(params *StorageProxyMetricsRangeGetParams) (*StorageProxyMetricsRangeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeHistogramGet gets range metrics latency histogram depricated + +Get range metrics +*/ +func (a *Client) StorageProxyMetricsRangeHistogramGet(params *StorageProxyMetricsRangeHistogramGetParams) (*StorageProxyMetricsRangeHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeMovingAverageHistogramGet gets range metrics latency histogram + +Get range metrics rate and histogram +*/ +func (a *Client) StorageProxyMetricsRangeMovingAverageHistogramGet(params *StorageProxyMetricsRangeMovingAverageHistogramGetParams) (*StorageProxyMetricsRangeMovingAverageHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeMovingAverageHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeMovingAverageHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/moving_average_histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeMovingAverageHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeMovingAverageHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeMovingAverageHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeTimeoutsGet gets range metrics timeouts + +Get range metrics +*/ +func (a *Client) StorageProxyMetricsRangeTimeoutsGet(params *StorageProxyMetricsRangeTimeoutsGetParams) (*StorageProxyMetricsRangeTimeoutsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeTimeoutsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeTimeoutsGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/timeouts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeTimeoutsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeTimeoutsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeTimeoutsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeTimeoutsRatesGet gets range metrics timeouts rates + +Get range metrics rates +*/ +func (a *Client) StorageProxyMetricsRangeTimeoutsRatesGet(params *StorageProxyMetricsRangeTimeoutsRatesGetParams) (*StorageProxyMetricsRangeTimeoutsRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeTimeoutsRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeTimeoutsRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/timeouts_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeTimeoutsRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeTimeoutsRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeTimeoutsRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeUnavailablesGet gets range metrics unavailables + +Get range metrics +*/ +func (a *Client) StorageProxyMetricsRangeUnavailablesGet(params *StorageProxyMetricsRangeUnavailablesGetParams) (*StorageProxyMetricsRangeUnavailablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeUnavailablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeUnavailablesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/unavailables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeUnavailablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeUnavailablesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeUnavailablesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsRangeUnavailablesRatesGet gets range metrics unavailables rates + +Get range metrics rates +*/ +func (a *Client) StorageProxyMetricsRangeUnavailablesRatesGet(params *StorageProxyMetricsRangeUnavailablesRatesGetParams) (*StorageProxyMetricsRangeUnavailablesRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsRangeUnavailablesRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsRangeUnavailablesRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/range/unavailables_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsRangeUnavailablesRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsRangeUnavailablesRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsRangeUnavailablesRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadEstimatedHistogramGet gets read estimated histogram + +Get read estimated latency +*/ +func (a *Client) StorageProxyMetricsReadEstimatedHistogramGet(params *StorageProxyMetricsReadEstimatedHistogramGetParams) (*StorageProxyMetricsReadEstimatedHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadEstimatedHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadEstimatedHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/estimated_histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadEstimatedHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadEstimatedHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadEstimatedHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadGet gets read latency + +Get read latency +*/ +func (a *Client) StorageProxyMetricsReadGet(params *StorageProxyMetricsReadGetParams) (*StorageProxyMetricsReadGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadHistogramGet gets read metrics latency histogram depricated + +Get read metrics +*/ +func (a *Client) StorageProxyMetricsReadHistogramGet(params *StorageProxyMetricsReadHistogramGetParams) (*StorageProxyMetricsReadHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadMovingAverageHistogramGet gets read metrics latency histogram + +Get read metrics +*/ +func (a *Client) StorageProxyMetricsReadMovingAverageHistogramGet(params *StorageProxyMetricsReadMovingAverageHistogramGetParams) (*StorageProxyMetricsReadMovingAverageHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadMovingAverageHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadMovingAverageHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/moving_average_histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadMovingAverageHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadMovingAverageHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadMovingAverageHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadTimeoutsGet gets read metrics timeouts + +Get read metrics +*/ +func (a *Client) StorageProxyMetricsReadTimeoutsGet(params *StorageProxyMetricsReadTimeoutsGetParams) (*StorageProxyMetricsReadTimeoutsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadTimeoutsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadTimeoutsGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/timeouts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadTimeoutsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadTimeoutsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadTimeoutsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadTimeoutsRatesGet gets read metrics timeouts rates + +Get read metrics rates +*/ +func (a *Client) StorageProxyMetricsReadTimeoutsRatesGet(params *StorageProxyMetricsReadTimeoutsRatesGetParams) (*StorageProxyMetricsReadTimeoutsRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadTimeoutsRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadTimeoutsRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/timeouts_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadTimeoutsRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadTimeoutsRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadTimeoutsRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadUnavailablesGet gets read metrics unavailables + +Get read metrics +*/ +func (a *Client) StorageProxyMetricsReadUnavailablesGet(params *StorageProxyMetricsReadUnavailablesGetParams) (*StorageProxyMetricsReadUnavailablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadUnavailablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadUnavailablesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/unavailables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadUnavailablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadUnavailablesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadUnavailablesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsReadUnavailablesRatesGet gets read metrics unavailables rates + +Get read metrics rates +*/ +func (a *Client) StorageProxyMetricsReadUnavailablesRatesGet(params *StorageProxyMetricsReadUnavailablesRatesGetParams) (*StorageProxyMetricsReadUnavailablesRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsReadUnavailablesRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsReadUnavailablesRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/read/unavailables_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsReadUnavailablesRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsReadUnavailablesRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsReadUnavailablesRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteEstimatedHistogramGet gets write estimated histogram + +Get write estimated latency +*/ +func (a *Client) StorageProxyMetricsWriteEstimatedHistogramGet(params *StorageProxyMetricsWriteEstimatedHistogramGetParams) (*StorageProxyMetricsWriteEstimatedHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteEstimatedHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteEstimatedHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/estimated_histogram/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteEstimatedHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteEstimatedHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteEstimatedHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteGet gets write latency + +Get write latency +*/ +func (a *Client) StorageProxyMetricsWriteGet(params *StorageProxyMetricsWriteGetParams) (*StorageProxyMetricsWriteGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteHistogramGet gets write metrics latency histogram depricated + +Get write metrics +*/ +func (a *Client) StorageProxyMetricsWriteHistogramGet(params *StorageProxyMetricsWriteHistogramGetParams) (*StorageProxyMetricsWriteHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteMovingAverageHistogramGet gets write metrics latency histogram + +Get write metrics +*/ +func (a *Client) StorageProxyMetricsWriteMovingAverageHistogramGet(params *StorageProxyMetricsWriteMovingAverageHistogramGetParams) (*StorageProxyMetricsWriteMovingAverageHistogramGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteMovingAverageHistogramGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteMovingAverageHistogramGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/moving_average_histogram", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteMovingAverageHistogramGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteMovingAverageHistogramGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteMovingAverageHistogramGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteTimeoutsGet gets write metrics timeouts + +Get write metrics +*/ +func (a *Client) StorageProxyMetricsWriteTimeoutsGet(params *StorageProxyMetricsWriteTimeoutsGetParams) (*StorageProxyMetricsWriteTimeoutsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteTimeoutsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteTimeoutsGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/timeouts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteTimeoutsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteTimeoutsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteTimeoutsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteTimeoutsRatesGet gets write metrics timeouts rates + +Get write metrics rates +*/ +func (a *Client) StorageProxyMetricsWriteTimeoutsRatesGet(params *StorageProxyMetricsWriteTimeoutsRatesGetParams) (*StorageProxyMetricsWriteTimeoutsRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteTimeoutsRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteTimeoutsRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/timeouts_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteTimeoutsRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteTimeoutsRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteTimeoutsRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteUnavailablesGet gets write metrics unavailables + +Get write metrics +*/ +func (a *Client) StorageProxyMetricsWriteUnavailablesGet(params *StorageProxyMetricsWriteUnavailablesGetParams) (*StorageProxyMetricsWriteUnavailablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteUnavailablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteUnavailablesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/unavailables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteUnavailablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteUnavailablesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteUnavailablesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyMetricsWriteUnavailablesRatesGet gets write metrics unavailables rates + +Get write metrics rates +*/ +func (a *Client) StorageProxyMetricsWriteUnavailablesRatesGet(params *StorageProxyMetricsWriteUnavailablesRatesGetParams) (*StorageProxyMetricsWriteUnavailablesRatesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyMetricsWriteUnavailablesRatesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyMetricsWriteUnavailablesRatesGet", + Method: "GET", + PathPattern: "/storage_proxy/metrics/write/unavailables_rates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyMetricsWriteUnavailablesRatesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyMetricsWriteUnavailablesRatesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyMetricsWriteUnavailablesRatesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyRangeRPCTimeoutGet gets range rpc timeout + +Get range rpc timeout in seconds +*/ +func (a *Client) StorageProxyRangeRPCTimeoutGet(params *StorageProxyRangeRPCTimeoutGetParams) (*StorageProxyRangeRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyRangeRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyRangeRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/range_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyRangeRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyRangeRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyRangeRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyRangeRPCTimeoutPost sets range rpc timeout + +Set range rpc timeout +*/ +func (a *Client) StorageProxyRangeRPCTimeoutPost(params *StorageProxyRangeRPCTimeoutPostParams) (*StorageProxyRangeRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyRangeRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyRangeRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/range_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyRangeRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyRangeRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyRangeRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReadRepairAttemptedGet gets read repair attempted + +Get read repair attempted +*/ +func (a *Client) StorageProxyReadRepairAttemptedGet(params *StorageProxyReadRepairAttemptedGetParams) (*StorageProxyReadRepairAttemptedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReadRepairAttemptedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReadRepairAttemptedGet", + Method: "GET", + PathPattern: "/storage_proxy/read_repair_attempted", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReadRepairAttemptedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReadRepairAttemptedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReadRepairAttemptedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReadRepairRepairedBackgroundGet gets read repair repaired background + +Get read repair repaired background +*/ +func (a *Client) StorageProxyReadRepairRepairedBackgroundGet(params *StorageProxyReadRepairRepairedBackgroundGetParams) (*StorageProxyReadRepairRepairedBackgroundGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReadRepairRepairedBackgroundGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReadRepairRepairedBackgroundGet", + Method: "GET", + PathPattern: "/storage_proxy/read_repair_repaired_background", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReadRepairRepairedBackgroundGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReadRepairRepairedBackgroundGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReadRepairRepairedBackgroundGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReadRepairRepairedBlockingGet gets read repair repaired blocking + +Get read repair repaired blocking +*/ +func (a *Client) StorageProxyReadRepairRepairedBlockingGet(params *StorageProxyReadRepairRepairedBlockingGetParams) (*StorageProxyReadRepairRepairedBlockingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReadRepairRepairedBlockingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReadRepairRepairedBlockingGet", + Method: "GET", + PathPattern: "/storage_proxy/read_repair_repaired_blocking", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReadRepairRepairedBlockingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReadRepairRepairedBlockingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReadRepairRepairedBlockingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReadRPCTimeoutGet gets read rpc timeout + +Get the read RPC timeout in seconds +*/ +func (a *Client) StorageProxyReadRPCTimeoutGet(params *StorageProxyReadRPCTimeoutGetParams) (*StorageProxyReadRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReadRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReadRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/read_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReadRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReadRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReadRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReadRPCTimeoutPost sets read rpc timeout + +Set the read RPC timeout +*/ +func (a *Client) StorageProxyReadRPCTimeoutPost(params *StorageProxyReadRPCTimeoutPostParams) (*StorageProxyReadRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReadRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReadRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/read_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReadRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReadRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReadRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyReloadTriggerClassesPost reloads trigger classes + +Reload trigger classes +*/ +func (a *Client) StorageProxyReloadTriggerClassesPost(params *StorageProxyReloadTriggerClassesPostParams) (*StorageProxyReloadTriggerClassesPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyReloadTriggerClassesPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyReloadTriggerClassesPost", + Method: "POST", + PathPattern: "/storage_proxy/reload_trigger_classes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyReloadTriggerClassesPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyReloadTriggerClassesPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyReloadTriggerClassesPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyRPCTimeoutGet gets rpc timeout + +Get the RPC timeout in seconds +*/ +func (a *Client) StorageProxyRPCTimeoutGet(params *StorageProxyRPCTimeoutGetParams) (*StorageProxyRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyRPCTimeoutPost sets rpc timeout + +Set the RPC timeout +*/ +func (a *Client) StorageProxyRPCTimeoutPost(params *StorageProxyRPCTimeoutPostParams) (*StorageProxyRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxySchemaVersionsGet gets schema versions + +Get a map of the schema versions +*/ +func (a *Client) StorageProxySchemaVersionsGet(params *StorageProxySchemaVersionsGetParams) (*StorageProxySchemaVersionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxySchemaVersionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxySchemaVersionsGet", + Method: "GET", + PathPattern: "/storage_proxy/schema_versions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxySchemaVersionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxySchemaVersionsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxySchemaVersionsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyTotalHintsGet gets total hints + +Get total hints +*/ +func (a *Client) StorageProxyTotalHintsGet(params *StorageProxyTotalHintsGetParams) (*StorageProxyTotalHintsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyTotalHintsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyTotalHintsGet", + Method: "GET", + PathPattern: "/storage_proxy/total_hints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyTotalHintsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyTotalHintsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyTotalHintsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyTruncateRPCTimeoutGet gets truncate rpc timeout + +Get truncate rpc timeout in seconds +*/ +func (a *Client) StorageProxyTruncateRPCTimeoutGet(params *StorageProxyTruncateRPCTimeoutGetParams) (*StorageProxyTruncateRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyTruncateRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyTruncateRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/truncate_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyTruncateRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyTruncateRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyTruncateRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyTruncateRPCTimeoutPost sets truncate rpc timeout + +Set truncate rpc timeout +*/ +func (a *Client) StorageProxyTruncateRPCTimeoutPost(params *StorageProxyTruncateRPCTimeoutPostParams) (*StorageProxyTruncateRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyTruncateRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyTruncateRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/truncate_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyTruncateRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyTruncateRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyTruncateRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyWriteRPCTimeoutGet gets write rpc timeout + +Get the write RPC timeout in seconds +*/ +func (a *Client) StorageProxyWriteRPCTimeoutGet(params *StorageProxyWriteRPCTimeoutGetParams) (*StorageProxyWriteRPCTimeoutGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyWriteRPCTimeoutGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyWriteRpcTimeoutGet", + Method: "GET", + PathPattern: "/storage_proxy/write_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyWriteRPCTimeoutGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyWriteRPCTimeoutGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyWriteRPCTimeoutGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageProxyWriteRPCTimeoutPost sets write rpc timeout + +Set the write RPC timeout +*/ +func (a *Client) StorageProxyWriteRPCTimeoutPost(params *StorageProxyWriteRPCTimeoutPostParams) (*StorageProxyWriteRPCTimeoutPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageProxyWriteRPCTimeoutPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageProxyWriteRpcTimeoutPost", + Method: "POST", + PathPattern: "/storage_proxy/write_rpc_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageProxyWriteRPCTimeoutPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageProxyWriteRPCTimeoutPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageProxyWriteRPCTimeoutPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceActiveRepairGet gets active repair async + +Return an array with the ids of the currently active repairs +*/ +func (a *Client) StorageServiceActiveRepairGet(params *StorageServiceActiveRepairGetParams) (*StorageServiceActiveRepairGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceActiveRepairGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceActiveRepairGet", + Method: "GET", + PathPattern: "/storage_service/active_repair/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceActiveRepairGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceActiveRepairGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceActiveRepairGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceAutoCompactionByKeyspaceDelete disables auto compaction + +Disable auto compaction +*/ +func (a *Client) StorageServiceAutoCompactionByKeyspaceDelete(params *StorageServiceAutoCompactionByKeyspaceDeleteParams) (*StorageServiceAutoCompactionByKeyspaceDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceAutoCompactionByKeyspaceDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceAutoCompactionByKeyspaceDelete", + Method: "DELETE", + PathPattern: "/storage_service/auto_compaction/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceAutoCompactionByKeyspaceDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceAutoCompactionByKeyspaceDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceAutoCompactionByKeyspaceDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceAutoCompactionByKeyspacePost enables auto compaction + +Enable auto compaction +*/ +func (a *Client) StorageServiceAutoCompactionByKeyspacePost(params *StorageServiceAutoCompactionByKeyspacePostParams) (*StorageServiceAutoCompactionByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceAutoCompactionByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceAutoCompactionByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/auto_compaction/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceAutoCompactionByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceAutoCompactionByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceAutoCompactionByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceBatchSizeFailureThresholdGet gets batch size failure threshold + +Returns the threshold for rejecting queries due to a large batch size +*/ +func (a *Client) StorageServiceBatchSizeFailureThresholdGet(params *StorageServiceBatchSizeFailureThresholdGetParams) (*StorageServiceBatchSizeFailureThresholdGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceBatchSizeFailureThresholdGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceBatchSizeFailureThresholdGet", + Method: "GET", + PathPattern: "/storage_service/batch_size_failure_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceBatchSizeFailureThresholdGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceBatchSizeFailureThresholdGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceBatchSizeFailureThresholdGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceBatchSizeFailureThresholdPost sets batch size failure threshold + +Sets the threshold for rejecting queries due to a large batch size +*/ +func (a *Client) StorageServiceBatchSizeFailureThresholdPost(params *StorageServiceBatchSizeFailureThresholdPostParams) (*StorageServiceBatchSizeFailureThresholdPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceBatchSizeFailureThresholdPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceBatchSizeFailureThresholdPost", + Method: "POST", + PathPattern: "/storage_service/batch_size_failure_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceBatchSizeFailureThresholdPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceBatchSizeFailureThresholdPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceBatchSizeFailureThresholdPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceBulkLoadAsyncByPathGet bulks load async + +Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session. +*/ +func (a *Client) StorageServiceBulkLoadAsyncByPathGet(params *StorageServiceBulkLoadAsyncByPathGetParams) (*StorageServiceBulkLoadAsyncByPathGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceBulkLoadAsyncByPathGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceBulkLoadAsyncByPathGet", + Method: "GET", + PathPattern: "/storage_service/bulk_load_async/{path}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceBulkLoadAsyncByPathGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceBulkLoadAsyncByPathGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceBulkLoadAsyncByPathGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceBulkLoadByPathPost bulks load + +Starts a bulk load and blocks until it completes +*/ +func (a *Client) StorageServiceBulkLoadByPathPost(params *StorageServiceBulkLoadByPathPostParams) (*StorageServiceBulkLoadByPathPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceBulkLoadByPathPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceBulkLoadByPathPost", + Method: "POST", + PathPattern: "/storage_service/bulk_load/{path}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceBulkLoadByPathPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceBulkLoadByPathPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceBulkLoadByPathPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceClusterNameGet gets cluster name + +Returns the name of the cluster +*/ +func (a *Client) StorageServiceClusterNameGet(params *StorageServiceClusterNameGetParams) (*StorageServiceClusterNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceClusterNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceClusterNameGet", + Method: "GET", + PathPattern: "/storage_service/cluster_name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceClusterNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceClusterNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceClusterNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceCommitlogGet gets commitlog + +Returns the location of the commit log files +*/ +func (a *Client) StorageServiceCommitlogGet(params *StorageServiceCommitlogGetParams) (*StorageServiceCommitlogGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceCommitlogGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceCommitlogGet", + Method: "GET", + PathPattern: "/storage_service/commitlog", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceCommitlogGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceCommitlogGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceCommitlogGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceCompactionThroughputGet gets compaction throughput mb per sec + +get compaction throughput mb per sec +*/ +func (a *Client) StorageServiceCompactionThroughputGet(params *StorageServiceCompactionThroughputGetParams) (*StorageServiceCompactionThroughputGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceCompactionThroughputGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceCompactionThroughputGet", + Method: "GET", + PathPattern: "/storage_service/compaction_throughput", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceCompactionThroughputGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceCompactionThroughputGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceCompactionThroughputGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceCompactionThroughputPost sets compaction throughput mb per sec + +Set compaction throughput mb per sec +*/ +func (a *Client) StorageServiceCompactionThroughputPost(params *StorageServiceCompactionThroughputPostParams) (*StorageServiceCompactionThroughputPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceCompactionThroughputPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceCompactionThroughputPost", + Method: "POST", + PathPattern: "/storage_service/compaction_throughput", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceCompactionThroughputPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceCompactionThroughputPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceCompactionThroughputPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDataFileLocationsGet gets all data file locations + +Get the list of all data file locations from conf +*/ +func (a *Client) StorageServiceDataFileLocationsGet(params *StorageServiceDataFileLocationsGetParams) (*StorageServiceDataFileLocationsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDataFileLocationsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDataFileLocationsGet", + Method: "GET", + PathPattern: "/storage_service/data_file/locations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDataFileLocationsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDataFileLocationsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDataFileLocationsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDecommissionPost decommissions + +transfer this node's data to other machines and remove it from service. +*/ +func (a *Client) StorageServiceDecommissionPost(params *StorageServiceDecommissionPostParams) (*StorageServiceDecommissionPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDecommissionPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDecommissionPost", + Method: "POST", + PathPattern: "/storage_service/decommission", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDecommissionPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDecommissionPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDecommissionPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDeliverHintsPost delivers hints +*/ +func (a *Client) StorageServiceDeliverHintsPost(params *StorageServiceDeliverHintsPostParams) (*StorageServiceDeliverHintsPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDeliverHintsPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDeliverHintsPost", + Method: "POST", + PathPattern: "/storage_service/deliver_hints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDeliverHintsPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDeliverHintsPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDeliverHintsPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDescribeRingByKeyspaceGet describes ring + +The TokenRange for a given keyspace +*/ +func (a *Client) StorageServiceDescribeRingByKeyspaceGet(params *StorageServiceDescribeRingByKeyspaceGetParams) (*StorageServiceDescribeRingByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDescribeRingByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDescribeRingByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/describe_ring/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDescribeRingByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDescribeRingByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDescribeRingByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDescribeRingGet describes any ring + +The TokenRange for a any keyspace +*/ +func (a *Client) StorageServiceDescribeRingGet(params *StorageServiceDescribeRingGetParams) (*StorageServiceDescribeRingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDescribeRingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDescribeRingGet", + Method: "GET", + PathPattern: "/storage_service/describe_ring/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDescribeRingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDescribeRingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDescribeRingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDrainGet gets drain progress + +Get the progress of a drain operation +*/ +func (a *Client) StorageServiceDrainGet(params *StorageServiceDrainGetParams) (*StorageServiceDrainGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDrainGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDrainGet", + Method: "GET", + PathPattern: "/storage_service/drain", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDrainGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDrainGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDrainGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceDrainPost drains + +makes node unavailable for writes, flushes memtables and replays commitlog +*/ +func (a *Client) StorageServiceDrainPost(params *StorageServiceDrainPostParams) (*StorageServiceDrainPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceDrainPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceDrainPost", + Method: "POST", + PathPattern: "/storage_service/drain", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceDrainPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceDrainPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceDrainPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceForceRemoveCompletionPost forces remove completion + +Force a remove operation to finish. +*/ +func (a *Client) StorageServiceForceRemoveCompletionPost(params *StorageServiceForceRemoveCompletionPostParams) (*StorageServiceForceRemoveCompletionPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceForceRemoveCompletionPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceForceRemoveCompletionPost", + Method: "POST", + PathPattern: "/storage_service/force_remove_completion", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceForceRemoveCompletionPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceForceRemoveCompletionPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceForceRemoveCompletionPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceForceTerminatePost forces terminate all repair sessions + +Force terminate all repair sessions +*/ +func (a *Client) StorageServiceForceTerminatePost(params *StorageServiceForceTerminatePostParams) (*StorageServiceForceTerminatePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceForceTerminatePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceForceTerminatePost", + Method: "POST", + PathPattern: "/storage_service/force_terminate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceForceTerminatePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceForceTerminatePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceForceTerminatePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceForceTerminateRepairPost forces terminate all repair sessions new + +Force terminate all repair sessions +*/ +func (a *Client) StorageServiceForceTerminateRepairPost(params *StorageServiceForceTerminateRepairPostParams) (*StorageServiceForceTerminateRepairPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceForceTerminateRepairPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceForceTerminateRepairPost", + Method: "POST", + PathPattern: "/storage_service/force_terminate_repair", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceForceTerminateRepairPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceForceTerminateRepairPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceForceTerminateRepairPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceGenerationNumberGet gets current generation number + +Return the generation value for this node. +*/ +func (a *Client) StorageServiceGenerationNumberGet(params *StorageServiceGenerationNumberGetParams) (*StorageServiceGenerationNumberGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceGenerationNumberGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceGenerationNumberGet", + Method: "GET", + PathPattern: "/storage_service/generation_number", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceGenerationNumberGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceGenerationNumberGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceGenerationNumberGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceGossipingDelete stops gossiping + +allows a user to forcibly 'kill' a sick node +*/ +func (a *Client) StorageServiceGossipingDelete(params *StorageServiceGossipingDeleteParams) (*StorageServiceGossipingDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceGossipingDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceGossipingDelete", + Method: "DELETE", + PathPattern: "/storage_service/gossiping", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceGossipingDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceGossipingDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceGossipingDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceGossipingGet is gossip running + +allows a user to see whether gossip is running or not +*/ +func (a *Client) StorageServiceGossipingGet(params *StorageServiceGossipingGetParams) (*StorageServiceGossipingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceGossipingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceGossipingGet", + Method: "GET", + PathPattern: "/storage_service/gossiping", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceGossipingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceGossipingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceGossipingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceGossipingPost starts gossiping + +allows a user to recover a forcibly 'killed' node +*/ +func (a *Client) StorageServiceGossipingPost(params *StorageServiceGossipingPostParams) (*StorageServiceGossipingPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceGossipingPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceGossipingPost", + Method: "POST", + PathPattern: "/storage_service/gossiping", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceGossipingPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceGossipingPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceGossipingPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceHintedHandoffPost sets hinted handoff throttle in kb + +Sets the hinted handoff throttle in kb per second, per delivery thread +*/ +func (a *Client) StorageServiceHintedHandoffPost(params *StorageServiceHintedHandoffPostParams) (*StorageServiceHintedHandoffPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceHintedHandoffPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceHintedHandoffPost", + Method: "POST", + PathPattern: "/storage_service/hinted_handoff", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceHintedHandoffPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceHintedHandoffPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceHintedHandoffPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceHostIDGet gets host id map + +Retrieve the mapping of endpoint to host ID +*/ +func (a *Client) StorageServiceHostIDGet(params *StorageServiceHostIDGetParams) (*StorageServiceHostIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceHostIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceHostIdGet", + Method: "GET", + PathPattern: "/storage_service/host_id", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceHostIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceHostIDGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceHostIDGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceHostidLocalGet locals hostid + +Returns the local host id +*/ +func (a *Client) StorageServiceHostidLocalGet(params *StorageServiceHostidLocalGetParams) (*StorageServiceHostidLocalGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceHostidLocalGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceHostidLocalGet", + Method: "GET", + PathPattern: "/storage_service/hostid/local", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceHostidLocalGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceHostidLocalGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceHostidLocalGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceIncrementalBackupsGet is incremental backups enabled + +Check if incremental backup is enabled +*/ +func (a *Client) StorageServiceIncrementalBackupsGet(params *StorageServiceIncrementalBackupsGetParams) (*StorageServiceIncrementalBackupsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceIncrementalBackupsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceIncrementalBackupsGet", + Method: "GET", + PathPattern: "/storage_service/incremental_backups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceIncrementalBackupsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceIncrementalBackupsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceIncrementalBackupsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceIncrementalBackupsPost sets incremental backups enabled +*/ +func (a *Client) StorageServiceIncrementalBackupsPost(params *StorageServiceIncrementalBackupsPostParams) (*StorageServiceIncrementalBackupsPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceIncrementalBackupsPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceIncrementalBackupsPost", + Method: "POST", + PathPattern: "/storage_service/incremental_backups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceIncrementalBackupsPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceIncrementalBackupsPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceIncrementalBackupsPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceIsInitializedGet is initialized + +Determine if gossip is enable +*/ +func (a *Client) StorageServiceIsInitializedGet(params *StorageServiceIsInitializedGetParams) (*StorageServiceIsInitializedGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceIsInitializedGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceIsInitializedGet", + Method: "GET", + PathPattern: "/storage_service/is_initialized", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceIsInitializedGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceIsInitializedGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceIsInitializedGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceIsStartingGet is starting + +Returns whether the storage service is starting or not +*/ +func (a *Client) StorageServiceIsStartingGet(params *StorageServiceIsStartingGetParams) (*StorageServiceIsStartingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceIsStartingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceIsStartingGet", + Method: "GET", + PathPattern: "/storage_service/is_starting", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceIsStartingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceIsStartingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceIsStartingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceJoinRingGet is joined +*/ +func (a *Client) StorageServiceJoinRingGet(params *StorageServiceJoinRingGetParams) (*StorageServiceJoinRingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceJoinRingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceJoinRingGet", + Method: "GET", + PathPattern: "/storage_service/join_ring", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceJoinRingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceJoinRingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceJoinRingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceJoinRingPost joins ring + +Allows a node that have been started without joining the ring to join it +*/ +func (a *Client) StorageServiceJoinRingPost(params *StorageServiceJoinRingPostParams) (*StorageServiceJoinRingPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceJoinRingPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceJoinRingPost", + Method: "POST", + PathPattern: "/storage_service/join_ring", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceJoinRingPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceJoinRingPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceJoinRingPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspaceCleanupByKeyspacePost forces keyspace cleanup + +Trigger a cleanup of keys on a single keyspace +*/ +func (a *Client) StorageServiceKeyspaceCleanupByKeyspacePost(params *StorageServiceKeyspaceCleanupByKeyspacePostParams) (*StorageServiceKeyspaceCleanupByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspaceCleanupByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspaceCleanupByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/keyspace_cleanup/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspaceCleanupByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspaceCleanupByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspaceCleanupByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspaceCompactionByKeyspacePost forces keyspace compaction + +Forces major compaction of a single keyspace +*/ +func (a *Client) StorageServiceKeyspaceCompactionByKeyspacePost(params *StorageServiceKeyspaceCompactionByKeyspacePostParams) (*StorageServiceKeyspaceCompactionByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspaceCompactionByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspaceCompactionByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/keyspace_compaction/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspaceCompactionByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspaceCompactionByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspaceCompactionByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspaceFlushByKeyspacePost forces keyspace flush + +Flush all memtables for the given column families, or all columnfamilies for the given keyspace if none are explicitly listed. +*/ +func (a *Client) StorageServiceKeyspaceFlushByKeyspacePost(params *StorageServiceKeyspaceFlushByKeyspacePostParams) (*StorageServiceKeyspaceFlushByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspaceFlushByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspaceFlushByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/keyspace_flush/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspaceFlushByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspaceFlushByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspaceFlushByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspaceScrubByKeyspaceGet scrubs + +Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace. If columnFamilies array is empty, all CFs are scrubbed. Scrubbed CFs will be snapshotted first, if disableSnapshot is false +*/ +func (a *Client) StorageServiceKeyspaceScrubByKeyspaceGet(params *StorageServiceKeyspaceScrubByKeyspaceGetParams) (*StorageServiceKeyspaceScrubByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspaceScrubByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspaceScrubByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/keyspace_scrub/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspaceScrubByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspaceScrubByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspaceScrubByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspaceUpgradeSstablesByKeyspaceGet upgrades sstables + +Rewrite all sstables to the latest version. Unlike scrub, it doesn't skip bad rows and do not snapshot sstables first. +*/ +func (a *Client) StorageServiceKeyspaceUpgradeSstablesByKeyspaceGet(params *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) (*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspaceUpgradeSstablesByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/keyspace_upgrade_sstables/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceKeyspacesGet gets keyspaces + +Get the keyspaces +*/ +func (a *Client) StorageServiceKeyspacesGet(params *StorageServiceKeyspacesGetParams) (*StorageServiceKeyspacesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceKeyspacesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceKeyspacesGet", + Method: "GET", + PathPattern: "/storage_service/keyspaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceKeyspacesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceKeyspacesGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceKeyspacesGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceLoadGet gets load + +get load value +*/ +func (a *Client) StorageServiceLoadGet(params *StorageServiceLoadGetParams) (*StorageServiceLoadGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceLoadGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceLoadGet", + Method: "GET", + PathPattern: "/storage_service/load", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceLoadGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceLoadGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceLoadGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceLoadMapGet gets load map + +load value. Keys are IP addresses +*/ +func (a *Client) StorageServiceLoadMapGet(params *StorageServiceLoadMapGetParams) (*StorageServiceLoadMapGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceLoadMapGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceLoadMapGet", + Method: "GET", + PathPattern: "/storage_service/load_map", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceLoadMapGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceLoadMapGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceLoadMapGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceLoggingLevelGet gets logging levels + +get the runtime logging levels +*/ +func (a *Client) StorageServiceLoggingLevelGet(params *StorageServiceLoggingLevelGetParams) (*StorageServiceLoggingLevelGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceLoggingLevelGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceLoggingLevelGet", + Method: "GET", + PathPattern: "/storage_service/logging_level", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceLoggingLevelGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceLoggingLevelGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceLoggingLevelGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceLoggingLevelPost sets logging level + +set the logging level at runtime

If both classQualifer and level are empty/null, it will reload the configuration to reset.
If classQualifer is not empty but level is empty/null, it will set the level to null for the defined classQualifer
If level cannot be parsed, then the level will be defaulted to DEBUG

The logback configuration should have < jmxConfigurator /> set +*/ +func (a *Client) StorageServiceLoggingLevelPost(params *StorageServiceLoggingLevelPostParams) (*StorageServiceLoggingLevelPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceLoggingLevelPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceLoggingLevelPost", + Method: "POST", + PathPattern: "/storage_service/logging_level", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceLoggingLevelPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceLoggingLevelPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceLoggingLevelPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceMetricsExceptionsGet gets exceptions + +Get exceptions +*/ +func (a *Client) StorageServiceMetricsExceptionsGet(params *StorageServiceMetricsExceptionsGetParams) (*StorageServiceMetricsExceptionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceMetricsExceptionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceMetricsExceptionsGet", + Method: "GET", + PathPattern: "/storage_service/metrics/exceptions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceMetricsExceptionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceMetricsExceptionsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceMetricsExceptionsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceMetricsHintsInProgressGet gets total hints in progress + +Get total hints in progress +*/ +func (a *Client) StorageServiceMetricsHintsInProgressGet(params *StorageServiceMetricsHintsInProgressGetParams) (*StorageServiceMetricsHintsInProgressGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceMetricsHintsInProgressGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceMetricsHintsInProgressGet", + Method: "GET", + PathPattern: "/storage_service/metrics/hints_in_progress", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceMetricsHintsInProgressGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceMetricsHintsInProgressGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceMetricsHintsInProgressGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceMetricsLoadGet gets metrics load + +Get load +*/ +func (a *Client) StorageServiceMetricsLoadGet(params *StorageServiceMetricsLoadGetParams) (*StorageServiceMetricsLoadGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceMetricsLoadGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceMetricsLoadGet", + Method: "GET", + PathPattern: "/storage_service/metrics/load", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceMetricsLoadGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceMetricsLoadGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceMetricsLoadGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceMetricsTotalHintsGet gets total hints1 + +Get total hints +*/ +func (a *Client) StorageServiceMetricsTotalHintsGet(params *StorageServiceMetricsTotalHintsGetParams) (*StorageServiceMetricsTotalHintsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceMetricsTotalHintsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceMetricsTotalHintsGet", + Method: "GET", + PathPattern: "/storage_service/metrics/total_hints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceMetricsTotalHintsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceMetricsTotalHintsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceMetricsTotalHintsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceMovePost moves + +This node will unload its data onto its neighbors, and bootstrap to the new token. +*/ +func (a *Client) StorageServiceMovePost(params *StorageServiceMovePostParams) (*StorageServiceMovePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceMovePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceMovePost", + Method: "POST", + PathPattern: "/storage_service/move", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceMovePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceMovePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceMovePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNativeTransportDelete stops native transport + +Stop native transport +*/ +func (a *Client) StorageServiceNativeTransportDelete(params *StorageServiceNativeTransportDeleteParams) (*StorageServiceNativeTransportDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNativeTransportDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNativeTransportDelete", + Method: "DELETE", + PathPattern: "/storage_service/native_transport", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNativeTransportDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNativeTransportDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNativeTransportDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNativeTransportGet is native transport running + +Is native transport running +*/ +func (a *Client) StorageServiceNativeTransportGet(params *StorageServiceNativeTransportGetParams) (*StorageServiceNativeTransportGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNativeTransportGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNativeTransportGet", + Method: "GET", + PathPattern: "/storage_service/native_transport", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNativeTransportGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNativeTransportGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNativeTransportGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNativeTransportPost starts native transport + +Start native transport +*/ +func (a *Client) StorageServiceNativeTransportPost(params *StorageServiceNativeTransportPostParams) (*StorageServiceNativeTransportPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNativeTransportPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNativeTransportPost", + Method: "POST", + PathPattern: "/storage_service/native_transport", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNativeTransportPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNativeTransportPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNativeTransportPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNaturalEndpointsByKeyspaceGet gets natural endpoints + +This method returns the N endpoints that are responsible for storing the specified key i.e for replication. the endpoint responsible for this key +*/ +func (a *Client) StorageServiceNaturalEndpointsByKeyspaceGet(params *StorageServiceNaturalEndpointsByKeyspaceGetParams) (*StorageServiceNaturalEndpointsByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNaturalEndpointsByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNaturalEndpointsByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/natural_endpoints/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNaturalEndpointsByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNaturalEndpointsByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNaturalEndpointsByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNodesJoiningGet gets joining nodes + +Retrieve the list of nodes currently bootstrapping into the ring +*/ +func (a *Client) StorageServiceNodesJoiningGet(params *StorageServiceNodesJoiningGetParams) (*StorageServiceNodesJoiningGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNodesJoiningGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNodesJoiningGet", + Method: "GET", + PathPattern: "/storage_service/nodes/joining", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNodesJoiningGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNodesJoiningGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNodesJoiningGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNodesLeavingGet gets leaving nodes + +Retrieve the list of nodes currently leaving the ring +*/ +func (a *Client) StorageServiceNodesLeavingGet(params *StorageServiceNodesLeavingGetParams) (*StorageServiceNodesLeavingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNodesLeavingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNodesLeavingGet", + Method: "GET", + PathPattern: "/storage_service/nodes/leaving", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNodesLeavingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNodesLeavingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNodesLeavingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceNodesMovingGet gets moving nodes + +Retrieve the list of nodes currently moving in the ring +*/ +func (a *Client) StorageServiceNodesMovingGet(params *StorageServiceNodesMovingGetParams) (*StorageServiceNodesMovingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceNodesMovingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceNodesMovingGet", + Method: "GET", + PathPattern: "/storage_service/nodes/moving", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceNodesMovingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceNodesMovingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceNodesMovingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceOperationModeGet gets operation mode + +Get the operational mode (leaving, joining, normal, decommissioned, client) +*/ +func (a *Client) StorageServiceOperationModeGet(params *StorageServiceOperationModeGetParams) (*StorageServiceOperationModeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceOperationModeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceOperationModeGet", + Method: "GET", + PathPattern: "/storage_service/operation_mode", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceOperationModeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceOperationModeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceOperationModeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceOwnershipByKeyspaceGet gets effective ownership + +Effective ownership is % of the data each node owns given the keyspace +*/ +func (a *Client) StorageServiceOwnershipByKeyspaceGet(params *StorageServiceOwnershipByKeyspaceGetParams) (*StorageServiceOwnershipByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceOwnershipByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceOwnershipByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/ownership/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceOwnershipByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceOwnershipByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceOwnershipByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceOwnershipGet gets ownership + +The mapping from token -> % of cluster owned by that token +*/ +func (a *Client) StorageServiceOwnershipGet(params *StorageServiceOwnershipGetParams) (*StorageServiceOwnershipGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceOwnershipGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceOwnershipGet", + Method: "GET", + PathPattern: "/storage_service/ownership/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceOwnershipGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceOwnershipGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceOwnershipGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServicePartitionerNameGet gets partitioner name + +Returns the cluster partitioner +*/ +func (a *Client) StorageServicePartitionerNameGet(params *StorageServicePartitionerNameGetParams) (*StorageServicePartitionerNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServicePartitionerNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServicePartitionerNameGet", + Method: "GET", + PathPattern: "/storage_service/partitioner_name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServicePartitionerNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServicePartitionerNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServicePartitionerNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServicePendingRangeByKeyspaceGet gets pending range to endpoint map + +Retrieve a map of pending ranges to endpoints that describe the ring topology +*/ +func (a *Client) StorageServicePendingRangeByKeyspaceGet(params *StorageServicePendingRangeByKeyspaceGetParams) (*StorageServicePendingRangeByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServicePendingRangeByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServicePendingRangeByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/pending_range/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServicePendingRangeByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServicePendingRangeByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServicePendingRangeByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRangeToEndpointMapByKeyspaceGet gets range to endpoint map + +Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster. +*/ +func (a *Client) StorageServiceRangeToEndpointMapByKeyspaceGet(params *StorageServiceRangeToEndpointMapByKeyspaceGetParams) (*StorageServiceRangeToEndpointMapByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRangeToEndpointMapByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRangeToEndpointMapByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/range_to_endpoint_map/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRangeToEndpointMapByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRangeToEndpointMapByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRangeToEndpointMapByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRebuildPost rebuilds + +Initiate a process of streaming data for which we are responsible from other nodes. It is similar to bootstrap except meant to be used on a node which is already in the cluster (typically containing no data) as an alternative to running repair. +*/ +func (a *Client) StorageServiceRebuildPost(params *StorageServiceRebuildPostParams) (*StorageServiceRebuildPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRebuildPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRebuildPost", + Method: "POST", + PathPattern: "/storage_service/rebuild", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRebuildPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRebuildPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRebuildPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceReleaseVersionGet gets release version + +Fetch a string representation of the Cassandra version. +*/ +func (a *Client) StorageServiceReleaseVersionGet(params *StorageServiceReleaseVersionGetParams) (*StorageServiceReleaseVersionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceReleaseVersionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceReleaseVersionGet", + Method: "GET", + PathPattern: "/storage_service/release_version", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceReleaseVersionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceReleaseVersionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceReleaseVersionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRelocalSchemaPost resets local schema + +Reset local schema +*/ +func (a *Client) StorageServiceRelocalSchemaPost(params *StorageServiceRelocalSchemaPostParams) (*StorageServiceRelocalSchemaPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRelocalSchemaPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRelocalSchemaPost", + Method: "POST", + PathPattern: "/storage_service/relocal_schema", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRelocalSchemaPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRelocalSchemaPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRelocalSchemaPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRemovalStatusGet gets removal status + +Get the status of a token removal. +*/ +func (a *Client) StorageServiceRemovalStatusGet(params *StorageServiceRemovalStatusGetParams) (*StorageServiceRemovalStatusGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRemovalStatusGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRemovalStatusGet", + Method: "GET", + PathPattern: "/storage_service/removal_status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRemovalStatusGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRemovalStatusGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRemovalStatusGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRemoveNodePost removes node + +Removes token (and all data associated with enpoint that had it) from the ring +*/ +func (a *Client) StorageServiceRemoveNodePost(params *StorageServiceRemoveNodePostParams) (*StorageServiceRemoveNodePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRemoveNodePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRemoveNodePost", + Method: "POST", + PathPattern: "/storage_service/remove_node", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRemoveNodePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRemoveNodePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRemoveNodePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRepairAsyncByKeyspaceGet repairs async status + +Track already running repair progress +*/ +func (a *Client) StorageServiceRepairAsyncByKeyspaceGet(params *StorageServiceRepairAsyncByKeyspaceGetParams) (*StorageServiceRepairAsyncByKeyspaceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRepairAsyncByKeyspaceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRepairAsyncByKeyspaceGet", + Method: "GET", + PathPattern: "/storage_service/repair_async/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRepairAsyncByKeyspaceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRepairAsyncByKeyspaceGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRepairAsyncByKeyspaceGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRepairAsyncByKeyspacePost repairs async + +Invoke repair asynchronously. You can track repair progress by using the get supplying id +*/ +func (a *Client) StorageServiceRepairAsyncByKeyspacePost(params *StorageServiceRepairAsyncByKeyspacePostParams) (*StorageServiceRepairAsyncByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRepairAsyncByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRepairAsyncByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/repair_async/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRepairAsyncByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRepairAsyncByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRepairAsyncByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRescheduleFailedDeletionsPost reschedules failed deletions + +Reschedule failed deletions +*/ +func (a *Client) StorageServiceRescheduleFailedDeletionsPost(params *StorageServiceRescheduleFailedDeletionsPostParams) (*StorageServiceRescheduleFailedDeletionsPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRescheduleFailedDeletionsPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRescheduleFailedDeletionsPost", + Method: "POST", + PathPattern: "/storage_service/reschedule_failed_deletions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRescheduleFailedDeletionsPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRescheduleFailedDeletionsPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRescheduleFailedDeletionsPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRPCServerDelete stops rpc server + +Allows a user to disable thrift +*/ +func (a *Client) StorageServiceRPCServerDelete(params *StorageServiceRPCServerDeleteParams) (*StorageServiceRPCServerDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRPCServerDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRpcServerDelete", + Method: "DELETE", + PathPattern: "/storage_service/rpc_server", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRPCServerDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRPCServerDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRPCServerDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRPCServerGet is rpc server running + +Determine if thrift is running +*/ +func (a *Client) StorageServiceRPCServerGet(params *StorageServiceRPCServerGetParams) (*StorageServiceRPCServerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRPCServerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRpcServerGet", + Method: "GET", + PathPattern: "/storage_service/rpc_server", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRPCServerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRPCServerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRPCServerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceRPCServerPost starts rpc server + +allows a user to reenable thrift +*/ +func (a *Client) StorageServiceRPCServerPost(params *StorageServiceRPCServerPostParams) (*StorageServiceRPCServerPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceRPCServerPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceRpcServerPost", + Method: "POST", + PathPattern: "/storage_service/rpc_server", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceRPCServerPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceRPCServerPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceRPCServerPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSampleKeyRangeGet samples key range + +Return a List of Tokens representing a sample of keys across all ColumnFamilyStores. +*/ +func (a *Client) StorageServiceSampleKeyRangeGet(params *StorageServiceSampleKeyRangeGetParams) (*StorageServiceSampleKeyRangeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSampleKeyRangeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSampleKeyRangeGet", + Method: "GET", + PathPattern: "/storage_service/sample_key_range", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSampleKeyRangeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSampleKeyRangeGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSampleKeyRangeGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSavedCachesLocationGet gets saved caches location + +Get location of the saved caches dir +*/ +func (a *Client) StorageServiceSavedCachesLocationGet(params *StorageServiceSavedCachesLocationGetParams) (*StorageServiceSavedCachesLocationGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSavedCachesLocationGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSavedCachesLocationGet", + Method: "GET", + PathPattern: "/storage_service/saved_caches/location", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSavedCachesLocationGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSavedCachesLocationGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSavedCachesLocationGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSchemaVersionGet gets schema version + +Fetch a string representation of the current Schema version. +*/ +func (a *Client) StorageServiceSchemaVersionGet(params *StorageServiceSchemaVersionGetParams) (*StorageServiceSchemaVersionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSchemaVersionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSchemaVersionGet", + Method: "GET", + PathPattern: "/storage_service/schema_version", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSchemaVersionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSchemaVersionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSchemaVersionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceScyllaReleaseVersionGet gets scylla release version + +Fetch a string representation of the Scylla version. +*/ +func (a *Client) StorageServiceScyllaReleaseVersionGet(params *StorageServiceScyllaReleaseVersionGetParams) (*StorageServiceScyllaReleaseVersionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceScyllaReleaseVersionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceScyllaReleaseVersionGet", + Method: "GET", + PathPattern: "/storage_service/scylla_release_version", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceScyllaReleaseVersionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceScyllaReleaseVersionGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceScyllaReleaseVersionGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSlowQueryGet gets slow query info + +Returns the slow query record configuration. +*/ +func (a *Client) StorageServiceSlowQueryGet(params *StorageServiceSlowQueryGetParams) (*StorageServiceSlowQueryGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSlowQueryGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSlowQueryGet", + Method: "GET", + PathPattern: "/storage_service/slow_query", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSlowQueryGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSlowQueryGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSlowQueryGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSlowQueryPost sets slow query + +Set slow query parameter +*/ +func (a *Client) StorageServiceSlowQueryPost(params *StorageServiceSlowQueryPostParams) (*StorageServiceSlowQueryPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSlowQueryPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSlowQueryPost", + Method: "POST", + PathPattern: "/storage_service/slow_query", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSlowQueryPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSlowQueryPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSlowQueryPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSnapshotsDelete dels snapshot + +Remove the snapshot with the given name from the given keyspaces. If no tag is specified all snapshots will be removed +*/ +func (a *Client) StorageServiceSnapshotsDelete(params *StorageServiceSnapshotsDeleteParams) (*StorageServiceSnapshotsDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSnapshotsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSnapshotsDelete", + Method: "DELETE", + PathPattern: "/storage_service/snapshots", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSnapshotsDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSnapshotsDeleteOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSnapshotsDeleteDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSnapshotsGet gets snapshot details + +Get the details of all the snapshot +*/ +func (a *Client) StorageServiceSnapshotsGet(params *StorageServiceSnapshotsGetParams) (*StorageServiceSnapshotsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSnapshotsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSnapshotsGet", + Method: "GET", + PathPattern: "/storage_service/snapshots", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSnapshotsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSnapshotsGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSnapshotsGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSnapshotsPost takes snapshot + +Takes the snapshot for the given keyspaces. A snapshot name must be specified. +*/ +func (a *Client) StorageServiceSnapshotsPost(params *StorageServiceSnapshotsPostParams) (*StorageServiceSnapshotsPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSnapshotsPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSnapshotsPost", + Method: "POST", + PathPattern: "/storage_service/snapshots", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSnapshotsPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSnapshotsPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSnapshotsPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSnapshotsSizeTrueGet trues snapshots size + +Get the true size taken by all snapshots across all keyspaces. +*/ +func (a *Client) StorageServiceSnapshotsSizeTrueGet(params *StorageServiceSnapshotsSizeTrueGetParams) (*StorageServiceSnapshotsSizeTrueGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSnapshotsSizeTrueGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSnapshotsSizeTrueGet", + Method: "GET", + PathPattern: "/storage_service/snapshots/size/true", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSnapshotsSizeTrueGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSnapshotsSizeTrueGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSnapshotsSizeTrueGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceSstablesByKeyspacePost loads new ss tables + +Load new SSTables to the given keyspace/columnFamily +*/ +func (a *Client) StorageServiceSstablesByKeyspacePost(params *StorageServiceSstablesByKeyspacePostParams) (*StorageServiceSstablesByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceSstablesByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceSstablesByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/sstables/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceSstablesByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceSstablesByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceSstablesByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceStopDaemonPost stops daemon + +allows a user to forcibly completely stop cassandra +*/ +func (a *Client) StorageServiceStopDaemonPost(params *StorageServiceStopDaemonPostParams) (*StorageServiceStopDaemonPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceStopDaemonPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceStopDaemonPost", + Method: "POST", + PathPattern: "/storage_service/stop_daemon", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceStopDaemonPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceStopDaemonPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceStopDaemonPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceStreamThroughputGet gets stream throughput mb per sec + +Get stream throughput mb per sec +*/ +func (a *Client) StorageServiceStreamThroughputGet(params *StorageServiceStreamThroughputGetParams) (*StorageServiceStreamThroughputGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceStreamThroughputGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceStreamThroughputGet", + Method: "GET", + PathPattern: "/storage_service/stream_throughput", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceStreamThroughputGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceStreamThroughputGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceStreamThroughputGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceStreamThroughputPost sets stream throughput mb per sec + +set stream throughput mb per sec +*/ +func (a *Client) StorageServiceStreamThroughputPost(params *StorageServiceStreamThroughputPostParams) (*StorageServiceStreamThroughputPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceStreamThroughputPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceStreamThroughputPost", + Method: "POST", + PathPattern: "/storage_service/stream_throughput", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceStreamThroughputPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceStreamThroughputPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceStreamThroughputPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTokensByEndpointGet gets node tokens + +Returns a list of the tokens for or a specified node +*/ +func (a *Client) StorageServiceTokensByEndpointGet(params *StorageServiceTokensByEndpointGetParams) (*StorageServiceTokensByEndpointGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTokensByEndpointGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTokensByEndpointGet", + Method: "GET", + PathPattern: "/storage_service/tokens/{endpoint}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTokensByEndpointGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTokensByEndpointGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTokensByEndpointGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTokensEndpointGet gets token endpoint + +Returns a list of the tokens endpoint mapping +*/ +func (a *Client) StorageServiceTokensEndpointGet(params *StorageServiceTokensEndpointGetParams) (*StorageServiceTokensEndpointGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTokensEndpointGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTokensEndpointGet", + Method: "GET", + PathPattern: "/storage_service/tokens_endpoint", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTokensEndpointGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTokensEndpointGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTokensEndpointGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTokensGet gets tokens + +Returns a list of the tokens for this node +*/ +func (a *Client) StorageServiceTokensGet(params *StorageServiceTokensGetParams) (*StorageServiceTokensGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTokensGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTokensGet", + Method: "GET", + PathPattern: "/storage_service/tokens", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTokensGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTokensGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTokensGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTombstoneFailureThresholdGet gets tombstone failure threshold +*/ +func (a *Client) StorageServiceTombstoneFailureThresholdGet(params *StorageServiceTombstoneFailureThresholdGetParams) (*StorageServiceTombstoneFailureThresholdGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTombstoneFailureThresholdGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTombstoneFailureThresholdGet", + Method: "GET", + PathPattern: "/storage_service/tombstone_failure_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTombstoneFailureThresholdGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTombstoneFailureThresholdGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTombstoneFailureThresholdGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTombstoneFailureThresholdPost sets tombstone failure threshold +*/ +func (a *Client) StorageServiceTombstoneFailureThresholdPost(params *StorageServiceTombstoneFailureThresholdPostParams) (*StorageServiceTombstoneFailureThresholdPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTombstoneFailureThresholdPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTombstoneFailureThresholdPost", + Method: "POST", + PathPattern: "/storage_service/tombstone_failure_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTombstoneFailureThresholdPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTombstoneFailureThresholdPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTombstoneFailureThresholdPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTombstoneWarnThresholdGet gets tombstone warn threshold + +Returns the threshold for warning of queries with many tombstones +*/ +func (a *Client) StorageServiceTombstoneWarnThresholdGet(params *StorageServiceTombstoneWarnThresholdGetParams) (*StorageServiceTombstoneWarnThresholdGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTombstoneWarnThresholdGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTombstoneWarnThresholdGet", + Method: "GET", + PathPattern: "/storage_service/tombstone_warn_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTombstoneWarnThresholdGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTombstoneWarnThresholdGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTombstoneWarnThresholdGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTombstoneWarnThresholdPost sets tombstone warn threshold + +Sets the threshold for warning queries with many tombstones +*/ +func (a *Client) StorageServiceTombstoneWarnThresholdPost(params *StorageServiceTombstoneWarnThresholdPostParams) (*StorageServiceTombstoneWarnThresholdPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTombstoneWarnThresholdPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTombstoneWarnThresholdPost", + Method: "POST", + PathPattern: "/storage_service/tombstone_warn_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTombstoneWarnThresholdPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTombstoneWarnThresholdPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTombstoneWarnThresholdPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTraceProbabilityGet gets trace probability + +Returns the configured tracing probability. +*/ +func (a *Client) StorageServiceTraceProbabilityGet(params *StorageServiceTraceProbabilityGetParams) (*StorageServiceTraceProbabilityGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTraceProbabilityGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTraceProbabilityGet", + Method: "GET", + PathPattern: "/storage_service/trace_probability", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTraceProbabilityGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTraceProbabilityGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTraceProbabilityGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTraceProbabilityPost sets trace probability + +Enables/Disables tracing for the whole system. Only thrift requests can start tracing currently +*/ +func (a *Client) StorageServiceTraceProbabilityPost(params *StorageServiceTraceProbabilityPostParams) (*StorageServiceTraceProbabilityPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTraceProbabilityPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTraceProbabilityPost", + Method: "POST", + PathPattern: "/storage_service/trace_probability", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTraceProbabilityPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTraceProbabilityPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTraceProbabilityPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceTruncateByKeyspacePost truncates + +Truncates (deletes) the given columnFamily from the provided keyspace. Calling truncate results in actual deletion of all data in the cluster under the given columnFamily and it will fail unless all hosts are up. All data in the given column family will be deleted, but its definition will not be affected. +*/ +func (a *Client) StorageServiceTruncateByKeyspacePost(params *StorageServiceTruncateByKeyspacePostParams) (*StorageServiceTruncateByKeyspacePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceTruncateByKeyspacePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceTruncateByKeyspacePost", + Method: "POST", + PathPattern: "/storage_service/truncate/{keyspace}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceTruncateByKeyspacePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceTruncateByKeyspacePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceTruncateByKeyspacePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceUpdateSnitchPost updates snitch + +Change endpointsnitch class and dynamic-ness (and dynamic attributes) at runtime +*/ +func (a *Client) StorageServiceUpdateSnitchPost(params *StorageServiceUpdateSnitchPostParams) (*StorageServiceUpdateSnitchPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceUpdateSnitchPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceUpdateSnitchPost", + Method: "POST", + PathPattern: "/storage_service/update_snitch", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceUpdateSnitchPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceUpdateSnitchPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceUpdateSnitchPostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StorageServiceViewBuildStatusesByKeyspaceAndViewGet views build statuses + +Gets the progress of a materialized view build +*/ +func (a *Client) StorageServiceViewBuildStatusesByKeyspaceAndViewGet(params *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) (*StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StorageServiceViewBuildStatusesByKeyspaceAndViewGet", + Method: "GET", + PathPattern: "/storage_service/view_build_statuses/{keyspace}/{view}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StorageServiceViewBuildStatusesByKeyspaceAndViewGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerGet gets current streams + +Returns the current state of all ongoing streams. +*/ +func (a *Client) StreamManagerGet(params *StreamManagerGetParams) (*StreamManagerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerGet", + Method: "GET", + PathPattern: "/stream_manager/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerMetricsIncomingByPeerGet gets total incoming bytes + +Get total incoming bytes +*/ +func (a *Client) StreamManagerMetricsIncomingByPeerGet(params *StreamManagerMetricsIncomingByPeerGetParams) (*StreamManagerMetricsIncomingByPeerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerMetricsIncomingByPeerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerMetricsIncomingByPeerGet", + Method: "GET", + PathPattern: "/stream_manager/metrics/incoming/{peer}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerMetricsIncomingByPeerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerMetricsIncomingByPeerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerMetricsIncomingByPeerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerMetricsIncomingGet gets all total incoming bytes + +Get all total incoming bytes +*/ +func (a *Client) StreamManagerMetricsIncomingGet(params *StreamManagerMetricsIncomingGetParams) (*StreamManagerMetricsIncomingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerMetricsIncomingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerMetricsIncomingGet", + Method: "GET", + PathPattern: "/stream_manager/metrics/incoming", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerMetricsIncomingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerMetricsIncomingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerMetricsIncomingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerMetricsOutboundGet gets all active streams outbound + +Get number of active outbound streams +*/ +func (a *Client) StreamManagerMetricsOutboundGet(params *StreamManagerMetricsOutboundGetParams) (*StreamManagerMetricsOutboundGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerMetricsOutboundGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerMetricsOutboundGet", + Method: "GET", + PathPattern: "/stream_manager/metrics/outbound", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerMetricsOutboundGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerMetricsOutboundGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerMetricsOutboundGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerMetricsOutgoingByPeerGet gets total outgoing bytes + +Get total outgoing bytes +*/ +func (a *Client) StreamManagerMetricsOutgoingByPeerGet(params *StreamManagerMetricsOutgoingByPeerGetParams) (*StreamManagerMetricsOutgoingByPeerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerMetricsOutgoingByPeerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerMetricsOutgoingByPeerGet", + Method: "GET", + PathPattern: "/stream_manager/metrics/outgoing/{peer}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerMetricsOutgoingByPeerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerMetricsOutgoingByPeerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerMetricsOutgoingByPeerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +StreamManagerMetricsOutgoingGet gets all total outgoing bytes + +Get all total outgoing bytes +*/ +func (a *Client) StreamManagerMetricsOutgoingGet(params *StreamManagerMetricsOutgoingGetParams) (*StreamManagerMetricsOutgoingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewStreamManagerMetricsOutgoingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "StreamManagerMetricsOutgoingGet", + Method: "GET", + PathPattern: "/stream_manager/metrics/outgoing", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &StreamManagerMetricsOutgoingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*StreamManagerMetricsOutgoingGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*StreamManagerMetricsOutgoingGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SystemLoggerByNameGet gets logger level + +Get logger level +*/ +func (a *Client) SystemLoggerByNameGet(params *SystemLoggerByNameGetParams) (*SystemLoggerByNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSystemLoggerByNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SystemLoggerByNameGet", + Method: "GET", + PathPattern: "/system/logger/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SystemLoggerByNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SystemLoggerByNameGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SystemLoggerByNameGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SystemLoggerByNamePost sets logger level + +Set logger level +*/ +func (a *Client) SystemLoggerByNamePost(params *SystemLoggerByNamePostParams) (*SystemLoggerByNamePostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSystemLoggerByNamePostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SystemLoggerByNamePost", + Method: "POST", + PathPattern: "/system/logger/{name}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SystemLoggerByNamePostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SystemLoggerByNamePostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SystemLoggerByNamePostDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SystemLoggerGet gets all logger names + +Get all logger names +*/ +func (a *Client) SystemLoggerGet(params *SystemLoggerGetParams) (*SystemLoggerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSystemLoggerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SystemLoggerGet", + Method: "GET", + PathPattern: "/system/logger", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SystemLoggerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SystemLoggerGetOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SystemLoggerGetDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +SystemLoggerPost sets all logger level + +Set all logger level +*/ +func (a *Client) SystemLoggerPost(params *SystemLoggerPostParams) (*SystemLoggerPostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewSystemLoggerPostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "SystemLoggerPost", + Method: "POST", + PathPattern: "/system/logger", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &SystemLoggerPostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*SystemLoggerPostOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*SystemLoggerPostDefault) + 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/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_parameters.go new file mode 100644 index 00000000000..46a4249b292 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSnitchDatacenterGetParams creates a new SnitchDatacenterGetParams object +// with the default values initialized. +func NewSnitchDatacenterGetParams() *SnitchDatacenterGetParams { + var () + return &SnitchDatacenterGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSnitchDatacenterGetParamsWithTimeout creates a new SnitchDatacenterGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSnitchDatacenterGetParamsWithTimeout(timeout time.Duration) *SnitchDatacenterGetParams { + var () + return &SnitchDatacenterGetParams{ + + timeout: timeout, + } +} + +// NewSnitchDatacenterGetParamsWithContext creates a new SnitchDatacenterGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewSnitchDatacenterGetParamsWithContext(ctx context.Context) *SnitchDatacenterGetParams { + var () + return &SnitchDatacenterGetParams{ + + Context: ctx, + } +} + +// NewSnitchDatacenterGetParamsWithHTTPClient creates a new SnitchDatacenterGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSnitchDatacenterGetParamsWithHTTPClient(client *http.Client) *SnitchDatacenterGetParams { + var () + return &SnitchDatacenterGetParams{ + HTTPClient: client, + } +} + +/*SnitchDatacenterGetParams contains all the parameters to send to the API endpoint +for the snitch datacenter get operation typically these are written to a http.Request +*/ +type SnitchDatacenterGetParams struct { + + /*Host + The host name. If absent, the local server broadcast/listen address is used + + */ + Host *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) WithTimeout(timeout time.Duration) *SnitchDatacenterGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) WithContext(ctx context.Context) *SnitchDatacenterGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) WithHTTPClient(client *http.Client) *SnitchDatacenterGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHost adds the host to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) WithHost(host *string) *SnitchDatacenterGetParams { + o.SetHost(host) + return o +} + +// SetHost adds the host to the snitch datacenter get params +func (o *SnitchDatacenterGetParams) SetHost(host *string) { + o.Host = host +} + +// WriteToRequest writes these params to a swagger request +func (o *SnitchDatacenterGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Host != nil { + + // query param host + var qrHost string + if o.Host != nil { + qrHost = *o.Host + } + qHost := qrHost + if qHost != "" { + if err := r.SetQueryParam("host", qHost); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_responses.go new file mode 100644 index 00000000000..55339558a22 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_datacenter_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SnitchDatacenterGetReader is a Reader for the SnitchDatacenterGet structure. +type SnitchDatacenterGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SnitchDatacenterGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSnitchDatacenterGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSnitchDatacenterGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSnitchDatacenterGetOK creates a SnitchDatacenterGetOK with default headers values +func NewSnitchDatacenterGetOK() *SnitchDatacenterGetOK { + return &SnitchDatacenterGetOK{} +} + +/*SnitchDatacenterGetOK handles this case with default header values. + +SnitchDatacenterGetOK snitch datacenter get o k +*/ +type SnitchDatacenterGetOK struct { + Payload string +} + +func (o *SnitchDatacenterGetOK) GetPayload() string { + return o.Payload +} + +func (o *SnitchDatacenterGetOK) 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 +} + +// NewSnitchDatacenterGetDefault creates a SnitchDatacenterGetDefault with default headers values +func NewSnitchDatacenterGetDefault(code int) *SnitchDatacenterGetDefault { + return &SnitchDatacenterGetDefault{ + _statusCode: code, + } +} + +/*SnitchDatacenterGetDefault handles this case with default header values. + +internal server error +*/ +type SnitchDatacenterGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the snitch datacenter get default response +func (o *SnitchDatacenterGetDefault) Code() int { + return o._statusCode +} + +func (o *SnitchDatacenterGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SnitchDatacenterGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SnitchDatacenterGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_parameters.go new file mode 100644 index 00000000000..7a141b10cf6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSnitchNameGetParams creates a new SnitchNameGetParams object +// with the default values initialized. +func NewSnitchNameGetParams() *SnitchNameGetParams { + + return &SnitchNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSnitchNameGetParamsWithTimeout creates a new SnitchNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSnitchNameGetParamsWithTimeout(timeout time.Duration) *SnitchNameGetParams { + + return &SnitchNameGetParams{ + + timeout: timeout, + } +} + +// NewSnitchNameGetParamsWithContext creates a new SnitchNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewSnitchNameGetParamsWithContext(ctx context.Context) *SnitchNameGetParams { + + return &SnitchNameGetParams{ + + Context: ctx, + } +} + +// NewSnitchNameGetParamsWithHTTPClient creates a new SnitchNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSnitchNameGetParamsWithHTTPClient(client *http.Client) *SnitchNameGetParams { + + return &SnitchNameGetParams{ + HTTPClient: client, + } +} + +/*SnitchNameGetParams contains all the parameters to send to the API endpoint +for the snitch name get operation typically these are written to a http.Request +*/ +type SnitchNameGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the snitch name get params +func (o *SnitchNameGetParams) WithTimeout(timeout time.Duration) *SnitchNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the snitch name get params +func (o *SnitchNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the snitch name get params +func (o *SnitchNameGetParams) WithContext(ctx context.Context) *SnitchNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the snitch name get params +func (o *SnitchNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the snitch name get params +func (o *SnitchNameGetParams) WithHTTPClient(client *http.Client) *SnitchNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the snitch name get params +func (o *SnitchNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *SnitchNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_responses.go new file mode 100644 index 00000000000..0f04e235f4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SnitchNameGetReader is a Reader for the SnitchNameGet structure. +type SnitchNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SnitchNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSnitchNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSnitchNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSnitchNameGetOK creates a SnitchNameGetOK with default headers values +func NewSnitchNameGetOK() *SnitchNameGetOK { + return &SnitchNameGetOK{} +} + +/*SnitchNameGetOK handles this case with default header values. + +SnitchNameGetOK snitch name get o k +*/ +type SnitchNameGetOK struct { + Payload string +} + +func (o *SnitchNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *SnitchNameGetOK) 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 +} + +// NewSnitchNameGetDefault creates a SnitchNameGetDefault with default headers values +func NewSnitchNameGetDefault(code int) *SnitchNameGetDefault { + return &SnitchNameGetDefault{ + _statusCode: code, + } +} + +/*SnitchNameGetDefault handles this case with default header values. + +internal server error +*/ +type SnitchNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the snitch name get default response +func (o *SnitchNameGetDefault) Code() int { + return o._statusCode +} + +func (o *SnitchNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SnitchNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SnitchNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_parameters.go new file mode 100644 index 00000000000..c9b83069af2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSnitchRackGetParams creates a new SnitchRackGetParams object +// with the default values initialized. +func NewSnitchRackGetParams() *SnitchRackGetParams { + var () + return &SnitchRackGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSnitchRackGetParamsWithTimeout creates a new SnitchRackGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSnitchRackGetParamsWithTimeout(timeout time.Duration) *SnitchRackGetParams { + var () + return &SnitchRackGetParams{ + + timeout: timeout, + } +} + +// NewSnitchRackGetParamsWithContext creates a new SnitchRackGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewSnitchRackGetParamsWithContext(ctx context.Context) *SnitchRackGetParams { + var () + return &SnitchRackGetParams{ + + Context: ctx, + } +} + +// NewSnitchRackGetParamsWithHTTPClient creates a new SnitchRackGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSnitchRackGetParamsWithHTTPClient(client *http.Client) *SnitchRackGetParams { + var () + return &SnitchRackGetParams{ + HTTPClient: client, + } +} + +/*SnitchRackGetParams contains all the parameters to send to the API endpoint +for the snitch rack get operation typically these are written to a http.Request +*/ +type SnitchRackGetParams struct { + + /*Host + The host name. If absent, the local server broadcast/listen address is used + + */ + Host *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the snitch rack get params +func (o *SnitchRackGetParams) WithTimeout(timeout time.Duration) *SnitchRackGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the snitch rack get params +func (o *SnitchRackGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the snitch rack get params +func (o *SnitchRackGetParams) WithContext(ctx context.Context) *SnitchRackGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the snitch rack get params +func (o *SnitchRackGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the snitch rack get params +func (o *SnitchRackGetParams) WithHTTPClient(client *http.Client) *SnitchRackGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the snitch rack get params +func (o *SnitchRackGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHost adds the host to the snitch rack get params +func (o *SnitchRackGetParams) WithHost(host *string) *SnitchRackGetParams { + o.SetHost(host) + return o +} + +// SetHost adds the host to the snitch rack get params +func (o *SnitchRackGetParams) SetHost(host *string) { + o.Host = host +} + +// WriteToRequest writes these params to a swagger request +func (o *SnitchRackGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Host != nil { + + // query param host + var qrHost string + if o.Host != nil { + qrHost = *o.Host + } + qHost := qrHost + if qHost != "" { + if err := r.SetQueryParam("host", qHost); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_responses.go new file mode 100644 index 00000000000..bc99d9cf105 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/snitch_rack_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SnitchRackGetReader is a Reader for the SnitchRackGet structure. +type SnitchRackGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SnitchRackGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSnitchRackGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSnitchRackGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSnitchRackGetOK creates a SnitchRackGetOK with default headers values +func NewSnitchRackGetOK() *SnitchRackGetOK { + return &SnitchRackGetOK{} +} + +/*SnitchRackGetOK handles this case with default header values. + +SnitchRackGetOK snitch rack get o k +*/ +type SnitchRackGetOK struct { + Payload string +} + +func (o *SnitchRackGetOK) GetPayload() string { + return o.Payload +} + +func (o *SnitchRackGetOK) 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 +} + +// NewSnitchRackGetDefault creates a SnitchRackGetDefault with default headers values +func NewSnitchRackGetDefault(code int) *SnitchRackGetDefault { + return &SnitchRackGetDefault{ + _statusCode: code, + } +} + +/*SnitchRackGetDefault handles this case with default header values. + +internal server error +*/ +type SnitchRackGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the snitch rack get default response +func (o *SnitchRackGetDefault) Code() int { + return o._statusCode +} + +func (o *SnitchRackGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SnitchRackGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SnitchRackGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_parameters.go new file mode 100644 index 00000000000..1c6293810b4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyCasContentionTimeoutGetParams creates a new StorageProxyCasContentionTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyCasContentionTimeoutGetParams() *StorageProxyCasContentionTimeoutGetParams { + + return &StorageProxyCasContentionTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyCasContentionTimeoutGetParamsWithTimeout creates a new StorageProxyCasContentionTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyCasContentionTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyCasContentionTimeoutGetParams { + + return &StorageProxyCasContentionTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyCasContentionTimeoutGetParamsWithContext creates a new StorageProxyCasContentionTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyCasContentionTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyCasContentionTimeoutGetParams { + + return &StorageProxyCasContentionTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyCasContentionTimeoutGetParamsWithHTTPClient creates a new StorageProxyCasContentionTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyCasContentionTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyCasContentionTimeoutGetParams { + + return &StorageProxyCasContentionTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyCasContentionTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy cas contention timeout get operation typically these are written to a http.Request +*/ +type StorageProxyCasContentionTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyCasContentionTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyCasContentionTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyCasContentionTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy cas contention timeout get params +func (o *StorageProxyCasContentionTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyCasContentionTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_responses.go new file mode 100644 index 00000000000..46c858a3162 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyCasContentionTimeoutGetReader is a Reader for the StorageProxyCasContentionTimeoutGet structure. +type StorageProxyCasContentionTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyCasContentionTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyCasContentionTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyCasContentionTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyCasContentionTimeoutGetOK creates a StorageProxyCasContentionTimeoutGetOK with default headers values +func NewStorageProxyCasContentionTimeoutGetOK() *StorageProxyCasContentionTimeoutGetOK { + return &StorageProxyCasContentionTimeoutGetOK{} +} + +/*StorageProxyCasContentionTimeoutGetOK handles this case with default header values. + +StorageProxyCasContentionTimeoutGetOK storage proxy cas contention timeout get o k +*/ +type StorageProxyCasContentionTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyCasContentionTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyCasContentionTimeoutGetOK) 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 +} + +// NewStorageProxyCasContentionTimeoutGetDefault creates a StorageProxyCasContentionTimeoutGetDefault with default headers values +func NewStorageProxyCasContentionTimeoutGetDefault(code int) *StorageProxyCasContentionTimeoutGetDefault { + return &StorageProxyCasContentionTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyCasContentionTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyCasContentionTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy cas contention timeout get default response +func (o *StorageProxyCasContentionTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyCasContentionTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyCasContentionTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyCasContentionTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_parameters.go new file mode 100644 index 00000000000..756cbf03b67 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyCasContentionTimeoutPostParams creates a new StorageProxyCasContentionTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyCasContentionTimeoutPostParams() *StorageProxyCasContentionTimeoutPostParams { + var () + return &StorageProxyCasContentionTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyCasContentionTimeoutPostParamsWithTimeout creates a new StorageProxyCasContentionTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyCasContentionTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyCasContentionTimeoutPostParams { + var () + return &StorageProxyCasContentionTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyCasContentionTimeoutPostParamsWithContext creates a new StorageProxyCasContentionTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyCasContentionTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyCasContentionTimeoutPostParams { + var () + return &StorageProxyCasContentionTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyCasContentionTimeoutPostParamsWithHTTPClient creates a new StorageProxyCasContentionTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyCasContentionTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyCasContentionTimeoutPostParams { + var () + return &StorageProxyCasContentionTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyCasContentionTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy cas contention timeout post operation typically these are written to a http.Request +*/ +type StorageProxyCasContentionTimeoutPostParams struct { + + /*Timeout + timeout in second + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyCasContentionTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyCasContentionTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyCasContentionTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) WithTimeout(timeout string) *StorageProxyCasContentionTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy cas contention timeout post params +func (o *StorageProxyCasContentionTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyCasContentionTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_responses.go new file mode 100644 index 00000000000..44a27cfcce9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_cas_contention_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyCasContentionTimeoutPostReader is a Reader for the StorageProxyCasContentionTimeoutPost structure. +type StorageProxyCasContentionTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyCasContentionTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyCasContentionTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyCasContentionTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyCasContentionTimeoutPostOK creates a StorageProxyCasContentionTimeoutPostOK with default headers values +func NewStorageProxyCasContentionTimeoutPostOK() *StorageProxyCasContentionTimeoutPostOK { + return &StorageProxyCasContentionTimeoutPostOK{} +} + +/*StorageProxyCasContentionTimeoutPostOK handles this case with default header values. + +StorageProxyCasContentionTimeoutPostOK storage proxy cas contention timeout post o k +*/ +type StorageProxyCasContentionTimeoutPostOK struct { +} + +func (o *StorageProxyCasContentionTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyCasContentionTimeoutPostDefault creates a StorageProxyCasContentionTimeoutPostDefault with default headers values +func NewStorageProxyCasContentionTimeoutPostDefault(code int) *StorageProxyCasContentionTimeoutPostDefault { + return &StorageProxyCasContentionTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyCasContentionTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyCasContentionTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy cas contention timeout post default response +func (o *StorageProxyCasContentionTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyCasContentionTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyCasContentionTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyCasContentionTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..a1990451a2f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyCounterWriteRPCTimeoutGetParams creates a new StorageProxyCounterWriteRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyCounterWriteRPCTimeoutGetParams() *StorageProxyCounterWriteRPCTimeoutGetParams { + + return &StorageProxyCounterWriteRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutGetParamsWithTimeout creates a new StorageProxyCounterWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyCounterWriteRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyCounterWriteRPCTimeoutGetParams { + + return &StorageProxyCounterWriteRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutGetParamsWithContext creates a new StorageProxyCounterWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyCounterWriteRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyCounterWriteRPCTimeoutGetParams { + + return &StorageProxyCounterWriteRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyCounterWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyCounterWriteRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyCounterWriteRPCTimeoutGetParams { + + return &StorageProxyCounterWriteRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyCounterWriteRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy counter write Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyCounterWriteRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyCounterWriteRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyCounterWriteRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyCounterWriteRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy counter write Rpc timeout get params +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyCounterWriteRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..d1c28e7da38 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyCounterWriteRPCTimeoutGetReader is a Reader for the StorageProxyCounterWriteRPCTimeoutGet structure. +type StorageProxyCounterWriteRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyCounterWriteRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyCounterWriteRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyCounterWriteRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyCounterWriteRPCTimeoutGetOK creates a StorageProxyCounterWriteRPCTimeoutGetOK with default headers values +func NewStorageProxyCounterWriteRPCTimeoutGetOK() *StorageProxyCounterWriteRPCTimeoutGetOK { + return &StorageProxyCounterWriteRPCTimeoutGetOK{} +} + +/*StorageProxyCounterWriteRPCTimeoutGetOK handles this case with default header values. + +StorageProxyCounterWriteRPCTimeoutGetOK storage proxy counter write Rpc timeout get o k +*/ +type StorageProxyCounterWriteRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyCounterWriteRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyCounterWriteRPCTimeoutGetOK) 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 +} + +// NewStorageProxyCounterWriteRPCTimeoutGetDefault creates a StorageProxyCounterWriteRPCTimeoutGetDefault with default headers values +func NewStorageProxyCounterWriteRPCTimeoutGetDefault(code int) *StorageProxyCounterWriteRPCTimeoutGetDefault { + return &StorageProxyCounterWriteRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyCounterWriteRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyCounterWriteRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy counter write Rpc timeout get default response +func (o *StorageProxyCounterWriteRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyCounterWriteRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyCounterWriteRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyCounterWriteRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..da7ef1db26f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyCounterWriteRPCTimeoutPostParams creates a new StorageProxyCounterWriteRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyCounterWriteRPCTimeoutPostParams() *StorageProxyCounterWriteRPCTimeoutPostParams { + var () + return &StorageProxyCounterWriteRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutPostParamsWithTimeout creates a new StorageProxyCounterWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyCounterWriteRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyCounterWriteRPCTimeoutPostParams { + var () + return &StorageProxyCounterWriteRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutPostParamsWithContext creates a new StorageProxyCounterWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyCounterWriteRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyCounterWriteRPCTimeoutPostParams { + var () + return &StorageProxyCounterWriteRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyCounterWriteRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyCounterWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyCounterWriteRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyCounterWriteRPCTimeoutPostParams { + var () + return &StorageProxyCounterWriteRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyCounterWriteRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy counter write Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyCounterWriteRPCTimeoutPostParams struct { + + /*Timeout + timeout in seconds + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyCounterWriteRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyCounterWriteRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyCounterWriteRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyCounterWriteRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy counter write Rpc timeout post params +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyCounterWriteRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..0e43066d6a8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_counter_write_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyCounterWriteRPCTimeoutPostReader is a Reader for the StorageProxyCounterWriteRPCTimeoutPost structure. +type StorageProxyCounterWriteRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyCounterWriteRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyCounterWriteRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyCounterWriteRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyCounterWriteRPCTimeoutPostOK creates a StorageProxyCounterWriteRPCTimeoutPostOK with default headers values +func NewStorageProxyCounterWriteRPCTimeoutPostOK() *StorageProxyCounterWriteRPCTimeoutPostOK { + return &StorageProxyCounterWriteRPCTimeoutPostOK{} +} + +/*StorageProxyCounterWriteRPCTimeoutPostOK handles this case with default header values. + +StorageProxyCounterWriteRPCTimeoutPostOK storage proxy counter write Rpc timeout post o k +*/ +type StorageProxyCounterWriteRPCTimeoutPostOK struct { +} + +func (o *StorageProxyCounterWriteRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyCounterWriteRPCTimeoutPostDefault creates a StorageProxyCounterWriteRPCTimeoutPostDefault with default headers values +func NewStorageProxyCounterWriteRPCTimeoutPostDefault(code int) *StorageProxyCounterWriteRPCTimeoutPostDefault { + return &StorageProxyCounterWriteRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyCounterWriteRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyCounterWriteRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy counter write Rpc timeout post default response +func (o *StorageProxyCounterWriteRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyCounterWriteRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyCounterWriteRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyCounterWriteRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_parameters.go new file mode 100644 index 00000000000..3bc7606a76c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyHintedHandoffEnabledByDcGetParams creates a new StorageProxyHintedHandoffEnabledByDcGetParams object +// with the default values initialized. +func NewStorageProxyHintedHandoffEnabledByDcGetParams() *StorageProxyHintedHandoffEnabledByDcGetParams { + + return &StorageProxyHintedHandoffEnabledByDcGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcGetParamsWithTimeout creates a new StorageProxyHintedHandoffEnabledByDcGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyHintedHandoffEnabledByDcGetParamsWithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledByDcGetParams { + + return &StorageProxyHintedHandoffEnabledByDcGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcGetParamsWithContext creates a new StorageProxyHintedHandoffEnabledByDcGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyHintedHandoffEnabledByDcGetParamsWithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledByDcGetParams { + + return &StorageProxyHintedHandoffEnabledByDcGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcGetParamsWithHTTPClient creates a new StorageProxyHintedHandoffEnabledByDcGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyHintedHandoffEnabledByDcGetParamsWithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledByDcGetParams { + + return &StorageProxyHintedHandoffEnabledByDcGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyHintedHandoffEnabledByDcGetParams contains all the parameters to send to the API endpoint +for the storage proxy hinted handoff enabled by dc get operation typically these are written to a http.Request +*/ +type StorageProxyHintedHandoffEnabledByDcGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) WithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledByDcGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) WithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledByDcGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) WithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledByDcGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled by dc get params +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyHintedHandoffEnabledByDcGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_responses.go new file mode 100644 index 00000000000..5825e23a0d3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyHintedHandoffEnabledByDcGetReader is a Reader for the StorageProxyHintedHandoffEnabledByDcGet structure. +type StorageProxyHintedHandoffEnabledByDcGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyHintedHandoffEnabledByDcGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyHintedHandoffEnabledByDcGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyHintedHandoffEnabledByDcGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyHintedHandoffEnabledByDcGetOK creates a StorageProxyHintedHandoffEnabledByDcGetOK with default headers values +func NewStorageProxyHintedHandoffEnabledByDcGetOK() *StorageProxyHintedHandoffEnabledByDcGetOK { + return &StorageProxyHintedHandoffEnabledByDcGetOK{} +} + +/*StorageProxyHintedHandoffEnabledByDcGetOK handles this case with default header values. + +StorageProxyHintedHandoffEnabledByDcGetOK storage proxy hinted handoff enabled by dc get o k +*/ +type StorageProxyHintedHandoffEnabledByDcGetOK struct { + Payload []*models.MapperList +} + +func (o *StorageProxyHintedHandoffEnabledByDcGetOK) GetPayload() []*models.MapperList { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledByDcGetOK) 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 +} + +// NewStorageProxyHintedHandoffEnabledByDcGetDefault creates a StorageProxyHintedHandoffEnabledByDcGetDefault with default headers values +func NewStorageProxyHintedHandoffEnabledByDcGetDefault(code int) *StorageProxyHintedHandoffEnabledByDcGetDefault { + return &StorageProxyHintedHandoffEnabledByDcGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyHintedHandoffEnabledByDcGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyHintedHandoffEnabledByDcGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy hinted handoff enabled by dc get default response +func (o *StorageProxyHintedHandoffEnabledByDcGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyHintedHandoffEnabledByDcGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledByDcGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyHintedHandoffEnabledByDcGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_parameters.go new file mode 100644 index 00000000000..246d74ecff0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyHintedHandoffEnabledByDcPostParams creates a new StorageProxyHintedHandoffEnabledByDcPostParams object +// with the default values initialized. +func NewStorageProxyHintedHandoffEnabledByDcPostParams() *StorageProxyHintedHandoffEnabledByDcPostParams { + var () + return &StorageProxyHintedHandoffEnabledByDcPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcPostParamsWithTimeout creates a new StorageProxyHintedHandoffEnabledByDcPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyHintedHandoffEnabledByDcPostParamsWithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledByDcPostParams { + var () + return &StorageProxyHintedHandoffEnabledByDcPostParams{ + + timeout: timeout, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcPostParamsWithContext creates a new StorageProxyHintedHandoffEnabledByDcPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyHintedHandoffEnabledByDcPostParamsWithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledByDcPostParams { + var () + return &StorageProxyHintedHandoffEnabledByDcPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyHintedHandoffEnabledByDcPostParamsWithHTTPClient creates a new StorageProxyHintedHandoffEnabledByDcPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyHintedHandoffEnabledByDcPostParamsWithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledByDcPostParams { + var () + return &StorageProxyHintedHandoffEnabledByDcPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyHintedHandoffEnabledByDcPostParams contains all the parameters to send to the API endpoint +for the storage proxy hinted handoff enabled by dc post operation typically these are written to a http.Request +*/ +type StorageProxyHintedHandoffEnabledByDcPostParams struct { + + /*Dcs + The dcs to enable in the CSV format + + */ + Dcs string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) WithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledByDcPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) WithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledByDcPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) WithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledByDcPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDcs adds the dcs to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) WithDcs(dcs string) *StorageProxyHintedHandoffEnabledByDcPostParams { + o.SetDcs(dcs) + return o +} + +// SetDcs adds the dcs to the storage proxy hinted handoff enabled by dc post params +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) SetDcs(dcs string) { + o.Dcs = dcs +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyHintedHandoffEnabledByDcPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param dcs + qrDcs := o.Dcs + qDcs := qrDcs + if qDcs != "" { + if err := r.SetQueryParam("dcs", qDcs); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_responses.go new file mode 100644 index 00000000000..34beb1fc778 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_by_dc_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyHintedHandoffEnabledByDcPostReader is a Reader for the StorageProxyHintedHandoffEnabledByDcPost structure. +type StorageProxyHintedHandoffEnabledByDcPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyHintedHandoffEnabledByDcPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyHintedHandoffEnabledByDcPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyHintedHandoffEnabledByDcPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyHintedHandoffEnabledByDcPostOK creates a StorageProxyHintedHandoffEnabledByDcPostOK with default headers values +func NewStorageProxyHintedHandoffEnabledByDcPostOK() *StorageProxyHintedHandoffEnabledByDcPostOK { + return &StorageProxyHintedHandoffEnabledByDcPostOK{} +} + +/*StorageProxyHintedHandoffEnabledByDcPostOK handles this case with default header values. + +StorageProxyHintedHandoffEnabledByDcPostOK storage proxy hinted handoff enabled by dc post o k +*/ +type StorageProxyHintedHandoffEnabledByDcPostOK struct { +} + +func (o *StorageProxyHintedHandoffEnabledByDcPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyHintedHandoffEnabledByDcPostDefault creates a StorageProxyHintedHandoffEnabledByDcPostDefault with default headers values +func NewStorageProxyHintedHandoffEnabledByDcPostDefault(code int) *StorageProxyHintedHandoffEnabledByDcPostDefault { + return &StorageProxyHintedHandoffEnabledByDcPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyHintedHandoffEnabledByDcPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyHintedHandoffEnabledByDcPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy hinted handoff enabled by dc post default response +func (o *StorageProxyHintedHandoffEnabledByDcPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyHintedHandoffEnabledByDcPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledByDcPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyHintedHandoffEnabledByDcPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_parameters.go new file mode 100644 index 00000000000..176ea079b07 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyHintedHandoffEnabledGetParams creates a new StorageProxyHintedHandoffEnabledGetParams object +// with the default values initialized. +func NewStorageProxyHintedHandoffEnabledGetParams() *StorageProxyHintedHandoffEnabledGetParams { + + return &StorageProxyHintedHandoffEnabledGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyHintedHandoffEnabledGetParamsWithTimeout creates a new StorageProxyHintedHandoffEnabledGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyHintedHandoffEnabledGetParamsWithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledGetParams { + + return &StorageProxyHintedHandoffEnabledGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyHintedHandoffEnabledGetParamsWithContext creates a new StorageProxyHintedHandoffEnabledGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyHintedHandoffEnabledGetParamsWithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledGetParams { + + return &StorageProxyHintedHandoffEnabledGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyHintedHandoffEnabledGetParamsWithHTTPClient creates a new StorageProxyHintedHandoffEnabledGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyHintedHandoffEnabledGetParamsWithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledGetParams { + + return &StorageProxyHintedHandoffEnabledGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyHintedHandoffEnabledGetParams contains all the parameters to send to the API endpoint +for the storage proxy hinted handoff enabled get operation typically these are written to a http.Request +*/ +type StorageProxyHintedHandoffEnabledGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) WithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) WithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) WithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled get params +func (o *StorageProxyHintedHandoffEnabledGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyHintedHandoffEnabledGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_responses.go new file mode 100644 index 00000000000..70217eafcc6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyHintedHandoffEnabledGetReader is a Reader for the StorageProxyHintedHandoffEnabledGet structure. +type StorageProxyHintedHandoffEnabledGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyHintedHandoffEnabledGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyHintedHandoffEnabledGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyHintedHandoffEnabledGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyHintedHandoffEnabledGetOK creates a StorageProxyHintedHandoffEnabledGetOK with default headers values +func NewStorageProxyHintedHandoffEnabledGetOK() *StorageProxyHintedHandoffEnabledGetOK { + return &StorageProxyHintedHandoffEnabledGetOK{} +} + +/*StorageProxyHintedHandoffEnabledGetOK handles this case with default header values. + +StorageProxyHintedHandoffEnabledGetOK storage proxy hinted handoff enabled get o k +*/ +type StorageProxyHintedHandoffEnabledGetOK struct { + Payload bool +} + +func (o *StorageProxyHintedHandoffEnabledGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledGetOK) 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 +} + +// NewStorageProxyHintedHandoffEnabledGetDefault creates a StorageProxyHintedHandoffEnabledGetDefault with default headers values +func NewStorageProxyHintedHandoffEnabledGetDefault(code int) *StorageProxyHintedHandoffEnabledGetDefault { + return &StorageProxyHintedHandoffEnabledGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyHintedHandoffEnabledGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyHintedHandoffEnabledGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy hinted handoff enabled get default response +func (o *StorageProxyHintedHandoffEnabledGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyHintedHandoffEnabledGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyHintedHandoffEnabledGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_parameters.go new file mode 100644 index 00000000000..ca6995845a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyHintedHandoffEnabledPostParams creates a new StorageProxyHintedHandoffEnabledPostParams object +// with the default values initialized. +func NewStorageProxyHintedHandoffEnabledPostParams() *StorageProxyHintedHandoffEnabledPostParams { + var () + return &StorageProxyHintedHandoffEnabledPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyHintedHandoffEnabledPostParamsWithTimeout creates a new StorageProxyHintedHandoffEnabledPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyHintedHandoffEnabledPostParamsWithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledPostParams { + var () + return &StorageProxyHintedHandoffEnabledPostParams{ + + timeout: timeout, + } +} + +// NewStorageProxyHintedHandoffEnabledPostParamsWithContext creates a new StorageProxyHintedHandoffEnabledPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyHintedHandoffEnabledPostParamsWithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledPostParams { + var () + return &StorageProxyHintedHandoffEnabledPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyHintedHandoffEnabledPostParamsWithHTTPClient creates a new StorageProxyHintedHandoffEnabledPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyHintedHandoffEnabledPostParamsWithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledPostParams { + var () + return &StorageProxyHintedHandoffEnabledPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyHintedHandoffEnabledPostParams contains all the parameters to send to the API endpoint +for the storage proxy hinted handoff enabled post operation typically these are written to a http.Request +*/ +type StorageProxyHintedHandoffEnabledPostParams struct { + + /*Enable + Set to true to enable hinted handoff + + */ + Enable bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) WithTimeout(timeout time.Duration) *StorageProxyHintedHandoffEnabledPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) WithContext(ctx context.Context) *StorageProxyHintedHandoffEnabledPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) WithHTTPClient(client *http.Client) *StorageProxyHintedHandoffEnabledPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnable adds the enable to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) WithEnable(enable bool) *StorageProxyHintedHandoffEnabledPostParams { + o.SetEnable(enable) + return o +} + +// SetEnable adds the enable to the storage proxy hinted handoff enabled post params +func (o *StorageProxyHintedHandoffEnabledPostParams) SetEnable(enable bool) { + o.Enable = enable +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyHintedHandoffEnabledPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param enable + qrEnable := o.Enable + qEnable := swag.FormatBool(qrEnable) + if qEnable != "" { + if err := r.SetQueryParam("enable", qEnable); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_responses.go new file mode 100644 index 00000000000..84698d9f864 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hinted_handoff_enabled_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyHintedHandoffEnabledPostReader is a Reader for the StorageProxyHintedHandoffEnabledPost structure. +type StorageProxyHintedHandoffEnabledPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyHintedHandoffEnabledPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyHintedHandoffEnabledPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyHintedHandoffEnabledPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyHintedHandoffEnabledPostOK creates a StorageProxyHintedHandoffEnabledPostOK with default headers values +func NewStorageProxyHintedHandoffEnabledPostOK() *StorageProxyHintedHandoffEnabledPostOK { + return &StorageProxyHintedHandoffEnabledPostOK{} +} + +/*StorageProxyHintedHandoffEnabledPostOK handles this case with default header values. + +StorageProxyHintedHandoffEnabledPostOK storage proxy hinted handoff enabled post o k +*/ +type StorageProxyHintedHandoffEnabledPostOK struct { +} + +func (o *StorageProxyHintedHandoffEnabledPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyHintedHandoffEnabledPostDefault creates a StorageProxyHintedHandoffEnabledPostDefault with default headers values +func NewStorageProxyHintedHandoffEnabledPostDefault(code int) *StorageProxyHintedHandoffEnabledPostDefault { + return &StorageProxyHintedHandoffEnabledPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyHintedHandoffEnabledPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyHintedHandoffEnabledPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy hinted handoff enabled post default response +func (o *StorageProxyHintedHandoffEnabledPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyHintedHandoffEnabledPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyHintedHandoffEnabledPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyHintedHandoffEnabledPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_parameters.go new file mode 100644 index 00000000000..e2855cad073 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyHintsInProgressGetParams creates a new StorageProxyHintsInProgressGetParams object +// with the default values initialized. +func NewStorageProxyHintsInProgressGetParams() *StorageProxyHintsInProgressGetParams { + + return &StorageProxyHintsInProgressGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyHintsInProgressGetParamsWithTimeout creates a new StorageProxyHintsInProgressGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyHintsInProgressGetParamsWithTimeout(timeout time.Duration) *StorageProxyHintsInProgressGetParams { + + return &StorageProxyHintsInProgressGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyHintsInProgressGetParamsWithContext creates a new StorageProxyHintsInProgressGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyHintsInProgressGetParamsWithContext(ctx context.Context) *StorageProxyHintsInProgressGetParams { + + return &StorageProxyHintsInProgressGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyHintsInProgressGetParamsWithHTTPClient creates a new StorageProxyHintsInProgressGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyHintsInProgressGetParamsWithHTTPClient(client *http.Client) *StorageProxyHintsInProgressGetParams { + + return &StorageProxyHintsInProgressGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyHintsInProgressGetParams contains all the parameters to send to the API endpoint +for the storage proxy hints in progress get operation typically these are written to a http.Request +*/ +type StorageProxyHintsInProgressGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) WithTimeout(timeout time.Duration) *StorageProxyHintsInProgressGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) WithContext(ctx context.Context) *StorageProxyHintsInProgressGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) WithHTTPClient(client *http.Client) *StorageProxyHintsInProgressGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy hints in progress get params +func (o *StorageProxyHintsInProgressGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyHintsInProgressGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_responses.go new file mode 100644 index 00000000000..7431fe0aa3c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_hints_in_progress_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyHintsInProgressGetReader is a Reader for the StorageProxyHintsInProgressGet structure. +type StorageProxyHintsInProgressGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyHintsInProgressGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyHintsInProgressGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyHintsInProgressGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyHintsInProgressGetOK creates a StorageProxyHintsInProgressGetOK with default headers values +func NewStorageProxyHintsInProgressGetOK() *StorageProxyHintsInProgressGetOK { + return &StorageProxyHintsInProgressGetOK{} +} + +/*StorageProxyHintsInProgressGetOK handles this case with default header values. + +StorageProxyHintsInProgressGetOK storage proxy hints in progress get o k +*/ +type StorageProxyHintsInProgressGetOK struct { + Payload int32 +} + +func (o *StorageProxyHintsInProgressGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyHintsInProgressGetOK) 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 +} + +// NewStorageProxyHintsInProgressGetDefault creates a StorageProxyHintsInProgressGetDefault with default headers values +func NewStorageProxyHintsInProgressGetDefault(code int) *StorageProxyHintsInProgressGetDefault { + return &StorageProxyHintsInProgressGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyHintsInProgressGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyHintsInProgressGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy hints in progress get default response +func (o *StorageProxyHintsInProgressGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyHintsInProgressGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyHintsInProgressGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyHintsInProgressGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_parameters.go new file mode 100644 index 00000000000..db1115508db --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMaxHintWindowGetParams creates a new StorageProxyMaxHintWindowGetParams object +// with the default values initialized. +func NewStorageProxyMaxHintWindowGetParams() *StorageProxyMaxHintWindowGetParams { + + return &StorageProxyMaxHintWindowGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMaxHintWindowGetParamsWithTimeout creates a new StorageProxyMaxHintWindowGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMaxHintWindowGetParamsWithTimeout(timeout time.Duration) *StorageProxyMaxHintWindowGetParams { + + return &StorageProxyMaxHintWindowGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMaxHintWindowGetParamsWithContext creates a new StorageProxyMaxHintWindowGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMaxHintWindowGetParamsWithContext(ctx context.Context) *StorageProxyMaxHintWindowGetParams { + + return &StorageProxyMaxHintWindowGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMaxHintWindowGetParamsWithHTTPClient creates a new StorageProxyMaxHintWindowGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMaxHintWindowGetParamsWithHTTPClient(client *http.Client) *StorageProxyMaxHintWindowGetParams { + + return &StorageProxyMaxHintWindowGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMaxHintWindowGetParams contains all the parameters to send to the API endpoint +for the storage proxy max hint window get operation typically these are written to a http.Request +*/ +type StorageProxyMaxHintWindowGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) WithTimeout(timeout time.Duration) *StorageProxyMaxHintWindowGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) WithContext(ctx context.Context) *StorageProxyMaxHintWindowGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) WithHTTPClient(client *http.Client) *StorageProxyMaxHintWindowGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy max hint window get params +func (o *StorageProxyMaxHintWindowGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMaxHintWindowGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_responses.go new file mode 100644 index 00000000000..eeea08f0135 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMaxHintWindowGetReader is a Reader for the StorageProxyMaxHintWindowGet structure. +type StorageProxyMaxHintWindowGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMaxHintWindowGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMaxHintWindowGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMaxHintWindowGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMaxHintWindowGetOK creates a StorageProxyMaxHintWindowGetOK with default headers values +func NewStorageProxyMaxHintWindowGetOK() *StorageProxyMaxHintWindowGetOK { + return &StorageProxyMaxHintWindowGetOK{} +} + +/*StorageProxyMaxHintWindowGetOK handles this case with default header values. + +StorageProxyMaxHintWindowGetOK storage proxy max hint window get o k +*/ +type StorageProxyMaxHintWindowGetOK struct { + Payload int32 +} + +func (o *StorageProxyMaxHintWindowGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMaxHintWindowGetOK) 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 +} + +// NewStorageProxyMaxHintWindowGetDefault creates a StorageProxyMaxHintWindowGetDefault with default headers values +func NewStorageProxyMaxHintWindowGetDefault(code int) *StorageProxyMaxHintWindowGetDefault { + return &StorageProxyMaxHintWindowGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMaxHintWindowGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMaxHintWindowGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy max hint window get default response +func (o *StorageProxyMaxHintWindowGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMaxHintWindowGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMaxHintWindowGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMaxHintWindowGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_parameters.go new file mode 100644 index 00000000000..02aeb546f3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMaxHintWindowPostParams creates a new StorageProxyMaxHintWindowPostParams object +// with the default values initialized. +func NewStorageProxyMaxHintWindowPostParams() *StorageProxyMaxHintWindowPostParams { + var () + return &StorageProxyMaxHintWindowPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMaxHintWindowPostParamsWithTimeout creates a new StorageProxyMaxHintWindowPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMaxHintWindowPostParamsWithTimeout(timeout time.Duration) *StorageProxyMaxHintWindowPostParams { + var () + return &StorageProxyMaxHintWindowPostParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMaxHintWindowPostParamsWithContext creates a new StorageProxyMaxHintWindowPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMaxHintWindowPostParamsWithContext(ctx context.Context) *StorageProxyMaxHintWindowPostParams { + var () + return &StorageProxyMaxHintWindowPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyMaxHintWindowPostParamsWithHTTPClient creates a new StorageProxyMaxHintWindowPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMaxHintWindowPostParamsWithHTTPClient(client *http.Client) *StorageProxyMaxHintWindowPostParams { + var () + return &StorageProxyMaxHintWindowPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyMaxHintWindowPostParams contains all the parameters to send to the API endpoint +for the storage proxy max hint window post operation typically these are written to a http.Request +*/ +type StorageProxyMaxHintWindowPostParams struct { + + /*Ms + max hint window in ms + + */ + Ms int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) WithTimeout(timeout time.Duration) *StorageProxyMaxHintWindowPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) WithContext(ctx context.Context) *StorageProxyMaxHintWindowPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) WithHTTPClient(client *http.Client) *StorageProxyMaxHintWindowPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithMs adds the ms to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) WithMs(ms int32) *StorageProxyMaxHintWindowPostParams { + o.SetMs(ms) + return o +} + +// SetMs adds the ms to the storage proxy max hint window post params +func (o *StorageProxyMaxHintWindowPostParams) SetMs(ms int32) { + o.Ms = ms +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMaxHintWindowPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param ms + qrMs := o.Ms + qMs := swag.FormatInt32(qrMs) + if qMs != "" { + if err := r.SetQueryParam("ms", qMs); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_responses.go new file mode 100644 index 00000000000..a2480522875 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hint_window_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMaxHintWindowPostReader is a Reader for the StorageProxyMaxHintWindowPost structure. +type StorageProxyMaxHintWindowPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMaxHintWindowPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMaxHintWindowPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMaxHintWindowPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMaxHintWindowPostOK creates a StorageProxyMaxHintWindowPostOK with default headers values +func NewStorageProxyMaxHintWindowPostOK() *StorageProxyMaxHintWindowPostOK { + return &StorageProxyMaxHintWindowPostOK{} +} + +/*StorageProxyMaxHintWindowPostOK handles this case with default header values. + +StorageProxyMaxHintWindowPostOK storage proxy max hint window post o k +*/ +type StorageProxyMaxHintWindowPostOK struct { +} + +func (o *StorageProxyMaxHintWindowPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMaxHintWindowPostDefault creates a StorageProxyMaxHintWindowPostDefault with default headers values +func NewStorageProxyMaxHintWindowPostDefault(code int) *StorageProxyMaxHintWindowPostDefault { + return &StorageProxyMaxHintWindowPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyMaxHintWindowPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMaxHintWindowPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy max hint window post default response +func (o *StorageProxyMaxHintWindowPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMaxHintWindowPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMaxHintWindowPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMaxHintWindowPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_parameters.go new file mode 100644 index 00000000000..f4afc706f73 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMaxHintsInProgressGetParams creates a new StorageProxyMaxHintsInProgressGetParams object +// with the default values initialized. +func NewStorageProxyMaxHintsInProgressGetParams() *StorageProxyMaxHintsInProgressGetParams { + + return &StorageProxyMaxHintsInProgressGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMaxHintsInProgressGetParamsWithTimeout creates a new StorageProxyMaxHintsInProgressGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMaxHintsInProgressGetParamsWithTimeout(timeout time.Duration) *StorageProxyMaxHintsInProgressGetParams { + + return &StorageProxyMaxHintsInProgressGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMaxHintsInProgressGetParamsWithContext creates a new StorageProxyMaxHintsInProgressGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMaxHintsInProgressGetParamsWithContext(ctx context.Context) *StorageProxyMaxHintsInProgressGetParams { + + return &StorageProxyMaxHintsInProgressGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMaxHintsInProgressGetParamsWithHTTPClient creates a new StorageProxyMaxHintsInProgressGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMaxHintsInProgressGetParamsWithHTTPClient(client *http.Client) *StorageProxyMaxHintsInProgressGetParams { + + return &StorageProxyMaxHintsInProgressGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMaxHintsInProgressGetParams contains all the parameters to send to the API endpoint +for the storage proxy max hints in progress get operation typically these are written to a http.Request +*/ +type StorageProxyMaxHintsInProgressGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) WithTimeout(timeout time.Duration) *StorageProxyMaxHintsInProgressGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) WithContext(ctx context.Context) *StorageProxyMaxHintsInProgressGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) WithHTTPClient(client *http.Client) *StorageProxyMaxHintsInProgressGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy max hints in progress get params +func (o *StorageProxyMaxHintsInProgressGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMaxHintsInProgressGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_responses.go new file mode 100644 index 00000000000..e3a035a5ed8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMaxHintsInProgressGetReader is a Reader for the StorageProxyMaxHintsInProgressGet structure. +type StorageProxyMaxHintsInProgressGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMaxHintsInProgressGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMaxHintsInProgressGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMaxHintsInProgressGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMaxHintsInProgressGetOK creates a StorageProxyMaxHintsInProgressGetOK with default headers values +func NewStorageProxyMaxHintsInProgressGetOK() *StorageProxyMaxHintsInProgressGetOK { + return &StorageProxyMaxHintsInProgressGetOK{} +} + +/*StorageProxyMaxHintsInProgressGetOK handles this case with default header values. + +StorageProxyMaxHintsInProgressGetOK storage proxy max hints in progress get o k +*/ +type StorageProxyMaxHintsInProgressGetOK struct { + Payload int32 +} + +func (o *StorageProxyMaxHintsInProgressGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMaxHintsInProgressGetOK) 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 +} + +// NewStorageProxyMaxHintsInProgressGetDefault creates a StorageProxyMaxHintsInProgressGetDefault with default headers values +func NewStorageProxyMaxHintsInProgressGetDefault(code int) *StorageProxyMaxHintsInProgressGetDefault { + return &StorageProxyMaxHintsInProgressGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMaxHintsInProgressGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMaxHintsInProgressGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy max hints in progress get default response +func (o *StorageProxyMaxHintsInProgressGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMaxHintsInProgressGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMaxHintsInProgressGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMaxHintsInProgressGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_parameters.go new file mode 100644 index 00000000000..9175f54753b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMaxHintsInProgressPostParams creates a new StorageProxyMaxHintsInProgressPostParams object +// with the default values initialized. +func NewStorageProxyMaxHintsInProgressPostParams() *StorageProxyMaxHintsInProgressPostParams { + var () + return &StorageProxyMaxHintsInProgressPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMaxHintsInProgressPostParamsWithTimeout creates a new StorageProxyMaxHintsInProgressPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMaxHintsInProgressPostParamsWithTimeout(timeout time.Duration) *StorageProxyMaxHintsInProgressPostParams { + var () + return &StorageProxyMaxHintsInProgressPostParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMaxHintsInProgressPostParamsWithContext creates a new StorageProxyMaxHintsInProgressPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMaxHintsInProgressPostParamsWithContext(ctx context.Context) *StorageProxyMaxHintsInProgressPostParams { + var () + return &StorageProxyMaxHintsInProgressPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyMaxHintsInProgressPostParamsWithHTTPClient creates a new StorageProxyMaxHintsInProgressPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMaxHintsInProgressPostParamsWithHTTPClient(client *http.Client) *StorageProxyMaxHintsInProgressPostParams { + var () + return &StorageProxyMaxHintsInProgressPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyMaxHintsInProgressPostParams contains all the parameters to send to the API endpoint +for the storage proxy max hints in progress post operation typically these are written to a http.Request +*/ +type StorageProxyMaxHintsInProgressPostParams struct { + + /*Qs + max hints in progress + + */ + Qs int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) WithTimeout(timeout time.Duration) *StorageProxyMaxHintsInProgressPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) WithContext(ctx context.Context) *StorageProxyMaxHintsInProgressPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) WithHTTPClient(client *http.Client) *StorageProxyMaxHintsInProgressPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQs adds the qs to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) WithQs(qs int32) *StorageProxyMaxHintsInProgressPostParams { + o.SetQs(qs) + return o +} + +// SetQs adds the qs to the storage proxy max hints in progress post params +func (o *StorageProxyMaxHintsInProgressPostParams) SetQs(qs int32) { + o.Qs = qs +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMaxHintsInProgressPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param qs + qrQs := o.Qs + qQs := swag.FormatInt32(qrQs) + if qQs != "" { + if err := r.SetQueryParam("qs", qQs); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_responses.go new file mode 100644 index 00000000000..ca6cfadc1bb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_max_hints_in_progress_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMaxHintsInProgressPostReader is a Reader for the StorageProxyMaxHintsInProgressPost structure. +type StorageProxyMaxHintsInProgressPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMaxHintsInProgressPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMaxHintsInProgressPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMaxHintsInProgressPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMaxHintsInProgressPostOK creates a StorageProxyMaxHintsInProgressPostOK with default headers values +func NewStorageProxyMaxHintsInProgressPostOK() *StorageProxyMaxHintsInProgressPostOK { + return &StorageProxyMaxHintsInProgressPostOK{} +} + +/*StorageProxyMaxHintsInProgressPostOK handles this case with default header values. + +StorageProxyMaxHintsInProgressPostOK storage proxy max hints in progress post o k +*/ +type StorageProxyMaxHintsInProgressPostOK struct { +} + +func (o *StorageProxyMaxHintsInProgressPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMaxHintsInProgressPostDefault creates a StorageProxyMaxHintsInProgressPostDefault with default headers values +func NewStorageProxyMaxHintsInProgressPostDefault(code int) *StorageProxyMaxHintsInProgressPostDefault { + return &StorageProxyMaxHintsInProgressPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyMaxHintsInProgressPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMaxHintsInProgressPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy max hints in progress post default response +func (o *StorageProxyMaxHintsInProgressPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMaxHintsInProgressPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMaxHintsInProgressPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMaxHintsInProgressPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_parameters.go new file mode 100644 index 00000000000..27559371f59 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasReadConditionNotMetGetParams creates a new StorageProxyMetricsCasReadConditionNotMetGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasReadConditionNotMetGetParams() *StorageProxyMetricsCasReadConditionNotMetGetParams { + + return &StorageProxyMetricsCasReadConditionNotMetGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithTimeout creates a new StorageProxyMetricsCasReadConditionNotMetGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadConditionNotMetGetParams { + + return &StorageProxyMetricsCasReadConditionNotMetGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithContext creates a new StorageProxyMetricsCasReadConditionNotMetGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasReadConditionNotMetGetParams { + + return &StorageProxyMetricsCasReadConditionNotMetGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithHTTPClient creates a new StorageProxyMetricsCasReadConditionNotMetGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasReadConditionNotMetGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadConditionNotMetGetParams { + + return &StorageProxyMetricsCasReadConditionNotMetGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasReadConditionNotMetGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas read condition not met get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasReadConditionNotMetGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadConditionNotMetGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasReadConditionNotMetGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadConditionNotMetGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas read condition not met get params +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasReadConditionNotMetGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_responses.go new file mode 100644 index 00000000000..4d3cd8bb42e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_condition_not_met_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasReadConditionNotMetGetReader is a Reader for the StorageProxyMetricsCasReadConditionNotMetGet structure. +type StorageProxyMetricsCasReadConditionNotMetGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasReadConditionNotMetGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasReadConditionNotMetGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasReadConditionNotMetGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasReadConditionNotMetGetOK creates a StorageProxyMetricsCasReadConditionNotMetGetOK with default headers values +func NewStorageProxyMetricsCasReadConditionNotMetGetOK() *StorageProxyMetricsCasReadConditionNotMetGetOK { + return &StorageProxyMetricsCasReadConditionNotMetGetOK{} +} + +/*StorageProxyMetricsCasReadConditionNotMetGetOK handles this case with default header values. + +StorageProxyMetricsCasReadConditionNotMetGetOK storage proxy metrics cas read condition not met get o k +*/ +type StorageProxyMetricsCasReadConditionNotMetGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsCasReadConditionNotMetGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadConditionNotMetGetOK) 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 +} + +// NewStorageProxyMetricsCasReadConditionNotMetGetDefault creates a StorageProxyMetricsCasReadConditionNotMetGetDefault with default headers values +func NewStorageProxyMetricsCasReadConditionNotMetGetDefault(code int) *StorageProxyMetricsCasReadConditionNotMetGetDefault { + return &StorageProxyMetricsCasReadConditionNotMetGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasReadConditionNotMetGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasReadConditionNotMetGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas read condition not met get default response +func (o *StorageProxyMetricsCasReadConditionNotMetGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasReadConditionNotMetGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadConditionNotMetGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasReadConditionNotMetGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_parameters.go new file mode 100644 index 00000000000..642d406acbd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasReadContentionGetParams creates a new StorageProxyMetricsCasReadContentionGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasReadContentionGetParams() *StorageProxyMetricsCasReadContentionGetParams { + + return &StorageProxyMetricsCasReadContentionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasReadContentionGetParamsWithTimeout creates a new StorageProxyMetricsCasReadContentionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasReadContentionGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadContentionGetParams { + + return &StorageProxyMetricsCasReadContentionGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasReadContentionGetParamsWithContext creates a new StorageProxyMetricsCasReadContentionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasReadContentionGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasReadContentionGetParams { + + return &StorageProxyMetricsCasReadContentionGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasReadContentionGetParamsWithHTTPClient creates a new StorageProxyMetricsCasReadContentionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasReadContentionGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadContentionGetParams { + + return &StorageProxyMetricsCasReadContentionGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasReadContentionGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas read contention get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasReadContentionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadContentionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasReadContentionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadContentionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas read contention get params +func (o *StorageProxyMetricsCasReadContentionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasReadContentionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_responses.go new file mode 100644 index 00000000000..ea63557cab5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_contention_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasReadContentionGetReader is a Reader for the StorageProxyMetricsCasReadContentionGet structure. +type StorageProxyMetricsCasReadContentionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasReadContentionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasReadContentionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasReadContentionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasReadContentionGetOK creates a StorageProxyMetricsCasReadContentionGetOK with default headers values +func NewStorageProxyMetricsCasReadContentionGetOK() *StorageProxyMetricsCasReadContentionGetOK { + return &StorageProxyMetricsCasReadContentionGetOK{} +} + +/*StorageProxyMetricsCasReadContentionGetOK handles this case with default header values. + +StorageProxyMetricsCasReadContentionGetOK storage proxy metrics cas read contention get o k +*/ +type StorageProxyMetricsCasReadContentionGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasReadContentionGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadContentionGetOK) 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 +} + +// NewStorageProxyMetricsCasReadContentionGetDefault creates a StorageProxyMetricsCasReadContentionGetDefault with default headers values +func NewStorageProxyMetricsCasReadContentionGetDefault(code int) *StorageProxyMetricsCasReadContentionGetDefault { + return &StorageProxyMetricsCasReadContentionGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasReadContentionGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasReadContentionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas read contention get default response +func (o *StorageProxyMetricsCasReadContentionGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasReadContentionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadContentionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasReadContentionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_parameters.go new file mode 100644 index 00000000000..ab860840812 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasReadTimeoutsGetParams creates a new StorageProxyMetricsCasReadTimeoutsGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasReadTimeoutsGetParams() *StorageProxyMetricsCasReadTimeoutsGetParams { + + return &StorageProxyMetricsCasReadTimeoutsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasReadTimeoutsGetParamsWithTimeout creates a new StorageProxyMetricsCasReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasReadTimeoutsGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadTimeoutsGetParams { + + return &StorageProxyMetricsCasReadTimeoutsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasReadTimeoutsGetParamsWithContext creates a new StorageProxyMetricsCasReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasReadTimeoutsGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasReadTimeoutsGetParams { + + return &StorageProxyMetricsCasReadTimeoutsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasReadTimeoutsGetParamsWithHTTPClient creates a new StorageProxyMetricsCasReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasReadTimeoutsGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadTimeoutsGetParams { + + return &StorageProxyMetricsCasReadTimeoutsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasReadTimeoutsGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas read timeouts get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasReadTimeoutsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadTimeoutsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasReadTimeoutsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadTimeoutsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas read timeouts get params +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasReadTimeoutsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_responses.go new file mode 100644 index 00000000000..1f856cde930 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_timeouts_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasReadTimeoutsGetReader is a Reader for the StorageProxyMetricsCasReadTimeoutsGet structure. +type StorageProxyMetricsCasReadTimeoutsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasReadTimeoutsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasReadTimeoutsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasReadTimeoutsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasReadTimeoutsGetOK creates a StorageProxyMetricsCasReadTimeoutsGetOK with default headers values +func NewStorageProxyMetricsCasReadTimeoutsGetOK() *StorageProxyMetricsCasReadTimeoutsGetOK { + return &StorageProxyMetricsCasReadTimeoutsGetOK{} +} + +/*StorageProxyMetricsCasReadTimeoutsGetOK handles this case with default header values. + +StorageProxyMetricsCasReadTimeoutsGetOK storage proxy metrics cas read timeouts get o k +*/ +type StorageProxyMetricsCasReadTimeoutsGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasReadTimeoutsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadTimeoutsGetOK) 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 +} + +// NewStorageProxyMetricsCasReadTimeoutsGetDefault creates a StorageProxyMetricsCasReadTimeoutsGetDefault with default headers values +func NewStorageProxyMetricsCasReadTimeoutsGetDefault(code int) *StorageProxyMetricsCasReadTimeoutsGetDefault { + return &StorageProxyMetricsCasReadTimeoutsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasReadTimeoutsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasReadTimeoutsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas read timeouts get default response +func (o *StorageProxyMetricsCasReadTimeoutsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasReadTimeoutsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadTimeoutsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasReadTimeoutsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_parameters.go new file mode 100644 index 00000000000..fee94767f4c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasReadUnavailablesGetParams creates a new StorageProxyMetricsCasReadUnavailablesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasReadUnavailablesGetParams() *StorageProxyMetricsCasReadUnavailablesGetParams { + + return &StorageProxyMetricsCasReadUnavailablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasReadUnavailablesGetParamsWithTimeout creates a new StorageProxyMetricsCasReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasReadUnavailablesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadUnavailablesGetParams { + + return &StorageProxyMetricsCasReadUnavailablesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasReadUnavailablesGetParamsWithContext creates a new StorageProxyMetricsCasReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasReadUnavailablesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasReadUnavailablesGetParams { + + return &StorageProxyMetricsCasReadUnavailablesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasReadUnavailablesGetParamsWithHTTPClient creates a new StorageProxyMetricsCasReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasReadUnavailablesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadUnavailablesGetParams { + + return &StorageProxyMetricsCasReadUnavailablesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasReadUnavailablesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas read unavailables get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasReadUnavailablesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadUnavailablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasReadUnavailablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadUnavailablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas read unavailables get params +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasReadUnavailablesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_responses.go new file mode 100644 index 00000000000..3f6e96d287b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unavailables_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasReadUnavailablesGetReader is a Reader for the StorageProxyMetricsCasReadUnavailablesGet structure. +type StorageProxyMetricsCasReadUnavailablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasReadUnavailablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasReadUnavailablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasReadUnavailablesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasReadUnavailablesGetOK creates a StorageProxyMetricsCasReadUnavailablesGetOK with default headers values +func NewStorageProxyMetricsCasReadUnavailablesGetOK() *StorageProxyMetricsCasReadUnavailablesGetOK { + return &StorageProxyMetricsCasReadUnavailablesGetOK{} +} + +/*StorageProxyMetricsCasReadUnavailablesGetOK handles this case with default header values. + +StorageProxyMetricsCasReadUnavailablesGetOK storage proxy metrics cas read unavailables get o k +*/ +type StorageProxyMetricsCasReadUnavailablesGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasReadUnavailablesGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadUnavailablesGetOK) 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 +} + +// NewStorageProxyMetricsCasReadUnavailablesGetDefault creates a StorageProxyMetricsCasReadUnavailablesGetDefault with default headers values +func NewStorageProxyMetricsCasReadUnavailablesGetDefault(code int) *StorageProxyMetricsCasReadUnavailablesGetDefault { + return &StorageProxyMetricsCasReadUnavailablesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasReadUnavailablesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasReadUnavailablesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas read unavailables get default response +func (o *StorageProxyMetricsCasReadUnavailablesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasReadUnavailablesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadUnavailablesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasReadUnavailablesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_parameters.go new file mode 100644 index 00000000000..4925440be55 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetParams creates a new StorageProxyMetricsCasReadUnfinishedCommitGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasReadUnfinishedCommitGetParams() *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasReadUnfinishedCommitGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithTimeout creates a new StorageProxyMetricsCasReadUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasReadUnfinishedCommitGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithContext creates a new StorageProxyMetricsCasReadUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasReadUnfinishedCommitGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithHTTPClient creates a new StorageProxyMetricsCasReadUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasReadUnfinishedCommitGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasReadUnfinishedCommitGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasReadUnfinishedCommitGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas read unfinished commit get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasReadUnfinishedCommitGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasReadUnfinishedCommitGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas read unfinished commit get params +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_responses.go new file mode 100644 index 00000000000..f3878fdb29b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_read_unfinished_commit_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasReadUnfinishedCommitGetReader is a Reader for the StorageProxyMetricsCasReadUnfinishedCommitGet structure. +type StorageProxyMetricsCasReadUnfinishedCommitGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasReadUnfinishedCommitGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasReadUnfinishedCommitGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetOK creates a StorageProxyMetricsCasReadUnfinishedCommitGetOK with default headers values +func NewStorageProxyMetricsCasReadUnfinishedCommitGetOK() *StorageProxyMetricsCasReadUnfinishedCommitGetOK { + return &StorageProxyMetricsCasReadUnfinishedCommitGetOK{} +} + +/*StorageProxyMetricsCasReadUnfinishedCommitGetOK handles this case with default header values. + +StorageProxyMetricsCasReadUnfinishedCommitGetOK storage proxy metrics cas read unfinished commit get o k +*/ +type StorageProxyMetricsCasReadUnfinishedCommitGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetOK) 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 +} + +// NewStorageProxyMetricsCasReadUnfinishedCommitGetDefault creates a StorageProxyMetricsCasReadUnfinishedCommitGetDefault with default headers values +func NewStorageProxyMetricsCasReadUnfinishedCommitGetDefault(code int) *StorageProxyMetricsCasReadUnfinishedCommitGetDefault { + return &StorageProxyMetricsCasReadUnfinishedCommitGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasReadUnfinishedCommitGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasReadUnfinishedCommitGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas read unfinished commit get default response +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasReadUnfinishedCommitGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_parameters.go new file mode 100644 index 00000000000..01c42ee3d6f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasWriteConditionNotMetGetParams creates a new StorageProxyMetricsCasWriteConditionNotMetGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasWriteConditionNotMetGetParams() *StorageProxyMetricsCasWriteConditionNotMetGetParams { + + return &StorageProxyMetricsCasWriteConditionNotMetGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithTimeout creates a new StorageProxyMetricsCasWriteConditionNotMetGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + + return &StorageProxyMetricsCasWriteConditionNotMetGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithContext creates a new StorageProxyMetricsCasWriteConditionNotMetGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + + return &StorageProxyMetricsCasWriteConditionNotMetGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithHTTPClient creates a new StorageProxyMetricsCasWriteConditionNotMetGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasWriteConditionNotMetGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + + return &StorageProxyMetricsCasWriteConditionNotMetGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasWriteConditionNotMetGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas write condition not met get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasWriteConditionNotMetGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteConditionNotMetGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas write condition not met get params +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasWriteConditionNotMetGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_responses.go new file mode 100644 index 00000000000..90179e87e05 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_condition_not_met_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasWriteConditionNotMetGetReader is a Reader for the StorageProxyMetricsCasWriteConditionNotMetGet structure. +type StorageProxyMetricsCasWriteConditionNotMetGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasWriteConditionNotMetGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasWriteConditionNotMetGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasWriteConditionNotMetGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasWriteConditionNotMetGetOK creates a StorageProxyMetricsCasWriteConditionNotMetGetOK with default headers values +func NewStorageProxyMetricsCasWriteConditionNotMetGetOK() *StorageProxyMetricsCasWriteConditionNotMetGetOK { + return &StorageProxyMetricsCasWriteConditionNotMetGetOK{} +} + +/*StorageProxyMetricsCasWriteConditionNotMetGetOK handles this case with default header values. + +StorageProxyMetricsCasWriteConditionNotMetGetOK storage proxy metrics cas write condition not met get o k +*/ +type StorageProxyMetricsCasWriteConditionNotMetGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsCasWriteConditionNotMetGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteConditionNotMetGetOK) 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 +} + +// NewStorageProxyMetricsCasWriteConditionNotMetGetDefault creates a StorageProxyMetricsCasWriteConditionNotMetGetDefault with default headers values +func NewStorageProxyMetricsCasWriteConditionNotMetGetDefault(code int) *StorageProxyMetricsCasWriteConditionNotMetGetDefault { + return &StorageProxyMetricsCasWriteConditionNotMetGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasWriteConditionNotMetGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasWriteConditionNotMetGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas write condition not met get default response +func (o *StorageProxyMetricsCasWriteConditionNotMetGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasWriteConditionNotMetGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteConditionNotMetGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasWriteConditionNotMetGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_parameters.go new file mode 100644 index 00000000000..84b014b7016 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasWriteContentionGetParams creates a new StorageProxyMetricsCasWriteContentionGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasWriteContentionGetParams() *StorageProxyMetricsCasWriteContentionGetParams { + + return &StorageProxyMetricsCasWriteContentionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasWriteContentionGetParamsWithTimeout creates a new StorageProxyMetricsCasWriteContentionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasWriteContentionGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteContentionGetParams { + + return &StorageProxyMetricsCasWriteContentionGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasWriteContentionGetParamsWithContext creates a new StorageProxyMetricsCasWriteContentionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasWriteContentionGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasWriteContentionGetParams { + + return &StorageProxyMetricsCasWriteContentionGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasWriteContentionGetParamsWithHTTPClient creates a new StorageProxyMetricsCasWriteContentionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasWriteContentionGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteContentionGetParams { + + return &StorageProxyMetricsCasWriteContentionGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasWriteContentionGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas write contention get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasWriteContentionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteContentionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasWriteContentionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteContentionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas write contention get params +func (o *StorageProxyMetricsCasWriteContentionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasWriteContentionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_responses.go new file mode 100644 index 00000000000..93d3658057b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_contention_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasWriteContentionGetReader is a Reader for the StorageProxyMetricsCasWriteContentionGet structure. +type StorageProxyMetricsCasWriteContentionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasWriteContentionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasWriteContentionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasWriteContentionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasWriteContentionGetOK creates a StorageProxyMetricsCasWriteContentionGetOK with default headers values +func NewStorageProxyMetricsCasWriteContentionGetOK() *StorageProxyMetricsCasWriteContentionGetOK { + return &StorageProxyMetricsCasWriteContentionGetOK{} +} + +/*StorageProxyMetricsCasWriteContentionGetOK handles this case with default header values. + +StorageProxyMetricsCasWriteContentionGetOK storage proxy metrics cas write contention get o k +*/ +type StorageProxyMetricsCasWriteContentionGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasWriteContentionGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteContentionGetOK) 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 +} + +// NewStorageProxyMetricsCasWriteContentionGetDefault creates a StorageProxyMetricsCasWriteContentionGetDefault with default headers values +func NewStorageProxyMetricsCasWriteContentionGetDefault(code int) *StorageProxyMetricsCasWriteContentionGetDefault { + return &StorageProxyMetricsCasWriteContentionGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasWriteContentionGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasWriteContentionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas write contention get default response +func (o *StorageProxyMetricsCasWriteContentionGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasWriteContentionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteContentionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasWriteContentionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_parameters.go new file mode 100644 index 00000000000..5d26da0fa19 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasWriteTimeoutsGetParams creates a new StorageProxyMetricsCasWriteTimeoutsGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasWriteTimeoutsGetParams() *StorageProxyMetricsCasWriteTimeoutsGetParams { + + return &StorageProxyMetricsCasWriteTimeoutsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithTimeout creates a new StorageProxyMetricsCasWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteTimeoutsGetParams { + + return &StorageProxyMetricsCasWriteTimeoutsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithContext creates a new StorageProxyMetricsCasWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasWriteTimeoutsGetParams { + + return &StorageProxyMetricsCasWriteTimeoutsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithHTTPClient creates a new StorageProxyMetricsCasWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasWriteTimeoutsGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteTimeoutsGetParams { + + return &StorageProxyMetricsCasWriteTimeoutsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasWriteTimeoutsGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas write timeouts get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasWriteTimeoutsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteTimeoutsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasWriteTimeoutsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteTimeoutsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas write timeouts get params +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasWriteTimeoutsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_responses.go new file mode 100644 index 00000000000..25e54890ddd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_timeouts_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasWriteTimeoutsGetReader is a Reader for the StorageProxyMetricsCasWriteTimeoutsGet structure. +type StorageProxyMetricsCasWriteTimeoutsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasWriteTimeoutsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasWriteTimeoutsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasWriteTimeoutsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasWriteTimeoutsGetOK creates a StorageProxyMetricsCasWriteTimeoutsGetOK with default headers values +func NewStorageProxyMetricsCasWriteTimeoutsGetOK() *StorageProxyMetricsCasWriteTimeoutsGetOK { + return &StorageProxyMetricsCasWriteTimeoutsGetOK{} +} + +/*StorageProxyMetricsCasWriteTimeoutsGetOK handles this case with default header values. + +StorageProxyMetricsCasWriteTimeoutsGetOK storage proxy metrics cas write timeouts get o k +*/ +type StorageProxyMetricsCasWriteTimeoutsGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasWriteTimeoutsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteTimeoutsGetOK) 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 +} + +// NewStorageProxyMetricsCasWriteTimeoutsGetDefault creates a StorageProxyMetricsCasWriteTimeoutsGetDefault with default headers values +func NewStorageProxyMetricsCasWriteTimeoutsGetDefault(code int) *StorageProxyMetricsCasWriteTimeoutsGetDefault { + return &StorageProxyMetricsCasWriteTimeoutsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasWriteTimeoutsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasWriteTimeoutsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas write timeouts get default response +func (o *StorageProxyMetricsCasWriteTimeoutsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasWriteTimeoutsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteTimeoutsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasWriteTimeoutsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_parameters.go new file mode 100644 index 00000000000..f81f62ca21a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasWriteUnavailablesGetParams creates a new StorageProxyMetricsCasWriteUnavailablesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasWriteUnavailablesGetParams() *StorageProxyMetricsCasWriteUnavailablesGetParams { + + return &StorageProxyMetricsCasWriteUnavailablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithTimeout creates a new StorageProxyMetricsCasWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteUnavailablesGetParams { + + return &StorageProxyMetricsCasWriteUnavailablesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithContext creates a new StorageProxyMetricsCasWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasWriteUnavailablesGetParams { + + return &StorageProxyMetricsCasWriteUnavailablesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithHTTPClient creates a new StorageProxyMetricsCasWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasWriteUnavailablesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteUnavailablesGetParams { + + return &StorageProxyMetricsCasWriteUnavailablesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasWriteUnavailablesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas write unavailables get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasWriteUnavailablesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteUnavailablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasWriteUnavailablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteUnavailablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas write unavailables get params +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasWriteUnavailablesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_responses.go new file mode 100644 index 00000000000..a80c950b555 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unavailables_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasWriteUnavailablesGetReader is a Reader for the StorageProxyMetricsCasWriteUnavailablesGet structure. +type StorageProxyMetricsCasWriteUnavailablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasWriteUnavailablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasWriteUnavailablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasWriteUnavailablesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasWriteUnavailablesGetOK creates a StorageProxyMetricsCasWriteUnavailablesGetOK with default headers values +func NewStorageProxyMetricsCasWriteUnavailablesGetOK() *StorageProxyMetricsCasWriteUnavailablesGetOK { + return &StorageProxyMetricsCasWriteUnavailablesGetOK{} +} + +/*StorageProxyMetricsCasWriteUnavailablesGetOK handles this case with default header values. + +StorageProxyMetricsCasWriteUnavailablesGetOK storage proxy metrics cas write unavailables get o k +*/ +type StorageProxyMetricsCasWriteUnavailablesGetOK struct { + Payload interface{} +} + +func (o *StorageProxyMetricsCasWriteUnavailablesGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteUnavailablesGetOK) 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 +} + +// NewStorageProxyMetricsCasWriteUnavailablesGetDefault creates a StorageProxyMetricsCasWriteUnavailablesGetDefault with default headers values +func NewStorageProxyMetricsCasWriteUnavailablesGetDefault(code int) *StorageProxyMetricsCasWriteUnavailablesGetDefault { + return &StorageProxyMetricsCasWriteUnavailablesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasWriteUnavailablesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasWriteUnavailablesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas write unavailables get default response +func (o *StorageProxyMetricsCasWriteUnavailablesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasWriteUnavailablesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteUnavailablesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasWriteUnavailablesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_parameters.go new file mode 100644 index 00000000000..dda3846a640 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetParams creates a new StorageProxyMetricsCasWriteUnfinishedCommitGetParams object +// with the default values initialized. +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetParams() *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasWriteUnfinishedCommitGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithTimeout creates a new StorageProxyMetricsCasWriteUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasWriteUnfinishedCommitGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithContext creates a new StorageProxyMetricsCasWriteUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithContext(ctx context.Context) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasWriteUnfinishedCommitGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithHTTPClient creates a new StorageProxyMetricsCasWriteUnfinishedCommitGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + + return &StorageProxyMetricsCasWriteUnfinishedCommitGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsCasWriteUnfinishedCommitGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics cas write unfinished commit get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsCasWriteUnfinishedCommitGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) WithContext(ctx context.Context) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsCasWriteUnfinishedCommitGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics cas write unfinished commit get params +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_responses.go new file mode 100644 index 00000000000..e1ea468e656 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_cas_write_unfinished_commit_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsCasWriteUnfinishedCommitGetReader is a Reader for the StorageProxyMetricsCasWriteUnfinishedCommitGet structure. +type StorageProxyMetricsCasWriteUnfinishedCommitGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsCasWriteUnfinishedCommitGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsCasWriteUnfinishedCommitGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetOK creates a StorageProxyMetricsCasWriteUnfinishedCommitGetOK with default headers values +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetOK() *StorageProxyMetricsCasWriteUnfinishedCommitGetOK { + return &StorageProxyMetricsCasWriteUnfinishedCommitGetOK{} +} + +/*StorageProxyMetricsCasWriteUnfinishedCommitGetOK handles this case with default header values. + +StorageProxyMetricsCasWriteUnfinishedCommitGetOK storage proxy metrics cas write unfinished commit get o k +*/ +type StorageProxyMetricsCasWriteUnfinishedCommitGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetOK) 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 +} + +// NewStorageProxyMetricsCasWriteUnfinishedCommitGetDefault creates a StorageProxyMetricsCasWriteUnfinishedCommitGetDefault with default headers values +func NewStorageProxyMetricsCasWriteUnfinishedCommitGetDefault(code int) *StorageProxyMetricsCasWriteUnfinishedCommitGetDefault { + return &StorageProxyMetricsCasWriteUnfinishedCommitGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsCasWriteUnfinishedCommitGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsCasWriteUnfinishedCommitGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics cas write unfinished commit get default response +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsCasWriteUnfinishedCommitGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_parameters.go new file mode 100644 index 00000000000..fa616e2b2bc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeEstimatedHistogramGetParams creates a new StorageProxyMetricsRangeEstimatedHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeEstimatedHistogramGetParams() *StorageProxyMetricsRangeEstimatedHistogramGetParams { + + return &StorageProxyMetricsRangeEstimatedHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithTimeout creates a new StorageProxyMetricsRangeEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + + return &StorageProxyMetricsRangeEstimatedHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithContext creates a new StorageProxyMetricsRangeEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + + return &StorageProxyMetricsRangeEstimatedHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeEstimatedHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + + return &StorageProxyMetricsRangeEstimatedHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeEstimatedHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range estimated histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeEstimatedHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeEstimatedHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range estimated histogram get params +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeEstimatedHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_responses.go new file mode 100644 index 00000000000..6d3b89d4747 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_estimated_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeEstimatedHistogramGetReader is a Reader for the StorageProxyMetricsRangeEstimatedHistogramGet structure. +type StorageProxyMetricsRangeEstimatedHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeEstimatedHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeEstimatedHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeEstimatedHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeEstimatedHistogramGetOK creates a StorageProxyMetricsRangeEstimatedHistogramGetOK with default headers values +func NewStorageProxyMetricsRangeEstimatedHistogramGetOK() *StorageProxyMetricsRangeEstimatedHistogramGetOK { + return &StorageProxyMetricsRangeEstimatedHistogramGetOK{} +} + +/*StorageProxyMetricsRangeEstimatedHistogramGetOK handles this case with default header values. + +StorageProxyMetricsRangeEstimatedHistogramGetOK storage proxy metrics range estimated histogram get o k +*/ +type StorageProxyMetricsRangeEstimatedHistogramGetOK struct { +} + +func (o *StorageProxyMetricsRangeEstimatedHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsRangeEstimatedHistogramGetDefault creates a StorageProxyMetricsRangeEstimatedHistogramGetDefault with default headers values +func NewStorageProxyMetricsRangeEstimatedHistogramGetDefault(code int) *StorageProxyMetricsRangeEstimatedHistogramGetDefault { + return &StorageProxyMetricsRangeEstimatedHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeEstimatedHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeEstimatedHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range estimated histogram get default response +func (o *StorageProxyMetricsRangeEstimatedHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeEstimatedHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeEstimatedHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeEstimatedHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_parameters.go new file mode 100644 index 00000000000..02244709013 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeGetParams creates a new StorageProxyMetricsRangeGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeGetParams() *StorageProxyMetricsRangeGetParams { + + return &StorageProxyMetricsRangeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeGetParamsWithTimeout creates a new StorageProxyMetricsRangeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeGetParams { + + return &StorageProxyMetricsRangeGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeGetParamsWithContext creates a new StorageProxyMetricsRangeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeGetParams { + + return &StorageProxyMetricsRangeGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeGetParams { + + return &StorageProxyMetricsRangeGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range get params +func (o *StorageProxyMetricsRangeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_responses.go new file mode 100644 index 00000000000..961b54ed560 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeGetReader is a Reader for the StorageProxyMetricsRangeGet structure. +type StorageProxyMetricsRangeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeGetOK creates a StorageProxyMetricsRangeGetOK with default headers values +func NewStorageProxyMetricsRangeGetOK() *StorageProxyMetricsRangeGetOK { + return &StorageProxyMetricsRangeGetOK{} +} + +/*StorageProxyMetricsRangeGetOK handles this case with default header values. + +StorageProxyMetricsRangeGetOK storage proxy metrics range get o k +*/ +type StorageProxyMetricsRangeGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsRangeGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsRangeGetOK) 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 +} + +// NewStorageProxyMetricsRangeGetDefault creates a StorageProxyMetricsRangeGetDefault with default headers values +func NewStorageProxyMetricsRangeGetDefault(code int) *StorageProxyMetricsRangeGetDefault { + return &StorageProxyMetricsRangeGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range get default response +func (o *StorageProxyMetricsRangeGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_parameters.go new file mode 100644 index 00000000000..67fbdef5072 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeHistogramGetParams creates a new StorageProxyMetricsRangeHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeHistogramGetParams() *StorageProxyMetricsRangeHistogramGetParams { + + return &StorageProxyMetricsRangeHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeHistogramGetParamsWithTimeout creates a new StorageProxyMetricsRangeHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeHistogramGetParams { + + return &StorageProxyMetricsRangeHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeHistogramGetParamsWithContext creates a new StorageProxyMetricsRangeHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeHistogramGetParams { + + return &StorageProxyMetricsRangeHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeHistogramGetParams { + + return &StorageProxyMetricsRangeHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range histogram get params +func (o *StorageProxyMetricsRangeHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_responses.go new file mode 100644 index 00000000000..22cf0dcf1a6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeHistogramGetReader is a Reader for the StorageProxyMetricsRangeHistogramGet structure. +type StorageProxyMetricsRangeHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeHistogramGetOK creates a StorageProxyMetricsRangeHistogramGetOK with default headers values +func NewStorageProxyMetricsRangeHistogramGetOK() *StorageProxyMetricsRangeHistogramGetOK { + return &StorageProxyMetricsRangeHistogramGetOK{} +} + +/*StorageProxyMetricsRangeHistogramGetOK handles this case with default header values. + +StorageProxyMetricsRangeHistogramGetOK storage proxy metrics range histogram get o k +*/ +type StorageProxyMetricsRangeHistogramGetOK struct { +} + +func (o *StorageProxyMetricsRangeHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsRangeHistogramGetDefault creates a StorageProxyMetricsRangeHistogramGetDefault with default headers values +func NewStorageProxyMetricsRangeHistogramGetDefault(code int) *StorageProxyMetricsRangeHistogramGetDefault { + return &StorageProxyMetricsRangeHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range histogram get default response +func (o *StorageProxyMetricsRangeHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_parameters.go new file mode 100644 index 00000000000..baf689a16a4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetParams creates a new StorageProxyMetricsRangeMovingAverageHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeMovingAverageHistogramGetParams() *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + + return &StorageProxyMetricsRangeMovingAverageHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithTimeout creates a new StorageProxyMetricsRangeMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + + return &StorageProxyMetricsRangeMovingAverageHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithContext creates a new StorageProxyMetricsRangeMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + + return &StorageProxyMetricsRangeMovingAverageHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeMovingAverageHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + + return &StorageProxyMetricsRangeMovingAverageHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeMovingAverageHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range moving average histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeMovingAverageHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeMovingAverageHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range moving average histogram get params +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_responses.go new file mode 100644 index 00000000000..d951b0ae57e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_moving_average_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeMovingAverageHistogramGetReader is a Reader for the StorageProxyMetricsRangeMovingAverageHistogramGet structure. +type StorageProxyMetricsRangeMovingAverageHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeMovingAverageHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeMovingAverageHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetOK creates a StorageProxyMetricsRangeMovingAverageHistogramGetOK with default headers values +func NewStorageProxyMetricsRangeMovingAverageHistogramGetOK() *StorageProxyMetricsRangeMovingAverageHistogramGetOK { + return &StorageProxyMetricsRangeMovingAverageHistogramGetOK{} +} + +/*StorageProxyMetricsRangeMovingAverageHistogramGetOK handles this case with default header values. + +StorageProxyMetricsRangeMovingAverageHistogramGetOK storage proxy metrics range moving average histogram get o k +*/ +type StorageProxyMetricsRangeMovingAverageHistogramGetOK struct { +} + +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsRangeMovingAverageHistogramGetDefault creates a StorageProxyMetricsRangeMovingAverageHistogramGetDefault with default headers values +func NewStorageProxyMetricsRangeMovingAverageHistogramGetDefault(code int) *StorageProxyMetricsRangeMovingAverageHistogramGetDefault { + return &StorageProxyMetricsRangeMovingAverageHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeMovingAverageHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeMovingAverageHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range moving average histogram get default response +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeMovingAverageHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_parameters.go new file mode 100644 index 00000000000..f610b8d7316 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeTimeoutsGetParams creates a new StorageProxyMetricsRangeTimeoutsGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeTimeoutsGetParams() *StorageProxyMetricsRangeTimeoutsGetParams { + + return &StorageProxyMetricsRangeTimeoutsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeTimeoutsGetParamsWithTimeout creates a new StorageProxyMetricsRangeTimeoutsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeTimeoutsGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeTimeoutsGetParams { + + return &StorageProxyMetricsRangeTimeoutsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeTimeoutsGetParamsWithContext creates a new StorageProxyMetricsRangeTimeoutsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeTimeoutsGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeTimeoutsGetParams { + + return &StorageProxyMetricsRangeTimeoutsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeTimeoutsGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeTimeoutsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeTimeoutsGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeTimeoutsGetParams { + + return &StorageProxyMetricsRangeTimeoutsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeTimeoutsGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range timeouts get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeTimeoutsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeTimeoutsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeTimeoutsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeTimeoutsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range timeouts get params +func (o *StorageProxyMetricsRangeTimeoutsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeTimeoutsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_responses.go new file mode 100644 index 00000000000..e6e71f9cefd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeTimeoutsGetReader is a Reader for the StorageProxyMetricsRangeTimeoutsGet structure. +type StorageProxyMetricsRangeTimeoutsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeTimeoutsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeTimeoutsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeTimeoutsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeTimeoutsGetOK creates a StorageProxyMetricsRangeTimeoutsGetOK with default headers values +func NewStorageProxyMetricsRangeTimeoutsGetOK() *StorageProxyMetricsRangeTimeoutsGetOK { + return &StorageProxyMetricsRangeTimeoutsGetOK{} +} + +/*StorageProxyMetricsRangeTimeoutsGetOK handles this case with default header values. + +StorageProxyMetricsRangeTimeoutsGetOK storage proxy metrics range timeouts get o k +*/ +type StorageProxyMetricsRangeTimeoutsGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsRangeTimeoutsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsRangeTimeoutsGetOK) 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 +} + +// NewStorageProxyMetricsRangeTimeoutsGetDefault creates a StorageProxyMetricsRangeTimeoutsGetDefault with default headers values +func NewStorageProxyMetricsRangeTimeoutsGetDefault(code int) *StorageProxyMetricsRangeTimeoutsGetDefault { + return &StorageProxyMetricsRangeTimeoutsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeTimeoutsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeTimeoutsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range timeouts get default response +func (o *StorageProxyMetricsRangeTimeoutsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeTimeoutsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeTimeoutsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeTimeoutsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_parameters.go new file mode 100644 index 00000000000..99eceddac00 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeTimeoutsRatesGetParams creates a new StorageProxyMetricsRangeTimeoutsRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeTimeoutsRatesGetParams() *StorageProxyMetricsRangeTimeoutsRatesGetParams { + + return &StorageProxyMetricsRangeTimeoutsRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithTimeout creates a new StorageProxyMetricsRangeTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + + return &StorageProxyMetricsRangeTimeoutsRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithContext creates a new StorageProxyMetricsRangeTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + + return &StorageProxyMetricsRangeTimeoutsRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeTimeoutsRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + + return &StorageProxyMetricsRangeTimeoutsRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeTimeoutsRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range timeouts rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeTimeoutsRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeTimeoutsRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range timeouts rates get params +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeTimeoutsRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_responses.go new file mode 100644 index 00000000000..5be025d38fe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_timeouts_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeTimeoutsRatesGetReader is a Reader for the StorageProxyMetricsRangeTimeoutsRatesGet structure. +type StorageProxyMetricsRangeTimeoutsRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeTimeoutsRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeTimeoutsRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeTimeoutsRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeTimeoutsRatesGetOK creates a StorageProxyMetricsRangeTimeoutsRatesGetOK with default headers values +func NewStorageProxyMetricsRangeTimeoutsRatesGetOK() *StorageProxyMetricsRangeTimeoutsRatesGetOK { + return &StorageProxyMetricsRangeTimeoutsRatesGetOK{} +} + +/*StorageProxyMetricsRangeTimeoutsRatesGetOK handles this case with default header values. + +StorageProxyMetricsRangeTimeoutsRatesGetOK storage proxy metrics range timeouts rates get o k +*/ +type StorageProxyMetricsRangeTimeoutsRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsRangeTimeoutsRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsRangeTimeoutsRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsRangeTimeoutsRatesGetDefault creates a StorageProxyMetricsRangeTimeoutsRatesGetDefault with default headers values +func NewStorageProxyMetricsRangeTimeoutsRatesGetDefault(code int) *StorageProxyMetricsRangeTimeoutsRatesGetDefault { + return &StorageProxyMetricsRangeTimeoutsRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeTimeoutsRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeTimeoutsRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range timeouts rates get default response +func (o *StorageProxyMetricsRangeTimeoutsRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeTimeoutsRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeTimeoutsRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeTimeoutsRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_parameters.go new file mode 100644 index 00000000000..6d39b2c07b1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeUnavailablesGetParams creates a new StorageProxyMetricsRangeUnavailablesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeUnavailablesGetParams() *StorageProxyMetricsRangeUnavailablesGetParams { + + return &StorageProxyMetricsRangeUnavailablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeUnavailablesGetParamsWithTimeout creates a new StorageProxyMetricsRangeUnavailablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeUnavailablesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeUnavailablesGetParams { + + return &StorageProxyMetricsRangeUnavailablesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeUnavailablesGetParamsWithContext creates a new StorageProxyMetricsRangeUnavailablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeUnavailablesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeUnavailablesGetParams { + + return &StorageProxyMetricsRangeUnavailablesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeUnavailablesGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeUnavailablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeUnavailablesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeUnavailablesGetParams { + + return &StorageProxyMetricsRangeUnavailablesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeUnavailablesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range unavailables get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeUnavailablesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeUnavailablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeUnavailablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeUnavailablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range unavailables get params +func (o *StorageProxyMetricsRangeUnavailablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeUnavailablesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_responses.go new file mode 100644 index 00000000000..2a63588363d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeUnavailablesGetReader is a Reader for the StorageProxyMetricsRangeUnavailablesGet structure. +type StorageProxyMetricsRangeUnavailablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeUnavailablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeUnavailablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeUnavailablesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeUnavailablesGetOK creates a StorageProxyMetricsRangeUnavailablesGetOK with default headers values +func NewStorageProxyMetricsRangeUnavailablesGetOK() *StorageProxyMetricsRangeUnavailablesGetOK { + return &StorageProxyMetricsRangeUnavailablesGetOK{} +} + +/*StorageProxyMetricsRangeUnavailablesGetOK handles this case with default header values. + +StorageProxyMetricsRangeUnavailablesGetOK storage proxy metrics range unavailables get o k +*/ +type StorageProxyMetricsRangeUnavailablesGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsRangeUnavailablesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsRangeUnavailablesGetOK) 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 +} + +// NewStorageProxyMetricsRangeUnavailablesGetDefault creates a StorageProxyMetricsRangeUnavailablesGetDefault with default headers values +func NewStorageProxyMetricsRangeUnavailablesGetDefault(code int) *StorageProxyMetricsRangeUnavailablesGetDefault { + return &StorageProxyMetricsRangeUnavailablesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeUnavailablesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeUnavailablesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range unavailables get default response +func (o *StorageProxyMetricsRangeUnavailablesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeUnavailablesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeUnavailablesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeUnavailablesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_parameters.go new file mode 100644 index 00000000000..d4620aa70ed --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsRangeUnavailablesRatesGetParams creates a new StorageProxyMetricsRangeUnavailablesRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsRangeUnavailablesRatesGetParams() *StorageProxyMetricsRangeUnavailablesRatesGetParams { + + return &StorageProxyMetricsRangeUnavailablesRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithTimeout creates a new StorageProxyMetricsRangeUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + + return &StorageProxyMetricsRangeUnavailablesRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithContext creates a new StorageProxyMetricsRangeUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + + return &StorageProxyMetricsRangeUnavailablesRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsRangeUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsRangeUnavailablesRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + + return &StorageProxyMetricsRangeUnavailablesRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsRangeUnavailablesRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics range unavailables rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsRangeUnavailablesRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsRangeUnavailablesRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics range unavailables rates get params +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsRangeUnavailablesRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_responses.go new file mode 100644 index 00000000000..d8b878aa6b7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_range_unavailables_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsRangeUnavailablesRatesGetReader is a Reader for the StorageProxyMetricsRangeUnavailablesRatesGet structure. +type StorageProxyMetricsRangeUnavailablesRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsRangeUnavailablesRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsRangeUnavailablesRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsRangeUnavailablesRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsRangeUnavailablesRatesGetOK creates a StorageProxyMetricsRangeUnavailablesRatesGetOK with default headers values +func NewStorageProxyMetricsRangeUnavailablesRatesGetOK() *StorageProxyMetricsRangeUnavailablesRatesGetOK { + return &StorageProxyMetricsRangeUnavailablesRatesGetOK{} +} + +/*StorageProxyMetricsRangeUnavailablesRatesGetOK handles this case with default header values. + +StorageProxyMetricsRangeUnavailablesRatesGetOK storage proxy metrics range unavailables rates get o k +*/ +type StorageProxyMetricsRangeUnavailablesRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsRangeUnavailablesRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsRangeUnavailablesRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsRangeUnavailablesRatesGetDefault creates a StorageProxyMetricsRangeUnavailablesRatesGetDefault with default headers values +func NewStorageProxyMetricsRangeUnavailablesRatesGetDefault(code int) *StorageProxyMetricsRangeUnavailablesRatesGetDefault { + return &StorageProxyMetricsRangeUnavailablesRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsRangeUnavailablesRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsRangeUnavailablesRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics range unavailables rates get default response +func (o *StorageProxyMetricsRangeUnavailablesRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsRangeUnavailablesRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsRangeUnavailablesRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsRangeUnavailablesRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_parameters.go new file mode 100644 index 00000000000..42c8ebf92c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadEstimatedHistogramGetParams creates a new StorageProxyMetricsReadEstimatedHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadEstimatedHistogramGetParams() *StorageProxyMetricsReadEstimatedHistogramGetParams { + + return &StorageProxyMetricsReadEstimatedHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithTimeout creates a new StorageProxyMetricsReadEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadEstimatedHistogramGetParams { + + return &StorageProxyMetricsReadEstimatedHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithContext creates a new StorageProxyMetricsReadEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadEstimatedHistogramGetParams { + + return &StorageProxyMetricsReadEstimatedHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsReadEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadEstimatedHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadEstimatedHistogramGetParams { + + return &StorageProxyMetricsReadEstimatedHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadEstimatedHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read estimated histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadEstimatedHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadEstimatedHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadEstimatedHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadEstimatedHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read estimated histogram get params +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadEstimatedHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_responses.go new file mode 100644 index 00000000000..e1ff6a08109 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_estimated_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadEstimatedHistogramGetReader is a Reader for the StorageProxyMetricsReadEstimatedHistogramGet structure. +type StorageProxyMetricsReadEstimatedHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadEstimatedHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadEstimatedHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadEstimatedHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadEstimatedHistogramGetOK creates a StorageProxyMetricsReadEstimatedHistogramGetOK with default headers values +func NewStorageProxyMetricsReadEstimatedHistogramGetOK() *StorageProxyMetricsReadEstimatedHistogramGetOK { + return &StorageProxyMetricsReadEstimatedHistogramGetOK{} +} + +/*StorageProxyMetricsReadEstimatedHistogramGetOK handles this case with default header values. + +StorageProxyMetricsReadEstimatedHistogramGetOK storage proxy metrics read estimated histogram get o k +*/ +type StorageProxyMetricsReadEstimatedHistogramGetOK struct { +} + +func (o *StorageProxyMetricsReadEstimatedHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsReadEstimatedHistogramGetDefault creates a StorageProxyMetricsReadEstimatedHistogramGetDefault with default headers values +func NewStorageProxyMetricsReadEstimatedHistogramGetDefault(code int) *StorageProxyMetricsReadEstimatedHistogramGetDefault { + return &StorageProxyMetricsReadEstimatedHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadEstimatedHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadEstimatedHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read estimated histogram get default response +func (o *StorageProxyMetricsReadEstimatedHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadEstimatedHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadEstimatedHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadEstimatedHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_parameters.go new file mode 100644 index 00000000000..e8550dda179 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadGetParams creates a new StorageProxyMetricsReadGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadGetParams() *StorageProxyMetricsReadGetParams { + + return &StorageProxyMetricsReadGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadGetParamsWithTimeout creates a new StorageProxyMetricsReadGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadGetParams { + + return &StorageProxyMetricsReadGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadGetParamsWithContext creates a new StorageProxyMetricsReadGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadGetParams { + + return &StorageProxyMetricsReadGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadGetParamsWithHTTPClient creates a new StorageProxyMetricsReadGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadGetParams { + + return &StorageProxyMetricsReadGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read get params +func (o *StorageProxyMetricsReadGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_responses.go new file mode 100644 index 00000000000..bb03199dc6c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadGetReader is a Reader for the StorageProxyMetricsReadGet structure. +type StorageProxyMetricsReadGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadGetOK creates a StorageProxyMetricsReadGetOK with default headers values +func NewStorageProxyMetricsReadGetOK() *StorageProxyMetricsReadGetOK { + return &StorageProxyMetricsReadGetOK{} +} + +/*StorageProxyMetricsReadGetOK handles this case with default header values. + +StorageProxyMetricsReadGetOK storage proxy metrics read get o k +*/ +type StorageProxyMetricsReadGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsReadGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsReadGetOK) 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 +} + +// NewStorageProxyMetricsReadGetDefault creates a StorageProxyMetricsReadGetDefault with default headers values +func NewStorageProxyMetricsReadGetDefault(code int) *StorageProxyMetricsReadGetDefault { + return &StorageProxyMetricsReadGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read get default response +func (o *StorageProxyMetricsReadGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_parameters.go new file mode 100644 index 00000000000..c09f215f77b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadHistogramGetParams creates a new StorageProxyMetricsReadHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadHistogramGetParams() *StorageProxyMetricsReadHistogramGetParams { + + return &StorageProxyMetricsReadHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadHistogramGetParamsWithTimeout creates a new StorageProxyMetricsReadHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadHistogramGetParams { + + return &StorageProxyMetricsReadHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadHistogramGetParamsWithContext creates a new StorageProxyMetricsReadHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadHistogramGetParams { + + return &StorageProxyMetricsReadHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsReadHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadHistogramGetParams { + + return &StorageProxyMetricsReadHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read histogram get params +func (o *StorageProxyMetricsReadHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_responses.go new file mode 100644 index 00000000000..5789f69a6fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadHistogramGetReader is a Reader for the StorageProxyMetricsReadHistogramGet structure. +type StorageProxyMetricsReadHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadHistogramGetOK creates a StorageProxyMetricsReadHistogramGetOK with default headers values +func NewStorageProxyMetricsReadHistogramGetOK() *StorageProxyMetricsReadHistogramGetOK { + return &StorageProxyMetricsReadHistogramGetOK{} +} + +/*StorageProxyMetricsReadHistogramGetOK handles this case with default header values. + +StorageProxyMetricsReadHistogramGetOK storage proxy metrics read histogram get o k +*/ +type StorageProxyMetricsReadHistogramGetOK struct { +} + +func (o *StorageProxyMetricsReadHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsReadHistogramGetDefault creates a StorageProxyMetricsReadHistogramGetDefault with default headers values +func NewStorageProxyMetricsReadHistogramGetDefault(code int) *StorageProxyMetricsReadHistogramGetDefault { + return &StorageProxyMetricsReadHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read histogram get default response +func (o *StorageProxyMetricsReadHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_parameters.go new file mode 100644 index 00000000000..1aaf422f7f6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadMovingAverageHistogramGetParams creates a new StorageProxyMetricsReadMovingAverageHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadMovingAverageHistogramGetParams() *StorageProxyMetricsReadMovingAverageHistogramGetParams { + + return &StorageProxyMetricsReadMovingAverageHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithTimeout creates a new StorageProxyMetricsReadMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + + return &StorageProxyMetricsReadMovingAverageHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithContext creates a new StorageProxyMetricsReadMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + + return &StorageProxyMetricsReadMovingAverageHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsReadMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadMovingAverageHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + + return &StorageProxyMetricsReadMovingAverageHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadMovingAverageHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read moving average histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadMovingAverageHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadMovingAverageHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read moving average histogram get params +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadMovingAverageHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_responses.go new file mode 100644 index 00000000000..67b03c0e0e4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_moving_average_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadMovingAverageHistogramGetReader is a Reader for the StorageProxyMetricsReadMovingAverageHistogramGet structure. +type StorageProxyMetricsReadMovingAverageHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadMovingAverageHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadMovingAverageHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadMovingAverageHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadMovingAverageHistogramGetOK creates a StorageProxyMetricsReadMovingAverageHistogramGetOK with default headers values +func NewStorageProxyMetricsReadMovingAverageHistogramGetOK() *StorageProxyMetricsReadMovingAverageHistogramGetOK { + return &StorageProxyMetricsReadMovingAverageHistogramGetOK{} +} + +/*StorageProxyMetricsReadMovingAverageHistogramGetOK handles this case with default header values. + +StorageProxyMetricsReadMovingAverageHistogramGetOK storage proxy metrics read moving average histogram get o k +*/ +type StorageProxyMetricsReadMovingAverageHistogramGetOK struct { +} + +func (o *StorageProxyMetricsReadMovingAverageHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsReadMovingAverageHistogramGetDefault creates a StorageProxyMetricsReadMovingAverageHistogramGetDefault with default headers values +func NewStorageProxyMetricsReadMovingAverageHistogramGetDefault(code int) *StorageProxyMetricsReadMovingAverageHistogramGetDefault { + return &StorageProxyMetricsReadMovingAverageHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadMovingAverageHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadMovingAverageHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read moving average histogram get default response +func (o *StorageProxyMetricsReadMovingAverageHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadMovingAverageHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadMovingAverageHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadMovingAverageHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_parameters.go new file mode 100644 index 00000000000..215a6d11175 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadTimeoutsGetParams creates a new StorageProxyMetricsReadTimeoutsGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadTimeoutsGetParams() *StorageProxyMetricsReadTimeoutsGetParams { + + return &StorageProxyMetricsReadTimeoutsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadTimeoutsGetParamsWithTimeout creates a new StorageProxyMetricsReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadTimeoutsGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadTimeoutsGetParams { + + return &StorageProxyMetricsReadTimeoutsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadTimeoutsGetParamsWithContext creates a new StorageProxyMetricsReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadTimeoutsGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadTimeoutsGetParams { + + return &StorageProxyMetricsReadTimeoutsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadTimeoutsGetParamsWithHTTPClient creates a new StorageProxyMetricsReadTimeoutsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadTimeoutsGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadTimeoutsGetParams { + + return &StorageProxyMetricsReadTimeoutsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadTimeoutsGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read timeouts get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadTimeoutsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadTimeoutsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadTimeoutsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadTimeoutsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read timeouts get params +func (o *StorageProxyMetricsReadTimeoutsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadTimeoutsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_responses.go new file mode 100644 index 00000000000..d5441029b75 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadTimeoutsGetReader is a Reader for the StorageProxyMetricsReadTimeoutsGet structure. +type StorageProxyMetricsReadTimeoutsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadTimeoutsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadTimeoutsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadTimeoutsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadTimeoutsGetOK creates a StorageProxyMetricsReadTimeoutsGetOK with default headers values +func NewStorageProxyMetricsReadTimeoutsGetOK() *StorageProxyMetricsReadTimeoutsGetOK { + return &StorageProxyMetricsReadTimeoutsGetOK{} +} + +/*StorageProxyMetricsReadTimeoutsGetOK handles this case with default header values. + +StorageProxyMetricsReadTimeoutsGetOK storage proxy metrics read timeouts get o k +*/ +type StorageProxyMetricsReadTimeoutsGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsReadTimeoutsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsReadTimeoutsGetOK) 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 +} + +// NewStorageProxyMetricsReadTimeoutsGetDefault creates a StorageProxyMetricsReadTimeoutsGetDefault with default headers values +func NewStorageProxyMetricsReadTimeoutsGetDefault(code int) *StorageProxyMetricsReadTimeoutsGetDefault { + return &StorageProxyMetricsReadTimeoutsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadTimeoutsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadTimeoutsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read timeouts get default response +func (o *StorageProxyMetricsReadTimeoutsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadTimeoutsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadTimeoutsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadTimeoutsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_parameters.go new file mode 100644 index 00000000000..0764238d5d7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadTimeoutsRatesGetParams creates a new StorageProxyMetricsReadTimeoutsRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadTimeoutsRatesGetParams() *StorageProxyMetricsReadTimeoutsRatesGetParams { + + return &StorageProxyMetricsReadTimeoutsRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithTimeout creates a new StorageProxyMetricsReadTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadTimeoutsRatesGetParams { + + return &StorageProxyMetricsReadTimeoutsRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithContext creates a new StorageProxyMetricsReadTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadTimeoutsRatesGetParams { + + return &StorageProxyMetricsReadTimeoutsRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsReadTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadTimeoutsRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadTimeoutsRatesGetParams { + + return &StorageProxyMetricsReadTimeoutsRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadTimeoutsRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read timeouts rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadTimeoutsRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadTimeoutsRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadTimeoutsRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadTimeoutsRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read timeouts rates get params +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadTimeoutsRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_responses.go new file mode 100644 index 00000000000..a71c20b8875 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_timeouts_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadTimeoutsRatesGetReader is a Reader for the StorageProxyMetricsReadTimeoutsRatesGet structure. +type StorageProxyMetricsReadTimeoutsRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadTimeoutsRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadTimeoutsRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadTimeoutsRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadTimeoutsRatesGetOK creates a StorageProxyMetricsReadTimeoutsRatesGetOK with default headers values +func NewStorageProxyMetricsReadTimeoutsRatesGetOK() *StorageProxyMetricsReadTimeoutsRatesGetOK { + return &StorageProxyMetricsReadTimeoutsRatesGetOK{} +} + +/*StorageProxyMetricsReadTimeoutsRatesGetOK handles this case with default header values. + +StorageProxyMetricsReadTimeoutsRatesGetOK storage proxy metrics read timeouts rates get o k +*/ +type StorageProxyMetricsReadTimeoutsRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsReadTimeoutsRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsReadTimeoutsRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsReadTimeoutsRatesGetDefault creates a StorageProxyMetricsReadTimeoutsRatesGetDefault with default headers values +func NewStorageProxyMetricsReadTimeoutsRatesGetDefault(code int) *StorageProxyMetricsReadTimeoutsRatesGetDefault { + return &StorageProxyMetricsReadTimeoutsRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadTimeoutsRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadTimeoutsRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read timeouts rates get default response +func (o *StorageProxyMetricsReadTimeoutsRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadTimeoutsRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadTimeoutsRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadTimeoutsRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_parameters.go new file mode 100644 index 00000000000..1c0a815dc3b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadUnavailablesGetParams creates a new StorageProxyMetricsReadUnavailablesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadUnavailablesGetParams() *StorageProxyMetricsReadUnavailablesGetParams { + + return &StorageProxyMetricsReadUnavailablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadUnavailablesGetParamsWithTimeout creates a new StorageProxyMetricsReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadUnavailablesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadUnavailablesGetParams { + + return &StorageProxyMetricsReadUnavailablesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadUnavailablesGetParamsWithContext creates a new StorageProxyMetricsReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadUnavailablesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadUnavailablesGetParams { + + return &StorageProxyMetricsReadUnavailablesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadUnavailablesGetParamsWithHTTPClient creates a new StorageProxyMetricsReadUnavailablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadUnavailablesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadUnavailablesGetParams { + + return &StorageProxyMetricsReadUnavailablesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadUnavailablesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read unavailables get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadUnavailablesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadUnavailablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadUnavailablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadUnavailablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read unavailables get params +func (o *StorageProxyMetricsReadUnavailablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadUnavailablesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_responses.go new file mode 100644 index 00000000000..81ddf9a9fbc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadUnavailablesGetReader is a Reader for the StorageProxyMetricsReadUnavailablesGet structure. +type StorageProxyMetricsReadUnavailablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadUnavailablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadUnavailablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadUnavailablesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadUnavailablesGetOK creates a StorageProxyMetricsReadUnavailablesGetOK with default headers values +func NewStorageProxyMetricsReadUnavailablesGetOK() *StorageProxyMetricsReadUnavailablesGetOK { + return &StorageProxyMetricsReadUnavailablesGetOK{} +} + +/*StorageProxyMetricsReadUnavailablesGetOK handles this case with default header values. + +StorageProxyMetricsReadUnavailablesGetOK storage proxy metrics read unavailables get o k +*/ +type StorageProxyMetricsReadUnavailablesGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsReadUnavailablesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsReadUnavailablesGetOK) 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 +} + +// NewStorageProxyMetricsReadUnavailablesGetDefault creates a StorageProxyMetricsReadUnavailablesGetDefault with default headers values +func NewStorageProxyMetricsReadUnavailablesGetDefault(code int) *StorageProxyMetricsReadUnavailablesGetDefault { + return &StorageProxyMetricsReadUnavailablesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadUnavailablesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadUnavailablesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read unavailables get default response +func (o *StorageProxyMetricsReadUnavailablesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadUnavailablesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadUnavailablesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadUnavailablesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_parameters.go new file mode 100644 index 00000000000..d61bee99d58 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsReadUnavailablesRatesGetParams creates a new StorageProxyMetricsReadUnavailablesRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsReadUnavailablesRatesGetParams() *StorageProxyMetricsReadUnavailablesRatesGetParams { + + return &StorageProxyMetricsReadUnavailablesRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithTimeout creates a new StorageProxyMetricsReadUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsReadUnavailablesRatesGetParams { + + return &StorageProxyMetricsReadUnavailablesRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithContext creates a new StorageProxyMetricsReadUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsReadUnavailablesRatesGetParams { + + return &StorageProxyMetricsReadUnavailablesRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsReadUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsReadUnavailablesRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsReadUnavailablesRatesGetParams { + + return &StorageProxyMetricsReadUnavailablesRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsReadUnavailablesRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics read unavailables rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsReadUnavailablesRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsReadUnavailablesRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsReadUnavailablesRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsReadUnavailablesRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics read unavailables rates get params +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsReadUnavailablesRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_responses.go new file mode 100644 index 00000000000..42135c35a1b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_read_unavailables_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsReadUnavailablesRatesGetReader is a Reader for the StorageProxyMetricsReadUnavailablesRatesGet structure. +type StorageProxyMetricsReadUnavailablesRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsReadUnavailablesRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsReadUnavailablesRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsReadUnavailablesRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsReadUnavailablesRatesGetOK creates a StorageProxyMetricsReadUnavailablesRatesGetOK with default headers values +func NewStorageProxyMetricsReadUnavailablesRatesGetOK() *StorageProxyMetricsReadUnavailablesRatesGetOK { + return &StorageProxyMetricsReadUnavailablesRatesGetOK{} +} + +/*StorageProxyMetricsReadUnavailablesRatesGetOK handles this case with default header values. + +StorageProxyMetricsReadUnavailablesRatesGetOK storage proxy metrics read unavailables rates get o k +*/ +type StorageProxyMetricsReadUnavailablesRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsReadUnavailablesRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsReadUnavailablesRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsReadUnavailablesRatesGetDefault creates a StorageProxyMetricsReadUnavailablesRatesGetDefault with default headers values +func NewStorageProxyMetricsReadUnavailablesRatesGetDefault(code int) *StorageProxyMetricsReadUnavailablesRatesGetDefault { + return &StorageProxyMetricsReadUnavailablesRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsReadUnavailablesRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsReadUnavailablesRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics read unavailables rates get default response +func (o *StorageProxyMetricsReadUnavailablesRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsReadUnavailablesRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsReadUnavailablesRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsReadUnavailablesRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_parameters.go new file mode 100644 index 00000000000..d2a76762d5a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteEstimatedHistogramGetParams creates a new StorageProxyMetricsWriteEstimatedHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteEstimatedHistogramGetParams() *StorageProxyMetricsWriteEstimatedHistogramGetParams { + + return &StorageProxyMetricsWriteEstimatedHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithTimeout creates a new StorageProxyMetricsWriteEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + + return &StorageProxyMetricsWriteEstimatedHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithContext creates a new StorageProxyMetricsWriteEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + + return &StorageProxyMetricsWriteEstimatedHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteEstimatedHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteEstimatedHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + + return &StorageProxyMetricsWriteEstimatedHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteEstimatedHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write estimated histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteEstimatedHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteEstimatedHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write estimated histogram get params +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteEstimatedHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_responses.go new file mode 100644 index 00000000000..0dbc1d75d34 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_estimated_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteEstimatedHistogramGetReader is a Reader for the StorageProxyMetricsWriteEstimatedHistogramGet structure. +type StorageProxyMetricsWriteEstimatedHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteEstimatedHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteEstimatedHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteEstimatedHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteEstimatedHistogramGetOK creates a StorageProxyMetricsWriteEstimatedHistogramGetOK with default headers values +func NewStorageProxyMetricsWriteEstimatedHistogramGetOK() *StorageProxyMetricsWriteEstimatedHistogramGetOK { + return &StorageProxyMetricsWriteEstimatedHistogramGetOK{} +} + +/*StorageProxyMetricsWriteEstimatedHistogramGetOK handles this case with default header values. + +StorageProxyMetricsWriteEstimatedHistogramGetOK storage proxy metrics write estimated histogram get o k +*/ +type StorageProxyMetricsWriteEstimatedHistogramGetOK struct { +} + +func (o *StorageProxyMetricsWriteEstimatedHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsWriteEstimatedHistogramGetDefault creates a StorageProxyMetricsWriteEstimatedHistogramGetDefault with default headers values +func NewStorageProxyMetricsWriteEstimatedHistogramGetDefault(code int) *StorageProxyMetricsWriteEstimatedHistogramGetDefault { + return &StorageProxyMetricsWriteEstimatedHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteEstimatedHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteEstimatedHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write estimated histogram get default response +func (o *StorageProxyMetricsWriteEstimatedHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteEstimatedHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteEstimatedHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteEstimatedHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_parameters.go new file mode 100644 index 00000000000..d13b3902a07 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteGetParams creates a new StorageProxyMetricsWriteGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteGetParams() *StorageProxyMetricsWriteGetParams { + + return &StorageProxyMetricsWriteGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteGetParamsWithTimeout creates a new StorageProxyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteGetParams { + + return &StorageProxyMetricsWriteGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteGetParamsWithContext creates a new StorageProxyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteGetParams { + + return &StorageProxyMetricsWriteGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteGetParams { + + return &StorageProxyMetricsWriteGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write get params +func (o *StorageProxyMetricsWriteGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_responses.go new file mode 100644 index 00000000000..15c6ad1602b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteGetReader is a Reader for the StorageProxyMetricsWriteGet structure. +type StorageProxyMetricsWriteGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteGetOK creates a StorageProxyMetricsWriteGetOK with default headers values +func NewStorageProxyMetricsWriteGetOK() *StorageProxyMetricsWriteGetOK { + return &StorageProxyMetricsWriteGetOK{} +} + +/*StorageProxyMetricsWriteGetOK handles this case with default header values. + +StorageProxyMetricsWriteGetOK storage proxy metrics write get o k +*/ +type StorageProxyMetricsWriteGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsWriteGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsWriteGetOK) 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 +} + +// NewStorageProxyMetricsWriteGetDefault creates a StorageProxyMetricsWriteGetDefault with default headers values +func NewStorageProxyMetricsWriteGetDefault(code int) *StorageProxyMetricsWriteGetDefault { + return &StorageProxyMetricsWriteGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write get default response +func (o *StorageProxyMetricsWriteGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_parameters.go new file mode 100644 index 00000000000..05c4435b3c8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteHistogramGetParams creates a new StorageProxyMetricsWriteHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteHistogramGetParams() *StorageProxyMetricsWriteHistogramGetParams { + + return &StorageProxyMetricsWriteHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteHistogramGetParamsWithTimeout creates a new StorageProxyMetricsWriteHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteHistogramGetParams { + + return &StorageProxyMetricsWriteHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteHistogramGetParamsWithContext creates a new StorageProxyMetricsWriteHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteHistogramGetParams { + + return &StorageProxyMetricsWriteHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteHistogramGetParams { + + return &StorageProxyMetricsWriteHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write histogram get params +func (o *StorageProxyMetricsWriteHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_responses.go new file mode 100644 index 00000000000..4a3eabb0ad3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteHistogramGetReader is a Reader for the StorageProxyMetricsWriteHistogramGet structure. +type StorageProxyMetricsWriteHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteHistogramGetOK creates a StorageProxyMetricsWriteHistogramGetOK with default headers values +func NewStorageProxyMetricsWriteHistogramGetOK() *StorageProxyMetricsWriteHistogramGetOK { + return &StorageProxyMetricsWriteHistogramGetOK{} +} + +/*StorageProxyMetricsWriteHistogramGetOK handles this case with default header values. + +StorageProxyMetricsWriteHistogramGetOK storage proxy metrics write histogram get o k +*/ +type StorageProxyMetricsWriteHistogramGetOK struct { +} + +func (o *StorageProxyMetricsWriteHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsWriteHistogramGetDefault creates a StorageProxyMetricsWriteHistogramGetDefault with default headers values +func NewStorageProxyMetricsWriteHistogramGetDefault(code int) *StorageProxyMetricsWriteHistogramGetDefault { + return &StorageProxyMetricsWriteHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write histogram get default response +func (o *StorageProxyMetricsWriteHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_parameters.go new file mode 100644 index 00000000000..5e33d36934d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetParams creates a new StorageProxyMetricsWriteMovingAverageHistogramGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteMovingAverageHistogramGetParams() *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + + return &StorageProxyMetricsWriteMovingAverageHistogramGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithTimeout creates a new StorageProxyMetricsWriteMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + + return &StorageProxyMetricsWriteMovingAverageHistogramGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithContext creates a new StorageProxyMetricsWriteMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + + return &StorageProxyMetricsWriteMovingAverageHistogramGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteMovingAverageHistogramGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteMovingAverageHistogramGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + + return &StorageProxyMetricsWriteMovingAverageHistogramGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteMovingAverageHistogramGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write moving average histogram get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteMovingAverageHistogramGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteMovingAverageHistogramGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write moving average histogram get params +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_responses.go new file mode 100644 index 00000000000..1dcbdc48a30 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_moving_average_histogram_get_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteMovingAverageHistogramGetReader is a Reader for the StorageProxyMetricsWriteMovingAverageHistogramGet structure. +type StorageProxyMetricsWriteMovingAverageHistogramGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteMovingAverageHistogramGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteMovingAverageHistogramGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetOK creates a StorageProxyMetricsWriteMovingAverageHistogramGetOK with default headers values +func NewStorageProxyMetricsWriteMovingAverageHistogramGetOK() *StorageProxyMetricsWriteMovingAverageHistogramGetOK { + return &StorageProxyMetricsWriteMovingAverageHistogramGetOK{} +} + +/*StorageProxyMetricsWriteMovingAverageHistogramGetOK handles this case with default header values. + +StorageProxyMetricsWriteMovingAverageHistogramGetOK storage proxy metrics write moving average histogram get o k +*/ +type StorageProxyMetricsWriteMovingAverageHistogramGetOK struct { +} + +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyMetricsWriteMovingAverageHistogramGetDefault creates a StorageProxyMetricsWriteMovingAverageHistogramGetDefault with default headers values +func NewStorageProxyMetricsWriteMovingAverageHistogramGetDefault(code int) *StorageProxyMetricsWriteMovingAverageHistogramGetDefault { + return &StorageProxyMetricsWriteMovingAverageHistogramGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteMovingAverageHistogramGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteMovingAverageHistogramGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write moving average histogram get default response +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteMovingAverageHistogramGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_parameters.go new file mode 100644 index 00000000000..d977756d5dd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteTimeoutsGetParams creates a new StorageProxyMetricsWriteTimeoutsGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteTimeoutsGetParams() *StorageProxyMetricsWriteTimeoutsGetParams { + + return &StorageProxyMetricsWriteTimeoutsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteTimeoutsGetParamsWithTimeout creates a new StorageProxyMetricsWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteTimeoutsGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteTimeoutsGetParams { + + return &StorageProxyMetricsWriteTimeoutsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteTimeoutsGetParamsWithContext creates a new StorageProxyMetricsWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteTimeoutsGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteTimeoutsGetParams { + + return &StorageProxyMetricsWriteTimeoutsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteTimeoutsGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteTimeoutsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteTimeoutsGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteTimeoutsGetParams { + + return &StorageProxyMetricsWriteTimeoutsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteTimeoutsGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write timeouts get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteTimeoutsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteTimeoutsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteTimeoutsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteTimeoutsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write timeouts get params +func (o *StorageProxyMetricsWriteTimeoutsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteTimeoutsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_responses.go new file mode 100644 index 00000000000..5b6890a36e6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteTimeoutsGetReader is a Reader for the StorageProxyMetricsWriteTimeoutsGet structure. +type StorageProxyMetricsWriteTimeoutsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteTimeoutsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteTimeoutsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteTimeoutsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteTimeoutsGetOK creates a StorageProxyMetricsWriteTimeoutsGetOK with default headers values +func NewStorageProxyMetricsWriteTimeoutsGetOK() *StorageProxyMetricsWriteTimeoutsGetOK { + return &StorageProxyMetricsWriteTimeoutsGetOK{} +} + +/*StorageProxyMetricsWriteTimeoutsGetOK handles this case with default header values. + +StorageProxyMetricsWriteTimeoutsGetOK storage proxy metrics write timeouts get o k +*/ +type StorageProxyMetricsWriteTimeoutsGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsWriteTimeoutsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsWriteTimeoutsGetOK) 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 +} + +// NewStorageProxyMetricsWriteTimeoutsGetDefault creates a StorageProxyMetricsWriteTimeoutsGetDefault with default headers values +func NewStorageProxyMetricsWriteTimeoutsGetDefault(code int) *StorageProxyMetricsWriteTimeoutsGetDefault { + return &StorageProxyMetricsWriteTimeoutsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteTimeoutsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteTimeoutsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write timeouts get default response +func (o *StorageProxyMetricsWriteTimeoutsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteTimeoutsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteTimeoutsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteTimeoutsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_parameters.go new file mode 100644 index 00000000000..ef184aa266a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteTimeoutsRatesGetParams creates a new StorageProxyMetricsWriteTimeoutsRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteTimeoutsRatesGetParams() *StorageProxyMetricsWriteTimeoutsRatesGetParams { + + return &StorageProxyMetricsWriteTimeoutsRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithTimeout creates a new StorageProxyMetricsWriteTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + + return &StorageProxyMetricsWriteTimeoutsRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithContext creates a new StorageProxyMetricsWriteTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + + return &StorageProxyMetricsWriteTimeoutsRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteTimeoutsRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteTimeoutsRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + + return &StorageProxyMetricsWriteTimeoutsRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteTimeoutsRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write timeouts rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteTimeoutsRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteTimeoutsRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write timeouts rates get params +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteTimeoutsRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_responses.go new file mode 100644 index 00000000000..0fcc2c1704c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_timeouts_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteTimeoutsRatesGetReader is a Reader for the StorageProxyMetricsWriteTimeoutsRatesGet structure. +type StorageProxyMetricsWriteTimeoutsRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteTimeoutsRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteTimeoutsRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteTimeoutsRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteTimeoutsRatesGetOK creates a StorageProxyMetricsWriteTimeoutsRatesGetOK with default headers values +func NewStorageProxyMetricsWriteTimeoutsRatesGetOK() *StorageProxyMetricsWriteTimeoutsRatesGetOK { + return &StorageProxyMetricsWriteTimeoutsRatesGetOK{} +} + +/*StorageProxyMetricsWriteTimeoutsRatesGetOK handles this case with default header values. + +StorageProxyMetricsWriteTimeoutsRatesGetOK storage proxy metrics write timeouts rates get o k +*/ +type StorageProxyMetricsWriteTimeoutsRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsWriteTimeoutsRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsWriteTimeoutsRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsWriteTimeoutsRatesGetDefault creates a StorageProxyMetricsWriteTimeoutsRatesGetDefault with default headers values +func NewStorageProxyMetricsWriteTimeoutsRatesGetDefault(code int) *StorageProxyMetricsWriteTimeoutsRatesGetDefault { + return &StorageProxyMetricsWriteTimeoutsRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteTimeoutsRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteTimeoutsRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write timeouts rates get default response +func (o *StorageProxyMetricsWriteTimeoutsRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteTimeoutsRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteTimeoutsRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteTimeoutsRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_parameters.go new file mode 100644 index 00000000000..2f7b97fb153 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteUnavailablesGetParams creates a new StorageProxyMetricsWriteUnavailablesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteUnavailablesGetParams() *StorageProxyMetricsWriteUnavailablesGetParams { + + return &StorageProxyMetricsWriteUnavailablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteUnavailablesGetParamsWithTimeout creates a new StorageProxyMetricsWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteUnavailablesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteUnavailablesGetParams { + + return &StorageProxyMetricsWriteUnavailablesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteUnavailablesGetParamsWithContext creates a new StorageProxyMetricsWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteUnavailablesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteUnavailablesGetParams { + + return &StorageProxyMetricsWriteUnavailablesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteUnavailablesGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteUnavailablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteUnavailablesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteUnavailablesGetParams { + + return &StorageProxyMetricsWriteUnavailablesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteUnavailablesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write unavailables get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteUnavailablesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteUnavailablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteUnavailablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteUnavailablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write unavailables get params +func (o *StorageProxyMetricsWriteUnavailablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteUnavailablesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_responses.go new file mode 100644 index 00000000000..a9cf15a017b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteUnavailablesGetReader is a Reader for the StorageProxyMetricsWriteUnavailablesGet structure. +type StorageProxyMetricsWriteUnavailablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteUnavailablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteUnavailablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteUnavailablesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteUnavailablesGetOK creates a StorageProxyMetricsWriteUnavailablesGetOK with default headers values +func NewStorageProxyMetricsWriteUnavailablesGetOK() *StorageProxyMetricsWriteUnavailablesGetOK { + return &StorageProxyMetricsWriteUnavailablesGetOK{} +} + +/*StorageProxyMetricsWriteUnavailablesGetOK handles this case with default header values. + +StorageProxyMetricsWriteUnavailablesGetOK storage proxy metrics write unavailables get o k +*/ +type StorageProxyMetricsWriteUnavailablesGetOK struct { + Payload int32 +} + +func (o *StorageProxyMetricsWriteUnavailablesGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageProxyMetricsWriteUnavailablesGetOK) 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 +} + +// NewStorageProxyMetricsWriteUnavailablesGetDefault creates a StorageProxyMetricsWriteUnavailablesGetDefault with default headers values +func NewStorageProxyMetricsWriteUnavailablesGetDefault(code int) *StorageProxyMetricsWriteUnavailablesGetDefault { + return &StorageProxyMetricsWriteUnavailablesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteUnavailablesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteUnavailablesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write unavailables get default response +func (o *StorageProxyMetricsWriteUnavailablesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteUnavailablesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteUnavailablesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteUnavailablesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_parameters.go new file mode 100644 index 00000000000..cf9df8556c3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyMetricsWriteUnavailablesRatesGetParams creates a new StorageProxyMetricsWriteUnavailablesRatesGetParams object +// with the default values initialized. +func NewStorageProxyMetricsWriteUnavailablesRatesGetParams() *StorageProxyMetricsWriteUnavailablesRatesGetParams { + + return &StorageProxyMetricsWriteUnavailablesRatesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithTimeout creates a new StorageProxyMetricsWriteUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithTimeout(timeout time.Duration) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + + return &StorageProxyMetricsWriteUnavailablesRatesGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithContext creates a new StorageProxyMetricsWriteUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithContext(ctx context.Context) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + + return &StorageProxyMetricsWriteUnavailablesRatesGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithHTTPClient creates a new StorageProxyMetricsWriteUnavailablesRatesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyMetricsWriteUnavailablesRatesGetParamsWithHTTPClient(client *http.Client) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + + return &StorageProxyMetricsWriteUnavailablesRatesGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyMetricsWriteUnavailablesRatesGetParams contains all the parameters to send to the API endpoint +for the storage proxy metrics write unavailables rates get operation typically these are written to a http.Request +*/ +type StorageProxyMetricsWriteUnavailablesRatesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) WithTimeout(timeout time.Duration) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) WithContext(ctx context.Context) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) WithHTTPClient(client *http.Client) *StorageProxyMetricsWriteUnavailablesRatesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy metrics write unavailables rates get params +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyMetricsWriteUnavailablesRatesGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_responses.go new file mode 100644 index 00000000000..0f858355c4e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_metrics_write_unavailables_rates_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyMetricsWriteUnavailablesRatesGetReader is a Reader for the StorageProxyMetricsWriteUnavailablesRatesGet structure. +type StorageProxyMetricsWriteUnavailablesRatesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyMetricsWriteUnavailablesRatesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyMetricsWriteUnavailablesRatesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyMetricsWriteUnavailablesRatesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyMetricsWriteUnavailablesRatesGetOK creates a StorageProxyMetricsWriteUnavailablesRatesGetOK with default headers values +func NewStorageProxyMetricsWriteUnavailablesRatesGetOK() *StorageProxyMetricsWriteUnavailablesRatesGetOK { + return &StorageProxyMetricsWriteUnavailablesRatesGetOK{} +} + +/*StorageProxyMetricsWriteUnavailablesRatesGetOK handles this case with default header values. + +StorageProxyMetricsWriteUnavailablesRatesGetOK storage proxy metrics write unavailables rates get o k +*/ +type StorageProxyMetricsWriteUnavailablesRatesGetOK struct { + Payload *models.RateMovingAverage +} + +func (o *StorageProxyMetricsWriteUnavailablesRatesGetOK) GetPayload() *models.RateMovingAverage { + return o.Payload +} + +func (o *StorageProxyMetricsWriteUnavailablesRatesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.RateMovingAverage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageProxyMetricsWriteUnavailablesRatesGetDefault creates a StorageProxyMetricsWriteUnavailablesRatesGetDefault with default headers values +func NewStorageProxyMetricsWriteUnavailablesRatesGetDefault(code int) *StorageProxyMetricsWriteUnavailablesRatesGetDefault { + return &StorageProxyMetricsWriteUnavailablesRatesGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyMetricsWriteUnavailablesRatesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyMetricsWriteUnavailablesRatesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy metrics write unavailables rates get default response +func (o *StorageProxyMetricsWriteUnavailablesRatesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyMetricsWriteUnavailablesRatesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyMetricsWriteUnavailablesRatesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyMetricsWriteUnavailablesRatesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..de17ee41997 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyRangeRPCTimeoutGetParams creates a new StorageProxyRangeRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyRangeRPCTimeoutGetParams() *StorageProxyRangeRPCTimeoutGetParams { + + return &StorageProxyRangeRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyRangeRPCTimeoutGetParamsWithTimeout creates a new StorageProxyRangeRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyRangeRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyRangeRPCTimeoutGetParams { + + return &StorageProxyRangeRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyRangeRPCTimeoutGetParamsWithContext creates a new StorageProxyRangeRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyRangeRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyRangeRPCTimeoutGetParams { + + return &StorageProxyRangeRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyRangeRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyRangeRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyRangeRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyRangeRPCTimeoutGetParams { + + return &StorageProxyRangeRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyRangeRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy range Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyRangeRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyRangeRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyRangeRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyRangeRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy range Rpc timeout get params +func (o *StorageProxyRangeRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyRangeRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..38a8d3e873b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyRangeRPCTimeoutGetReader is a Reader for the StorageProxyRangeRPCTimeoutGet structure. +type StorageProxyRangeRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyRangeRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyRangeRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyRangeRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyRangeRPCTimeoutGetOK creates a StorageProxyRangeRPCTimeoutGetOK with default headers values +func NewStorageProxyRangeRPCTimeoutGetOK() *StorageProxyRangeRPCTimeoutGetOK { + return &StorageProxyRangeRPCTimeoutGetOK{} +} + +/*StorageProxyRangeRPCTimeoutGetOK handles this case with default header values. + +StorageProxyRangeRPCTimeoutGetOK storage proxy range Rpc timeout get o k +*/ +type StorageProxyRangeRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyRangeRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyRangeRPCTimeoutGetOK) 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 +} + +// NewStorageProxyRangeRPCTimeoutGetDefault creates a StorageProxyRangeRPCTimeoutGetDefault with default headers values +func NewStorageProxyRangeRPCTimeoutGetDefault(code int) *StorageProxyRangeRPCTimeoutGetDefault { + return &StorageProxyRangeRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyRangeRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyRangeRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy range Rpc timeout get default response +func (o *StorageProxyRangeRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyRangeRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyRangeRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyRangeRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..e7a5ff4fd39 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyRangeRPCTimeoutPostParams creates a new StorageProxyRangeRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyRangeRPCTimeoutPostParams() *StorageProxyRangeRPCTimeoutPostParams { + var () + return &StorageProxyRangeRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyRangeRPCTimeoutPostParamsWithTimeout creates a new StorageProxyRangeRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyRangeRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyRangeRPCTimeoutPostParams { + var () + return &StorageProxyRangeRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyRangeRPCTimeoutPostParamsWithContext creates a new StorageProxyRangeRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyRangeRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyRangeRPCTimeoutPostParams { + var () + return &StorageProxyRangeRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyRangeRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyRangeRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyRangeRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyRangeRPCTimeoutPostParams { + var () + return &StorageProxyRangeRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyRangeRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy range Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyRangeRPCTimeoutPostParams struct { + + /*Timeout + timeout in second + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyRangeRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyRangeRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyRangeRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyRangeRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy range Rpc timeout post params +func (o *StorageProxyRangeRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyRangeRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..aae5d9589d0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_range_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyRangeRPCTimeoutPostReader is a Reader for the StorageProxyRangeRPCTimeoutPost structure. +type StorageProxyRangeRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyRangeRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyRangeRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyRangeRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyRangeRPCTimeoutPostOK creates a StorageProxyRangeRPCTimeoutPostOK with default headers values +func NewStorageProxyRangeRPCTimeoutPostOK() *StorageProxyRangeRPCTimeoutPostOK { + return &StorageProxyRangeRPCTimeoutPostOK{} +} + +/*StorageProxyRangeRPCTimeoutPostOK handles this case with default header values. + +StorageProxyRangeRPCTimeoutPostOK storage proxy range Rpc timeout post o k +*/ +type StorageProxyRangeRPCTimeoutPostOK struct { +} + +func (o *StorageProxyRangeRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyRangeRPCTimeoutPostDefault creates a StorageProxyRangeRPCTimeoutPostDefault with default headers values +func NewStorageProxyRangeRPCTimeoutPostDefault(code int) *StorageProxyRangeRPCTimeoutPostDefault { + return &StorageProxyRangeRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyRangeRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyRangeRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy range Rpc timeout post default response +func (o *StorageProxyRangeRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyRangeRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyRangeRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyRangeRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_parameters.go new file mode 100644 index 00000000000..3af9eb6cd26 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReadRepairAttemptedGetParams creates a new StorageProxyReadRepairAttemptedGetParams object +// with the default values initialized. +func NewStorageProxyReadRepairAttemptedGetParams() *StorageProxyReadRepairAttemptedGetParams { + + return &StorageProxyReadRepairAttemptedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReadRepairAttemptedGetParamsWithTimeout creates a new StorageProxyReadRepairAttemptedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReadRepairAttemptedGetParamsWithTimeout(timeout time.Duration) *StorageProxyReadRepairAttemptedGetParams { + + return &StorageProxyReadRepairAttemptedGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyReadRepairAttemptedGetParamsWithContext creates a new StorageProxyReadRepairAttemptedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReadRepairAttemptedGetParamsWithContext(ctx context.Context) *StorageProxyReadRepairAttemptedGetParams { + + return &StorageProxyReadRepairAttemptedGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyReadRepairAttemptedGetParamsWithHTTPClient creates a new StorageProxyReadRepairAttemptedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReadRepairAttemptedGetParamsWithHTTPClient(client *http.Client) *StorageProxyReadRepairAttemptedGetParams { + + return &StorageProxyReadRepairAttemptedGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyReadRepairAttemptedGetParams contains all the parameters to send to the API endpoint +for the storage proxy read repair attempted get operation typically these are written to a http.Request +*/ +type StorageProxyReadRepairAttemptedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) WithTimeout(timeout time.Duration) *StorageProxyReadRepairAttemptedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) WithContext(ctx context.Context) *StorageProxyReadRepairAttemptedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) WithHTTPClient(client *http.Client) *StorageProxyReadRepairAttemptedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy read repair attempted get params +func (o *StorageProxyReadRepairAttemptedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReadRepairAttemptedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_responses.go new file mode 100644 index 00000000000..6f7edb31dbe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_attempted_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReadRepairAttemptedGetReader is a Reader for the StorageProxyReadRepairAttemptedGet structure. +type StorageProxyReadRepairAttemptedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReadRepairAttemptedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReadRepairAttemptedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReadRepairAttemptedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReadRepairAttemptedGetOK creates a StorageProxyReadRepairAttemptedGetOK with default headers values +func NewStorageProxyReadRepairAttemptedGetOK() *StorageProxyReadRepairAttemptedGetOK { + return &StorageProxyReadRepairAttemptedGetOK{} +} + +/*StorageProxyReadRepairAttemptedGetOK handles this case with default header values. + +StorageProxyReadRepairAttemptedGetOK storage proxy read repair attempted get o k +*/ +type StorageProxyReadRepairAttemptedGetOK struct { + Payload interface{} +} + +func (o *StorageProxyReadRepairAttemptedGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyReadRepairAttemptedGetOK) 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 +} + +// NewStorageProxyReadRepairAttemptedGetDefault creates a StorageProxyReadRepairAttemptedGetDefault with default headers values +func NewStorageProxyReadRepairAttemptedGetDefault(code int) *StorageProxyReadRepairAttemptedGetDefault { + return &StorageProxyReadRepairAttemptedGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyReadRepairAttemptedGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReadRepairAttemptedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy read repair attempted get default response +func (o *StorageProxyReadRepairAttemptedGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReadRepairAttemptedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReadRepairAttemptedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReadRepairAttemptedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_parameters.go new file mode 100644 index 00000000000..731799ded3e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReadRepairRepairedBackgroundGetParams creates a new StorageProxyReadRepairRepairedBackgroundGetParams object +// with the default values initialized. +func NewStorageProxyReadRepairRepairedBackgroundGetParams() *StorageProxyReadRepairRepairedBackgroundGetParams { + + return &StorageProxyReadRepairRepairedBackgroundGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReadRepairRepairedBackgroundGetParamsWithTimeout creates a new StorageProxyReadRepairRepairedBackgroundGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReadRepairRepairedBackgroundGetParamsWithTimeout(timeout time.Duration) *StorageProxyReadRepairRepairedBackgroundGetParams { + + return &StorageProxyReadRepairRepairedBackgroundGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyReadRepairRepairedBackgroundGetParamsWithContext creates a new StorageProxyReadRepairRepairedBackgroundGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReadRepairRepairedBackgroundGetParamsWithContext(ctx context.Context) *StorageProxyReadRepairRepairedBackgroundGetParams { + + return &StorageProxyReadRepairRepairedBackgroundGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyReadRepairRepairedBackgroundGetParamsWithHTTPClient creates a new StorageProxyReadRepairRepairedBackgroundGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReadRepairRepairedBackgroundGetParamsWithHTTPClient(client *http.Client) *StorageProxyReadRepairRepairedBackgroundGetParams { + + return &StorageProxyReadRepairRepairedBackgroundGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyReadRepairRepairedBackgroundGetParams contains all the parameters to send to the API endpoint +for the storage proxy read repair repaired background get operation typically these are written to a http.Request +*/ +type StorageProxyReadRepairRepairedBackgroundGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) WithTimeout(timeout time.Duration) *StorageProxyReadRepairRepairedBackgroundGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) WithContext(ctx context.Context) *StorageProxyReadRepairRepairedBackgroundGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) WithHTTPClient(client *http.Client) *StorageProxyReadRepairRepairedBackgroundGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy read repair repaired background get params +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReadRepairRepairedBackgroundGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_responses.go new file mode 100644 index 00000000000..03cf40dab1e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_background_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReadRepairRepairedBackgroundGetReader is a Reader for the StorageProxyReadRepairRepairedBackgroundGet structure. +type StorageProxyReadRepairRepairedBackgroundGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReadRepairRepairedBackgroundGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReadRepairRepairedBackgroundGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReadRepairRepairedBackgroundGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReadRepairRepairedBackgroundGetOK creates a StorageProxyReadRepairRepairedBackgroundGetOK with default headers values +func NewStorageProxyReadRepairRepairedBackgroundGetOK() *StorageProxyReadRepairRepairedBackgroundGetOK { + return &StorageProxyReadRepairRepairedBackgroundGetOK{} +} + +/*StorageProxyReadRepairRepairedBackgroundGetOK handles this case with default header values. + +StorageProxyReadRepairRepairedBackgroundGetOK storage proxy read repair repaired background get o k +*/ +type StorageProxyReadRepairRepairedBackgroundGetOK struct { + Payload interface{} +} + +func (o *StorageProxyReadRepairRepairedBackgroundGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyReadRepairRepairedBackgroundGetOK) 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 +} + +// NewStorageProxyReadRepairRepairedBackgroundGetDefault creates a StorageProxyReadRepairRepairedBackgroundGetDefault with default headers values +func NewStorageProxyReadRepairRepairedBackgroundGetDefault(code int) *StorageProxyReadRepairRepairedBackgroundGetDefault { + return &StorageProxyReadRepairRepairedBackgroundGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyReadRepairRepairedBackgroundGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReadRepairRepairedBackgroundGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy read repair repaired background get default response +func (o *StorageProxyReadRepairRepairedBackgroundGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReadRepairRepairedBackgroundGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReadRepairRepairedBackgroundGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReadRepairRepairedBackgroundGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_parameters.go new file mode 100644 index 00000000000..5c3cbb897eb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReadRepairRepairedBlockingGetParams creates a new StorageProxyReadRepairRepairedBlockingGetParams object +// with the default values initialized. +func NewStorageProxyReadRepairRepairedBlockingGetParams() *StorageProxyReadRepairRepairedBlockingGetParams { + + return &StorageProxyReadRepairRepairedBlockingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReadRepairRepairedBlockingGetParamsWithTimeout creates a new StorageProxyReadRepairRepairedBlockingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReadRepairRepairedBlockingGetParamsWithTimeout(timeout time.Duration) *StorageProxyReadRepairRepairedBlockingGetParams { + + return &StorageProxyReadRepairRepairedBlockingGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyReadRepairRepairedBlockingGetParamsWithContext creates a new StorageProxyReadRepairRepairedBlockingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReadRepairRepairedBlockingGetParamsWithContext(ctx context.Context) *StorageProxyReadRepairRepairedBlockingGetParams { + + return &StorageProxyReadRepairRepairedBlockingGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyReadRepairRepairedBlockingGetParamsWithHTTPClient creates a new StorageProxyReadRepairRepairedBlockingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReadRepairRepairedBlockingGetParamsWithHTTPClient(client *http.Client) *StorageProxyReadRepairRepairedBlockingGetParams { + + return &StorageProxyReadRepairRepairedBlockingGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyReadRepairRepairedBlockingGetParams contains all the parameters to send to the API endpoint +for the storage proxy read repair repaired blocking get operation typically these are written to a http.Request +*/ +type StorageProxyReadRepairRepairedBlockingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) WithTimeout(timeout time.Duration) *StorageProxyReadRepairRepairedBlockingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) WithContext(ctx context.Context) *StorageProxyReadRepairRepairedBlockingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) WithHTTPClient(client *http.Client) *StorageProxyReadRepairRepairedBlockingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy read repair repaired blocking get params +func (o *StorageProxyReadRepairRepairedBlockingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReadRepairRepairedBlockingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_responses.go new file mode 100644 index 00000000000..b09fe899807 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_repair_repaired_blocking_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReadRepairRepairedBlockingGetReader is a Reader for the StorageProxyReadRepairRepairedBlockingGet structure. +type StorageProxyReadRepairRepairedBlockingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReadRepairRepairedBlockingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReadRepairRepairedBlockingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReadRepairRepairedBlockingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReadRepairRepairedBlockingGetOK creates a StorageProxyReadRepairRepairedBlockingGetOK with default headers values +func NewStorageProxyReadRepairRepairedBlockingGetOK() *StorageProxyReadRepairRepairedBlockingGetOK { + return &StorageProxyReadRepairRepairedBlockingGetOK{} +} + +/*StorageProxyReadRepairRepairedBlockingGetOK handles this case with default header values. + +StorageProxyReadRepairRepairedBlockingGetOK storage proxy read repair repaired blocking get o k +*/ +type StorageProxyReadRepairRepairedBlockingGetOK struct { + Payload interface{} +} + +func (o *StorageProxyReadRepairRepairedBlockingGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyReadRepairRepairedBlockingGetOK) 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 +} + +// NewStorageProxyReadRepairRepairedBlockingGetDefault creates a StorageProxyReadRepairRepairedBlockingGetDefault with default headers values +func NewStorageProxyReadRepairRepairedBlockingGetDefault(code int) *StorageProxyReadRepairRepairedBlockingGetDefault { + return &StorageProxyReadRepairRepairedBlockingGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyReadRepairRepairedBlockingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReadRepairRepairedBlockingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy read repair repaired blocking get default response +func (o *StorageProxyReadRepairRepairedBlockingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReadRepairRepairedBlockingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReadRepairRepairedBlockingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReadRepairRepairedBlockingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..6f49efb1fc7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReadRPCTimeoutGetParams creates a new StorageProxyReadRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyReadRPCTimeoutGetParams() *StorageProxyReadRPCTimeoutGetParams { + + return &StorageProxyReadRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReadRPCTimeoutGetParamsWithTimeout creates a new StorageProxyReadRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReadRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyReadRPCTimeoutGetParams { + + return &StorageProxyReadRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyReadRPCTimeoutGetParamsWithContext creates a new StorageProxyReadRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReadRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyReadRPCTimeoutGetParams { + + return &StorageProxyReadRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyReadRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyReadRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReadRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyReadRPCTimeoutGetParams { + + return &StorageProxyReadRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyReadRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy read Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyReadRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyReadRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyReadRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyReadRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy read Rpc timeout get params +func (o *StorageProxyReadRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReadRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..b213a13be4b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReadRPCTimeoutGetReader is a Reader for the StorageProxyReadRPCTimeoutGet structure. +type StorageProxyReadRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReadRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReadRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReadRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReadRPCTimeoutGetOK creates a StorageProxyReadRPCTimeoutGetOK with default headers values +func NewStorageProxyReadRPCTimeoutGetOK() *StorageProxyReadRPCTimeoutGetOK { + return &StorageProxyReadRPCTimeoutGetOK{} +} + +/*StorageProxyReadRPCTimeoutGetOK handles this case with default header values. + +StorageProxyReadRPCTimeoutGetOK storage proxy read Rpc timeout get o k +*/ +type StorageProxyReadRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyReadRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyReadRPCTimeoutGetOK) 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 +} + +// NewStorageProxyReadRPCTimeoutGetDefault creates a StorageProxyReadRPCTimeoutGetDefault with default headers values +func NewStorageProxyReadRPCTimeoutGetDefault(code int) *StorageProxyReadRPCTimeoutGetDefault { + return &StorageProxyReadRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyReadRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReadRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy read Rpc timeout get default response +func (o *StorageProxyReadRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReadRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReadRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReadRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..862f1939d25 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReadRPCTimeoutPostParams creates a new StorageProxyReadRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyReadRPCTimeoutPostParams() *StorageProxyReadRPCTimeoutPostParams { + var () + return &StorageProxyReadRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReadRPCTimeoutPostParamsWithTimeout creates a new StorageProxyReadRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReadRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyReadRPCTimeoutPostParams { + var () + return &StorageProxyReadRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyReadRPCTimeoutPostParamsWithContext creates a new StorageProxyReadRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReadRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyReadRPCTimeoutPostParams { + var () + return &StorageProxyReadRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyReadRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyReadRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReadRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyReadRPCTimeoutPostParams { + var () + return &StorageProxyReadRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyReadRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy read Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyReadRPCTimeoutPostParams struct { + + /*Timeout + The timeout in second + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyReadRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyReadRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyReadRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyReadRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy read Rpc timeout post params +func (o *StorageProxyReadRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReadRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..d98246abf2f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_read_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReadRPCTimeoutPostReader is a Reader for the StorageProxyReadRPCTimeoutPost structure. +type StorageProxyReadRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReadRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReadRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReadRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReadRPCTimeoutPostOK creates a StorageProxyReadRPCTimeoutPostOK with default headers values +func NewStorageProxyReadRPCTimeoutPostOK() *StorageProxyReadRPCTimeoutPostOK { + return &StorageProxyReadRPCTimeoutPostOK{} +} + +/*StorageProxyReadRPCTimeoutPostOK handles this case with default header values. + +StorageProxyReadRPCTimeoutPostOK storage proxy read Rpc timeout post o k +*/ +type StorageProxyReadRPCTimeoutPostOK struct { +} + +func (o *StorageProxyReadRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyReadRPCTimeoutPostDefault creates a StorageProxyReadRPCTimeoutPostDefault with default headers values +func NewStorageProxyReadRPCTimeoutPostDefault(code int) *StorageProxyReadRPCTimeoutPostDefault { + return &StorageProxyReadRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyReadRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReadRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy read Rpc timeout post default response +func (o *StorageProxyReadRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReadRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReadRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReadRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_parameters.go new file mode 100644 index 00000000000..e27eace77a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyReloadTriggerClassesPostParams creates a new StorageProxyReloadTriggerClassesPostParams object +// with the default values initialized. +func NewStorageProxyReloadTriggerClassesPostParams() *StorageProxyReloadTriggerClassesPostParams { + + return &StorageProxyReloadTriggerClassesPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyReloadTriggerClassesPostParamsWithTimeout creates a new StorageProxyReloadTriggerClassesPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyReloadTriggerClassesPostParamsWithTimeout(timeout time.Duration) *StorageProxyReloadTriggerClassesPostParams { + + return &StorageProxyReloadTriggerClassesPostParams{ + + timeout: timeout, + } +} + +// NewStorageProxyReloadTriggerClassesPostParamsWithContext creates a new StorageProxyReloadTriggerClassesPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyReloadTriggerClassesPostParamsWithContext(ctx context.Context) *StorageProxyReloadTriggerClassesPostParams { + + return &StorageProxyReloadTriggerClassesPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyReloadTriggerClassesPostParamsWithHTTPClient creates a new StorageProxyReloadTriggerClassesPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyReloadTriggerClassesPostParamsWithHTTPClient(client *http.Client) *StorageProxyReloadTriggerClassesPostParams { + + return &StorageProxyReloadTriggerClassesPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyReloadTriggerClassesPostParams contains all the parameters to send to the API endpoint +for the storage proxy reload trigger classes post operation typically these are written to a http.Request +*/ +type StorageProxyReloadTriggerClassesPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) WithTimeout(timeout time.Duration) *StorageProxyReloadTriggerClassesPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) WithContext(ctx context.Context) *StorageProxyReloadTriggerClassesPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) WithHTTPClient(client *http.Client) *StorageProxyReloadTriggerClassesPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy reload trigger classes post params +func (o *StorageProxyReloadTriggerClassesPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyReloadTriggerClassesPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_responses.go new file mode 100644 index 00000000000..c4586b6a44d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_reload_trigger_classes_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyReloadTriggerClassesPostReader is a Reader for the StorageProxyReloadTriggerClassesPost structure. +type StorageProxyReloadTriggerClassesPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyReloadTriggerClassesPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyReloadTriggerClassesPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyReloadTriggerClassesPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyReloadTriggerClassesPostOK creates a StorageProxyReloadTriggerClassesPostOK with default headers values +func NewStorageProxyReloadTriggerClassesPostOK() *StorageProxyReloadTriggerClassesPostOK { + return &StorageProxyReloadTriggerClassesPostOK{} +} + +/*StorageProxyReloadTriggerClassesPostOK handles this case with default header values. + +StorageProxyReloadTriggerClassesPostOK storage proxy reload trigger classes post o k +*/ +type StorageProxyReloadTriggerClassesPostOK struct { +} + +func (o *StorageProxyReloadTriggerClassesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyReloadTriggerClassesPostDefault creates a StorageProxyReloadTriggerClassesPostDefault with default headers values +func NewStorageProxyReloadTriggerClassesPostDefault(code int) *StorageProxyReloadTriggerClassesPostDefault { + return &StorageProxyReloadTriggerClassesPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyReloadTriggerClassesPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyReloadTriggerClassesPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy reload trigger classes post default response +func (o *StorageProxyReloadTriggerClassesPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyReloadTriggerClassesPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyReloadTriggerClassesPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyReloadTriggerClassesPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..1f58d50ee64 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyRPCTimeoutGetParams creates a new StorageProxyRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyRPCTimeoutGetParams() *StorageProxyRPCTimeoutGetParams { + + return &StorageProxyRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyRPCTimeoutGetParamsWithTimeout creates a new StorageProxyRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyRPCTimeoutGetParams { + + return &StorageProxyRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyRPCTimeoutGetParamsWithContext creates a new StorageProxyRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyRPCTimeoutGetParams { + + return &StorageProxyRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyRPCTimeoutGetParams { + + return &StorageProxyRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy Rpc timeout get params +func (o *StorageProxyRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..9b961b43a54 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyRPCTimeoutGetReader is a Reader for the StorageProxyRPCTimeoutGet structure. +type StorageProxyRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyRPCTimeoutGetOK creates a StorageProxyRPCTimeoutGetOK with default headers values +func NewStorageProxyRPCTimeoutGetOK() *StorageProxyRPCTimeoutGetOK { + return &StorageProxyRPCTimeoutGetOK{} +} + +/*StorageProxyRPCTimeoutGetOK handles this case with default header values. + +StorageProxyRPCTimeoutGetOK storage proxy Rpc timeout get o k +*/ +type StorageProxyRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyRPCTimeoutGetOK) 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 +} + +// NewStorageProxyRPCTimeoutGetDefault creates a StorageProxyRPCTimeoutGetDefault with default headers values +func NewStorageProxyRPCTimeoutGetDefault(code int) *StorageProxyRPCTimeoutGetDefault { + return &StorageProxyRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy Rpc timeout get default response +func (o *StorageProxyRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..c50e2ed7745 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyRPCTimeoutPostParams creates a new StorageProxyRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyRPCTimeoutPostParams() *StorageProxyRPCTimeoutPostParams { + var () + return &StorageProxyRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyRPCTimeoutPostParamsWithTimeout creates a new StorageProxyRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyRPCTimeoutPostParams { + var () + return &StorageProxyRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyRPCTimeoutPostParamsWithContext creates a new StorageProxyRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyRPCTimeoutPostParams { + var () + return &StorageProxyRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyRPCTimeoutPostParams { + var () + return &StorageProxyRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyRPCTimeoutPostParams struct { + + /*Timeout + Timeout in seconds + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy Rpc timeout post params +func (o *StorageProxyRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..d84394b4c7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyRPCTimeoutPostReader is a Reader for the StorageProxyRPCTimeoutPost structure. +type StorageProxyRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyRPCTimeoutPostOK creates a StorageProxyRPCTimeoutPostOK with default headers values +func NewStorageProxyRPCTimeoutPostOK() *StorageProxyRPCTimeoutPostOK { + return &StorageProxyRPCTimeoutPostOK{} +} + +/*StorageProxyRPCTimeoutPostOK handles this case with default header values. + +StorageProxyRPCTimeoutPostOK storage proxy Rpc timeout post o k +*/ +type StorageProxyRPCTimeoutPostOK struct { +} + +func (o *StorageProxyRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyRPCTimeoutPostDefault creates a StorageProxyRPCTimeoutPostDefault with default headers values +func NewStorageProxyRPCTimeoutPostDefault(code int) *StorageProxyRPCTimeoutPostDefault { + return &StorageProxyRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy Rpc timeout post default response +func (o *StorageProxyRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_parameters.go new file mode 100644 index 00000000000..78938b4bcf4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxySchemaVersionsGetParams creates a new StorageProxySchemaVersionsGetParams object +// with the default values initialized. +func NewStorageProxySchemaVersionsGetParams() *StorageProxySchemaVersionsGetParams { + + return &StorageProxySchemaVersionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxySchemaVersionsGetParamsWithTimeout creates a new StorageProxySchemaVersionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxySchemaVersionsGetParamsWithTimeout(timeout time.Duration) *StorageProxySchemaVersionsGetParams { + + return &StorageProxySchemaVersionsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxySchemaVersionsGetParamsWithContext creates a new StorageProxySchemaVersionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxySchemaVersionsGetParamsWithContext(ctx context.Context) *StorageProxySchemaVersionsGetParams { + + return &StorageProxySchemaVersionsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxySchemaVersionsGetParamsWithHTTPClient creates a new StorageProxySchemaVersionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxySchemaVersionsGetParamsWithHTTPClient(client *http.Client) *StorageProxySchemaVersionsGetParams { + + return &StorageProxySchemaVersionsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxySchemaVersionsGetParams contains all the parameters to send to the API endpoint +for the storage proxy schema versions get operation typically these are written to a http.Request +*/ +type StorageProxySchemaVersionsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) WithTimeout(timeout time.Duration) *StorageProxySchemaVersionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) WithContext(ctx context.Context) *StorageProxySchemaVersionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) WithHTTPClient(client *http.Client) *StorageProxySchemaVersionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy schema versions get params +func (o *StorageProxySchemaVersionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxySchemaVersionsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_responses.go new file mode 100644 index 00000000000..7612a09c6ca --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_schema_versions_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxySchemaVersionsGetReader is a Reader for the StorageProxySchemaVersionsGet structure. +type StorageProxySchemaVersionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxySchemaVersionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxySchemaVersionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxySchemaVersionsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxySchemaVersionsGetOK creates a StorageProxySchemaVersionsGetOK with default headers values +func NewStorageProxySchemaVersionsGetOK() *StorageProxySchemaVersionsGetOK { + return &StorageProxySchemaVersionsGetOK{} +} + +/*StorageProxySchemaVersionsGetOK handles this case with default header values. + +StorageProxySchemaVersionsGetOK storage proxy schema versions get o k +*/ +type StorageProxySchemaVersionsGetOK struct { + Payload []*models.MapperList +} + +func (o *StorageProxySchemaVersionsGetOK) GetPayload() []*models.MapperList { + return o.Payload +} + +func (o *StorageProxySchemaVersionsGetOK) 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 +} + +// NewStorageProxySchemaVersionsGetDefault creates a StorageProxySchemaVersionsGetDefault with default headers values +func NewStorageProxySchemaVersionsGetDefault(code int) *StorageProxySchemaVersionsGetDefault { + return &StorageProxySchemaVersionsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxySchemaVersionsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxySchemaVersionsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy schema versions get default response +func (o *StorageProxySchemaVersionsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxySchemaVersionsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxySchemaVersionsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxySchemaVersionsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_parameters.go new file mode 100644 index 00000000000..9371329e5ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyTotalHintsGetParams creates a new StorageProxyTotalHintsGetParams object +// with the default values initialized. +func NewStorageProxyTotalHintsGetParams() *StorageProxyTotalHintsGetParams { + + return &StorageProxyTotalHintsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyTotalHintsGetParamsWithTimeout creates a new StorageProxyTotalHintsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyTotalHintsGetParamsWithTimeout(timeout time.Duration) *StorageProxyTotalHintsGetParams { + + return &StorageProxyTotalHintsGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyTotalHintsGetParamsWithContext creates a new StorageProxyTotalHintsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyTotalHintsGetParamsWithContext(ctx context.Context) *StorageProxyTotalHintsGetParams { + + return &StorageProxyTotalHintsGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyTotalHintsGetParamsWithHTTPClient creates a new StorageProxyTotalHintsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyTotalHintsGetParamsWithHTTPClient(client *http.Client) *StorageProxyTotalHintsGetParams { + + return &StorageProxyTotalHintsGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyTotalHintsGetParams contains all the parameters to send to the API endpoint +for the storage proxy total hints get operation typically these are written to a http.Request +*/ +type StorageProxyTotalHintsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) WithTimeout(timeout time.Duration) *StorageProxyTotalHintsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) WithContext(ctx context.Context) *StorageProxyTotalHintsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) WithHTTPClient(client *http.Client) *StorageProxyTotalHintsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy total hints get params +func (o *StorageProxyTotalHintsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyTotalHintsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_responses.go new file mode 100644 index 00000000000..99558b518c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_total_hints_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyTotalHintsGetReader is a Reader for the StorageProxyTotalHintsGet structure. +type StorageProxyTotalHintsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyTotalHintsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyTotalHintsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyTotalHintsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyTotalHintsGetOK creates a StorageProxyTotalHintsGetOK with default headers values +func NewStorageProxyTotalHintsGetOK() *StorageProxyTotalHintsGetOK { + return &StorageProxyTotalHintsGetOK{} +} + +/*StorageProxyTotalHintsGetOK handles this case with default header values. + +StorageProxyTotalHintsGetOK storage proxy total hints get o k +*/ +type StorageProxyTotalHintsGetOK struct { + Payload interface{} +} + +func (o *StorageProxyTotalHintsGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyTotalHintsGetOK) 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 +} + +// NewStorageProxyTotalHintsGetDefault creates a StorageProxyTotalHintsGetDefault with default headers values +func NewStorageProxyTotalHintsGetDefault(code int) *StorageProxyTotalHintsGetDefault { + return &StorageProxyTotalHintsGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyTotalHintsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyTotalHintsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy total hints get default response +func (o *StorageProxyTotalHintsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyTotalHintsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyTotalHintsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyTotalHintsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..bb89cb926f3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyTruncateRPCTimeoutGetParams creates a new StorageProxyTruncateRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyTruncateRPCTimeoutGetParams() *StorageProxyTruncateRPCTimeoutGetParams { + + return &StorageProxyTruncateRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyTruncateRPCTimeoutGetParamsWithTimeout creates a new StorageProxyTruncateRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyTruncateRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyTruncateRPCTimeoutGetParams { + + return &StorageProxyTruncateRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyTruncateRPCTimeoutGetParamsWithContext creates a new StorageProxyTruncateRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyTruncateRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyTruncateRPCTimeoutGetParams { + + return &StorageProxyTruncateRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyTruncateRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyTruncateRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyTruncateRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyTruncateRPCTimeoutGetParams { + + return &StorageProxyTruncateRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyTruncateRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy truncate Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyTruncateRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyTruncateRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyTruncateRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyTruncateRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy truncate Rpc timeout get params +func (o *StorageProxyTruncateRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyTruncateRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..89aa102b94b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyTruncateRPCTimeoutGetReader is a Reader for the StorageProxyTruncateRPCTimeoutGet structure. +type StorageProxyTruncateRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyTruncateRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyTruncateRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyTruncateRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyTruncateRPCTimeoutGetOK creates a StorageProxyTruncateRPCTimeoutGetOK with default headers values +func NewStorageProxyTruncateRPCTimeoutGetOK() *StorageProxyTruncateRPCTimeoutGetOK { + return &StorageProxyTruncateRPCTimeoutGetOK{} +} + +/*StorageProxyTruncateRPCTimeoutGetOK handles this case with default header values. + +StorageProxyTruncateRPCTimeoutGetOK storage proxy truncate Rpc timeout get o k +*/ +type StorageProxyTruncateRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyTruncateRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyTruncateRPCTimeoutGetOK) 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 +} + +// NewStorageProxyTruncateRPCTimeoutGetDefault creates a StorageProxyTruncateRPCTimeoutGetDefault with default headers values +func NewStorageProxyTruncateRPCTimeoutGetDefault(code int) *StorageProxyTruncateRPCTimeoutGetDefault { + return &StorageProxyTruncateRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyTruncateRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyTruncateRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy truncate Rpc timeout get default response +func (o *StorageProxyTruncateRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyTruncateRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyTruncateRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyTruncateRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..2ca2d7f931d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyTruncateRPCTimeoutPostParams creates a new StorageProxyTruncateRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyTruncateRPCTimeoutPostParams() *StorageProxyTruncateRPCTimeoutPostParams { + var () + return &StorageProxyTruncateRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyTruncateRPCTimeoutPostParamsWithTimeout creates a new StorageProxyTruncateRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyTruncateRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyTruncateRPCTimeoutPostParams { + var () + return &StorageProxyTruncateRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyTruncateRPCTimeoutPostParamsWithContext creates a new StorageProxyTruncateRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyTruncateRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyTruncateRPCTimeoutPostParams { + var () + return &StorageProxyTruncateRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyTruncateRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyTruncateRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyTruncateRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyTruncateRPCTimeoutPostParams { + var () + return &StorageProxyTruncateRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyTruncateRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy truncate Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyTruncateRPCTimeoutPostParams struct { + + /*Timeout + timeout in second + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyTruncateRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyTruncateRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyTruncateRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyTruncateRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy truncate Rpc timeout post params +func (o *StorageProxyTruncateRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyTruncateRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..a709750bcda --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_truncate_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyTruncateRPCTimeoutPostReader is a Reader for the StorageProxyTruncateRPCTimeoutPost structure. +type StorageProxyTruncateRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyTruncateRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyTruncateRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyTruncateRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyTruncateRPCTimeoutPostOK creates a StorageProxyTruncateRPCTimeoutPostOK with default headers values +func NewStorageProxyTruncateRPCTimeoutPostOK() *StorageProxyTruncateRPCTimeoutPostOK { + return &StorageProxyTruncateRPCTimeoutPostOK{} +} + +/*StorageProxyTruncateRPCTimeoutPostOK handles this case with default header values. + +StorageProxyTruncateRPCTimeoutPostOK storage proxy truncate Rpc timeout post o k +*/ +type StorageProxyTruncateRPCTimeoutPostOK struct { +} + +func (o *StorageProxyTruncateRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyTruncateRPCTimeoutPostDefault creates a StorageProxyTruncateRPCTimeoutPostDefault with default headers values +func NewStorageProxyTruncateRPCTimeoutPostDefault(code int) *StorageProxyTruncateRPCTimeoutPostDefault { + return &StorageProxyTruncateRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyTruncateRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyTruncateRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy truncate Rpc timeout post default response +func (o *StorageProxyTruncateRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyTruncateRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyTruncateRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyTruncateRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_parameters.go new file mode 100644 index 00000000000..1e4c6bc5d4a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyWriteRPCTimeoutGetParams creates a new StorageProxyWriteRPCTimeoutGetParams object +// with the default values initialized. +func NewStorageProxyWriteRPCTimeoutGetParams() *StorageProxyWriteRPCTimeoutGetParams { + + return &StorageProxyWriteRPCTimeoutGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyWriteRPCTimeoutGetParamsWithTimeout creates a new StorageProxyWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyWriteRPCTimeoutGetParamsWithTimeout(timeout time.Duration) *StorageProxyWriteRPCTimeoutGetParams { + + return &StorageProxyWriteRPCTimeoutGetParams{ + + timeout: timeout, + } +} + +// NewStorageProxyWriteRPCTimeoutGetParamsWithContext creates a new StorageProxyWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyWriteRPCTimeoutGetParamsWithContext(ctx context.Context) *StorageProxyWriteRPCTimeoutGetParams { + + return &StorageProxyWriteRPCTimeoutGetParams{ + + Context: ctx, + } +} + +// NewStorageProxyWriteRPCTimeoutGetParamsWithHTTPClient creates a new StorageProxyWriteRPCTimeoutGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyWriteRPCTimeoutGetParamsWithHTTPClient(client *http.Client) *StorageProxyWriteRPCTimeoutGetParams { + + return &StorageProxyWriteRPCTimeoutGetParams{ + HTTPClient: client, + } +} + +/*StorageProxyWriteRPCTimeoutGetParams contains all the parameters to send to the API endpoint +for the storage proxy write Rpc timeout get operation typically these are written to a http.Request +*/ +type StorageProxyWriteRPCTimeoutGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) WithTimeout(timeout time.Duration) *StorageProxyWriteRPCTimeoutGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) WithContext(ctx context.Context) *StorageProxyWriteRPCTimeoutGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) WithHTTPClient(client *http.Client) *StorageProxyWriteRPCTimeoutGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy write Rpc timeout get params +func (o *StorageProxyWriteRPCTimeoutGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyWriteRPCTimeoutGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_responses.go new file mode 100644 index 00000000000..e172cf67760 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyWriteRPCTimeoutGetReader is a Reader for the StorageProxyWriteRPCTimeoutGet structure. +type StorageProxyWriteRPCTimeoutGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyWriteRPCTimeoutGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyWriteRPCTimeoutGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyWriteRPCTimeoutGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyWriteRPCTimeoutGetOK creates a StorageProxyWriteRPCTimeoutGetOK with default headers values +func NewStorageProxyWriteRPCTimeoutGetOK() *StorageProxyWriteRPCTimeoutGetOK { + return &StorageProxyWriteRPCTimeoutGetOK{} +} + +/*StorageProxyWriteRPCTimeoutGetOK handles this case with default header values. + +StorageProxyWriteRPCTimeoutGetOK storage proxy write Rpc timeout get o k +*/ +type StorageProxyWriteRPCTimeoutGetOK struct { + Payload interface{} +} + +func (o *StorageProxyWriteRPCTimeoutGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageProxyWriteRPCTimeoutGetOK) 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 +} + +// NewStorageProxyWriteRPCTimeoutGetDefault creates a StorageProxyWriteRPCTimeoutGetDefault with default headers values +func NewStorageProxyWriteRPCTimeoutGetDefault(code int) *StorageProxyWriteRPCTimeoutGetDefault { + return &StorageProxyWriteRPCTimeoutGetDefault{ + _statusCode: code, + } +} + +/*StorageProxyWriteRPCTimeoutGetDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyWriteRPCTimeoutGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy write Rpc timeout get default response +func (o *StorageProxyWriteRPCTimeoutGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyWriteRPCTimeoutGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyWriteRPCTimeoutGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyWriteRPCTimeoutGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_parameters.go new file mode 100644 index 00000000000..63fe3e46132 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageProxyWriteRPCTimeoutPostParams creates a new StorageProxyWriteRPCTimeoutPostParams object +// with the default values initialized. +func NewStorageProxyWriteRPCTimeoutPostParams() *StorageProxyWriteRPCTimeoutPostParams { + var () + return &StorageProxyWriteRPCTimeoutPostParams{ + + requestTimeout: cr.DefaultTimeout, + } +} + +// NewStorageProxyWriteRPCTimeoutPostParamsWithTimeout creates a new StorageProxyWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageProxyWriteRPCTimeoutPostParamsWithTimeout(timeout time.Duration) *StorageProxyWriteRPCTimeoutPostParams { + var () + return &StorageProxyWriteRPCTimeoutPostParams{ + + requestTimeout: timeout, + } +} + +// NewStorageProxyWriteRPCTimeoutPostParamsWithContext creates a new StorageProxyWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageProxyWriteRPCTimeoutPostParamsWithContext(ctx context.Context) *StorageProxyWriteRPCTimeoutPostParams { + var () + return &StorageProxyWriteRPCTimeoutPostParams{ + + Context: ctx, + } +} + +// NewStorageProxyWriteRPCTimeoutPostParamsWithHTTPClient creates a new StorageProxyWriteRPCTimeoutPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageProxyWriteRPCTimeoutPostParamsWithHTTPClient(client *http.Client) *StorageProxyWriteRPCTimeoutPostParams { + var () + return &StorageProxyWriteRPCTimeoutPostParams{ + HTTPClient: client, + } +} + +/*StorageProxyWriteRPCTimeoutPostParams contains all the parameters to send to the API endpoint +for the storage proxy write Rpc timeout post operation typically these are written to a http.Request +*/ +type StorageProxyWriteRPCTimeoutPostParams struct { + + /*Timeout + timeout in seconds + + */ + Timeout string + + requestTimeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithRequestTimeout adds the timeout to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) WithRequestTimeout(timeout time.Duration) *StorageProxyWriteRPCTimeoutPostParams { + o.SetRequestTimeout(timeout) + return o +} + +// SetRequestTimeout adds the timeout to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) SetRequestTimeout(timeout time.Duration) { + o.requestTimeout = timeout +} + +// WithContext adds the context to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) WithContext(ctx context.Context) *StorageProxyWriteRPCTimeoutPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) WithHTTPClient(client *http.Client) *StorageProxyWriteRPCTimeoutPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTimeout adds the timeout to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) WithTimeout(timeout string) *StorageProxyWriteRPCTimeoutPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage proxy write Rpc timeout post params +func (o *StorageProxyWriteRPCTimeoutPostParams) SetTimeout(timeout string) { + o.Timeout = timeout +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageProxyWriteRPCTimeoutPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.requestTimeout); err != nil { + return err + } + var res []error + + // query param timeout + qrTimeout := o.Timeout + qTimeout := qrTimeout + if qTimeout != "" { + if err := r.SetQueryParam("timeout", qTimeout); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_responses.go new file mode 100644 index 00000000000..c6a6d6dd96c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_proxy_write_rpc_timeout_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageProxyWriteRPCTimeoutPostReader is a Reader for the StorageProxyWriteRPCTimeoutPost structure. +type StorageProxyWriteRPCTimeoutPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageProxyWriteRPCTimeoutPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageProxyWriteRPCTimeoutPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageProxyWriteRPCTimeoutPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageProxyWriteRPCTimeoutPostOK creates a StorageProxyWriteRPCTimeoutPostOK with default headers values +func NewStorageProxyWriteRPCTimeoutPostOK() *StorageProxyWriteRPCTimeoutPostOK { + return &StorageProxyWriteRPCTimeoutPostOK{} +} + +/*StorageProxyWriteRPCTimeoutPostOK handles this case with default header values. + +StorageProxyWriteRPCTimeoutPostOK storage proxy write Rpc timeout post o k +*/ +type StorageProxyWriteRPCTimeoutPostOK struct { +} + +func (o *StorageProxyWriteRPCTimeoutPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageProxyWriteRPCTimeoutPostDefault creates a StorageProxyWriteRPCTimeoutPostDefault with default headers values +func NewStorageProxyWriteRPCTimeoutPostDefault(code int) *StorageProxyWriteRPCTimeoutPostDefault { + return &StorageProxyWriteRPCTimeoutPostDefault{ + _statusCode: code, + } +} + +/*StorageProxyWriteRPCTimeoutPostDefault handles this case with default header values. + +internal server error +*/ +type StorageProxyWriteRPCTimeoutPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage proxy write Rpc timeout post default response +func (o *StorageProxyWriteRPCTimeoutPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageProxyWriteRPCTimeoutPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageProxyWriteRPCTimeoutPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageProxyWriteRPCTimeoutPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_parameters.go new file mode 100644 index 00000000000..3785291e631 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceActiveRepairGetParams creates a new StorageServiceActiveRepairGetParams object +// with the default values initialized. +func NewStorageServiceActiveRepairGetParams() *StorageServiceActiveRepairGetParams { + + return &StorageServiceActiveRepairGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceActiveRepairGetParamsWithTimeout creates a new StorageServiceActiveRepairGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceActiveRepairGetParamsWithTimeout(timeout time.Duration) *StorageServiceActiveRepairGetParams { + + return &StorageServiceActiveRepairGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceActiveRepairGetParamsWithContext creates a new StorageServiceActiveRepairGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceActiveRepairGetParamsWithContext(ctx context.Context) *StorageServiceActiveRepairGetParams { + + return &StorageServiceActiveRepairGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceActiveRepairGetParamsWithHTTPClient creates a new StorageServiceActiveRepairGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceActiveRepairGetParamsWithHTTPClient(client *http.Client) *StorageServiceActiveRepairGetParams { + + return &StorageServiceActiveRepairGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceActiveRepairGetParams contains all the parameters to send to the API endpoint +for the storage service active repair get operation typically these are written to a http.Request +*/ +type StorageServiceActiveRepairGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) WithTimeout(timeout time.Duration) *StorageServiceActiveRepairGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) WithContext(ctx context.Context) *StorageServiceActiveRepairGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) WithHTTPClient(client *http.Client) *StorageServiceActiveRepairGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service active repair get params +func (o *StorageServiceActiveRepairGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceActiveRepairGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_responses.go new file mode 100644 index 00000000000..1f776b11ebc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_active_repair_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceActiveRepairGetReader is a Reader for the StorageServiceActiveRepairGet structure. +type StorageServiceActiveRepairGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceActiveRepairGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceActiveRepairGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceActiveRepairGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceActiveRepairGetOK creates a StorageServiceActiveRepairGetOK with default headers values +func NewStorageServiceActiveRepairGetOK() *StorageServiceActiveRepairGetOK { + return &StorageServiceActiveRepairGetOK{} +} + +/*StorageServiceActiveRepairGetOK handles this case with default header values. + +StorageServiceActiveRepairGetOK storage service active repair get o k +*/ +type StorageServiceActiveRepairGetOK struct { + Payload []int32 +} + +func (o *StorageServiceActiveRepairGetOK) GetPayload() []int32 { + return o.Payload +} + +func (o *StorageServiceActiveRepairGetOK) 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 +} + +// NewStorageServiceActiveRepairGetDefault creates a StorageServiceActiveRepairGetDefault with default headers values +func NewStorageServiceActiveRepairGetDefault(code int) *StorageServiceActiveRepairGetDefault { + return &StorageServiceActiveRepairGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceActiveRepairGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceActiveRepairGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service active repair get default response +func (o *StorageServiceActiveRepairGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceActiveRepairGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceActiveRepairGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceActiveRepairGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_parameters.go new file mode 100644 index 00000000000..557e3f9422d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceAutoCompactionByKeyspaceDeleteParams creates a new StorageServiceAutoCompactionByKeyspaceDeleteParams object +// with the default values initialized. +func NewStorageServiceAutoCompactionByKeyspaceDeleteParams() *StorageServiceAutoCompactionByKeyspaceDeleteParams { + var () + return &StorageServiceAutoCompactionByKeyspaceDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithTimeout creates a new StorageServiceAutoCompactionByKeyspaceDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithTimeout(timeout time.Duration) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + var () + return &StorageServiceAutoCompactionByKeyspaceDeleteParams{ + + timeout: timeout, + } +} + +// NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithContext creates a new StorageServiceAutoCompactionByKeyspaceDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithContext(ctx context.Context) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + var () + return &StorageServiceAutoCompactionByKeyspaceDeleteParams{ + + Context: ctx, + } +} + +// NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithHTTPClient creates a new StorageServiceAutoCompactionByKeyspaceDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceAutoCompactionByKeyspaceDeleteParamsWithHTTPClient(client *http.Client) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + var () + return &StorageServiceAutoCompactionByKeyspaceDeleteParams{ + HTTPClient: client, + } +} + +/*StorageServiceAutoCompactionByKeyspaceDeleteParams contains all the parameters to send to the API endpoint +for the storage service auto compaction by keyspace delete operation typically these are written to a http.Request +*/ +type StorageServiceAutoCompactionByKeyspaceDeleteParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*Keyspace + The keyspace + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WithTimeout(timeout time.Duration) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WithContext(ctx context.Context) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WithHTTPClient(client *http.Client) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WithCf(cf *string) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WithKeyspace(keyspace string) *StorageServiceAutoCompactionByKeyspaceDeleteParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service auto compaction by keyspace delete params +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceAutoCompactionByKeyspaceDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_responses.go new file mode 100644 index 00000000000..d0c4d3ade72 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceAutoCompactionByKeyspaceDeleteReader is a Reader for the StorageServiceAutoCompactionByKeyspaceDelete structure. +type StorageServiceAutoCompactionByKeyspaceDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceAutoCompactionByKeyspaceDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceAutoCompactionByKeyspaceDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceAutoCompactionByKeyspaceDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceAutoCompactionByKeyspaceDeleteOK creates a StorageServiceAutoCompactionByKeyspaceDeleteOK with default headers values +func NewStorageServiceAutoCompactionByKeyspaceDeleteOK() *StorageServiceAutoCompactionByKeyspaceDeleteOK { + return &StorageServiceAutoCompactionByKeyspaceDeleteOK{} +} + +/*StorageServiceAutoCompactionByKeyspaceDeleteOK handles this case with default header values. + +StorageServiceAutoCompactionByKeyspaceDeleteOK storage service auto compaction by keyspace delete o k +*/ +type StorageServiceAutoCompactionByKeyspaceDeleteOK struct { +} + +func (o *StorageServiceAutoCompactionByKeyspaceDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceAutoCompactionByKeyspaceDeleteDefault creates a StorageServiceAutoCompactionByKeyspaceDeleteDefault with default headers values +func NewStorageServiceAutoCompactionByKeyspaceDeleteDefault(code int) *StorageServiceAutoCompactionByKeyspaceDeleteDefault { + return &StorageServiceAutoCompactionByKeyspaceDeleteDefault{ + _statusCode: code, + } +} + +/*StorageServiceAutoCompactionByKeyspaceDeleteDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceAutoCompactionByKeyspaceDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service auto compaction by keyspace delete default response +func (o *StorageServiceAutoCompactionByKeyspaceDeleteDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceAutoCompactionByKeyspaceDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceAutoCompactionByKeyspaceDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceAutoCompactionByKeyspaceDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..13a0d5d43f2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceAutoCompactionByKeyspacePostParams creates a new StorageServiceAutoCompactionByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceAutoCompactionByKeyspacePostParams() *StorageServiceAutoCompactionByKeyspacePostParams { + var () + return &StorageServiceAutoCompactionByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceAutoCompactionByKeyspacePostParamsWithTimeout creates a new StorageServiceAutoCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceAutoCompactionByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceAutoCompactionByKeyspacePostParams { + var () + return &StorageServiceAutoCompactionByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceAutoCompactionByKeyspacePostParamsWithContext creates a new StorageServiceAutoCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceAutoCompactionByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceAutoCompactionByKeyspacePostParams { + var () + return &StorageServiceAutoCompactionByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceAutoCompactionByKeyspacePostParamsWithHTTPClient creates a new StorageServiceAutoCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceAutoCompactionByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceAutoCompactionByKeyspacePostParams { + var () + return &StorageServiceAutoCompactionByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceAutoCompactionByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service auto compaction by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceAutoCompactionByKeyspacePostParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*Keyspace + The keyspace + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceAutoCompactionByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceAutoCompactionByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceAutoCompactionByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WithCf(cf *string) *StorageServiceAutoCompactionByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceAutoCompactionByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service auto compaction by keyspace post params +func (o *StorageServiceAutoCompactionByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceAutoCompactionByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_responses.go new file mode 100644 index 00000000000..db3cbc5fc0f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_auto_compaction_by_keyspace_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceAutoCompactionByKeyspacePostReader is a Reader for the StorageServiceAutoCompactionByKeyspacePost structure. +type StorageServiceAutoCompactionByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceAutoCompactionByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceAutoCompactionByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceAutoCompactionByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceAutoCompactionByKeyspacePostOK creates a StorageServiceAutoCompactionByKeyspacePostOK with default headers values +func NewStorageServiceAutoCompactionByKeyspacePostOK() *StorageServiceAutoCompactionByKeyspacePostOK { + return &StorageServiceAutoCompactionByKeyspacePostOK{} +} + +/*StorageServiceAutoCompactionByKeyspacePostOK handles this case with default header values. + +StorageServiceAutoCompactionByKeyspacePostOK storage service auto compaction by keyspace post o k +*/ +type StorageServiceAutoCompactionByKeyspacePostOK struct { +} + +func (o *StorageServiceAutoCompactionByKeyspacePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceAutoCompactionByKeyspacePostDefault creates a StorageServiceAutoCompactionByKeyspacePostDefault with default headers values +func NewStorageServiceAutoCompactionByKeyspacePostDefault(code int) *StorageServiceAutoCompactionByKeyspacePostDefault { + return &StorageServiceAutoCompactionByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceAutoCompactionByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceAutoCompactionByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service auto compaction by keyspace post default response +func (o *StorageServiceAutoCompactionByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceAutoCompactionByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceAutoCompactionByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceAutoCompactionByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_parameters.go new file mode 100644 index 00000000000..423204e625b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceBatchSizeFailureThresholdGetParams creates a new StorageServiceBatchSizeFailureThresholdGetParams object +// with the default values initialized. +func NewStorageServiceBatchSizeFailureThresholdGetParams() *StorageServiceBatchSizeFailureThresholdGetParams { + + return &StorageServiceBatchSizeFailureThresholdGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceBatchSizeFailureThresholdGetParamsWithTimeout creates a new StorageServiceBatchSizeFailureThresholdGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceBatchSizeFailureThresholdGetParamsWithTimeout(timeout time.Duration) *StorageServiceBatchSizeFailureThresholdGetParams { + + return &StorageServiceBatchSizeFailureThresholdGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceBatchSizeFailureThresholdGetParamsWithContext creates a new StorageServiceBatchSizeFailureThresholdGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceBatchSizeFailureThresholdGetParamsWithContext(ctx context.Context) *StorageServiceBatchSizeFailureThresholdGetParams { + + return &StorageServiceBatchSizeFailureThresholdGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceBatchSizeFailureThresholdGetParamsWithHTTPClient creates a new StorageServiceBatchSizeFailureThresholdGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceBatchSizeFailureThresholdGetParamsWithHTTPClient(client *http.Client) *StorageServiceBatchSizeFailureThresholdGetParams { + + return &StorageServiceBatchSizeFailureThresholdGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceBatchSizeFailureThresholdGetParams contains all the parameters to send to the API endpoint +for the storage service batch size failure threshold get operation typically these are written to a http.Request +*/ +type StorageServiceBatchSizeFailureThresholdGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) WithTimeout(timeout time.Duration) *StorageServiceBatchSizeFailureThresholdGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) WithContext(ctx context.Context) *StorageServiceBatchSizeFailureThresholdGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) WithHTTPClient(client *http.Client) *StorageServiceBatchSizeFailureThresholdGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service batch size failure threshold get params +func (o *StorageServiceBatchSizeFailureThresholdGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceBatchSizeFailureThresholdGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_responses.go new file mode 100644 index 00000000000..5b7be3186bc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceBatchSizeFailureThresholdGetReader is a Reader for the StorageServiceBatchSizeFailureThresholdGet structure. +type StorageServiceBatchSizeFailureThresholdGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceBatchSizeFailureThresholdGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceBatchSizeFailureThresholdGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceBatchSizeFailureThresholdGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceBatchSizeFailureThresholdGetOK creates a StorageServiceBatchSizeFailureThresholdGetOK with default headers values +func NewStorageServiceBatchSizeFailureThresholdGetOK() *StorageServiceBatchSizeFailureThresholdGetOK { + return &StorageServiceBatchSizeFailureThresholdGetOK{} +} + +/*StorageServiceBatchSizeFailureThresholdGetOK handles this case with default header values. + +StorageServiceBatchSizeFailureThresholdGetOK storage service batch size failure threshold get o k +*/ +type StorageServiceBatchSizeFailureThresholdGetOK struct { + Payload int32 +} + +func (o *StorageServiceBatchSizeFailureThresholdGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceBatchSizeFailureThresholdGetOK) 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 +} + +// NewStorageServiceBatchSizeFailureThresholdGetDefault creates a StorageServiceBatchSizeFailureThresholdGetDefault with default headers values +func NewStorageServiceBatchSizeFailureThresholdGetDefault(code int) *StorageServiceBatchSizeFailureThresholdGetDefault { + return &StorageServiceBatchSizeFailureThresholdGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceBatchSizeFailureThresholdGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceBatchSizeFailureThresholdGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service batch size failure threshold get default response +func (o *StorageServiceBatchSizeFailureThresholdGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceBatchSizeFailureThresholdGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceBatchSizeFailureThresholdGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceBatchSizeFailureThresholdGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_parameters.go new file mode 100644 index 00000000000..9f9bbbcedd4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceBatchSizeFailureThresholdPostParams creates a new StorageServiceBatchSizeFailureThresholdPostParams object +// with the default values initialized. +func NewStorageServiceBatchSizeFailureThresholdPostParams() *StorageServiceBatchSizeFailureThresholdPostParams { + var () + return &StorageServiceBatchSizeFailureThresholdPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceBatchSizeFailureThresholdPostParamsWithTimeout creates a new StorageServiceBatchSizeFailureThresholdPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceBatchSizeFailureThresholdPostParamsWithTimeout(timeout time.Duration) *StorageServiceBatchSizeFailureThresholdPostParams { + var () + return &StorageServiceBatchSizeFailureThresholdPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceBatchSizeFailureThresholdPostParamsWithContext creates a new StorageServiceBatchSizeFailureThresholdPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceBatchSizeFailureThresholdPostParamsWithContext(ctx context.Context) *StorageServiceBatchSizeFailureThresholdPostParams { + var () + return &StorageServiceBatchSizeFailureThresholdPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceBatchSizeFailureThresholdPostParamsWithHTTPClient creates a new StorageServiceBatchSizeFailureThresholdPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceBatchSizeFailureThresholdPostParamsWithHTTPClient(client *http.Client) *StorageServiceBatchSizeFailureThresholdPostParams { + var () + return &StorageServiceBatchSizeFailureThresholdPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceBatchSizeFailureThresholdPostParams contains all the parameters to send to the API endpoint +for the storage service batch size failure threshold post operation typically these are written to a http.Request +*/ +type StorageServiceBatchSizeFailureThresholdPostParams struct { + + /*Threshold + batch size debug threshold + + */ + Threshold int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) WithTimeout(timeout time.Duration) *StorageServiceBatchSizeFailureThresholdPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) WithContext(ctx context.Context) *StorageServiceBatchSizeFailureThresholdPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) WithHTTPClient(client *http.Client) *StorageServiceBatchSizeFailureThresholdPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithThreshold adds the threshold to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) WithThreshold(threshold int32) *StorageServiceBatchSizeFailureThresholdPostParams { + o.SetThreshold(threshold) + return o +} + +// SetThreshold adds the threshold to the storage service batch size failure threshold post params +func (o *StorageServiceBatchSizeFailureThresholdPostParams) SetThreshold(threshold int32) { + o.Threshold = threshold +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceBatchSizeFailureThresholdPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param threshold + qrThreshold := o.Threshold + qThreshold := swag.FormatInt32(qrThreshold) + if qThreshold != "" { + if err := r.SetQueryParam("threshold", qThreshold); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_responses.go new file mode 100644 index 00000000000..2ebe0973539 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_batch_size_failure_threshold_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceBatchSizeFailureThresholdPostReader is a Reader for the StorageServiceBatchSizeFailureThresholdPost structure. +type StorageServiceBatchSizeFailureThresholdPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceBatchSizeFailureThresholdPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceBatchSizeFailureThresholdPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceBatchSizeFailureThresholdPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceBatchSizeFailureThresholdPostOK creates a StorageServiceBatchSizeFailureThresholdPostOK with default headers values +func NewStorageServiceBatchSizeFailureThresholdPostOK() *StorageServiceBatchSizeFailureThresholdPostOK { + return &StorageServiceBatchSizeFailureThresholdPostOK{} +} + +/*StorageServiceBatchSizeFailureThresholdPostOK handles this case with default header values. + +StorageServiceBatchSizeFailureThresholdPostOK storage service batch size failure threshold post o k +*/ +type StorageServiceBatchSizeFailureThresholdPostOK struct { +} + +func (o *StorageServiceBatchSizeFailureThresholdPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceBatchSizeFailureThresholdPostDefault creates a StorageServiceBatchSizeFailureThresholdPostDefault with default headers values +func NewStorageServiceBatchSizeFailureThresholdPostDefault(code int) *StorageServiceBatchSizeFailureThresholdPostDefault { + return &StorageServiceBatchSizeFailureThresholdPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceBatchSizeFailureThresholdPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceBatchSizeFailureThresholdPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service batch size failure threshold post default response +func (o *StorageServiceBatchSizeFailureThresholdPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceBatchSizeFailureThresholdPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceBatchSizeFailureThresholdPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceBatchSizeFailureThresholdPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_parameters.go new file mode 100644 index 00000000000..5a64c1d4654 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceBulkLoadAsyncByPathGetParams creates a new StorageServiceBulkLoadAsyncByPathGetParams object +// with the default values initialized. +func NewStorageServiceBulkLoadAsyncByPathGetParams() *StorageServiceBulkLoadAsyncByPathGetParams { + var () + return &StorageServiceBulkLoadAsyncByPathGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceBulkLoadAsyncByPathGetParamsWithTimeout creates a new StorageServiceBulkLoadAsyncByPathGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceBulkLoadAsyncByPathGetParamsWithTimeout(timeout time.Duration) *StorageServiceBulkLoadAsyncByPathGetParams { + var () + return &StorageServiceBulkLoadAsyncByPathGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceBulkLoadAsyncByPathGetParamsWithContext creates a new StorageServiceBulkLoadAsyncByPathGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceBulkLoadAsyncByPathGetParamsWithContext(ctx context.Context) *StorageServiceBulkLoadAsyncByPathGetParams { + var () + return &StorageServiceBulkLoadAsyncByPathGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceBulkLoadAsyncByPathGetParamsWithHTTPClient creates a new StorageServiceBulkLoadAsyncByPathGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceBulkLoadAsyncByPathGetParamsWithHTTPClient(client *http.Client) *StorageServiceBulkLoadAsyncByPathGetParams { + var () + return &StorageServiceBulkLoadAsyncByPathGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceBulkLoadAsyncByPathGetParams contains all the parameters to send to the API endpoint +for the storage service bulk load async by path get operation typically these are written to a http.Request +*/ +type StorageServiceBulkLoadAsyncByPathGetParams struct { + + /*Path + Path to directory to load from + + */ + Path string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) WithTimeout(timeout time.Duration) *StorageServiceBulkLoadAsyncByPathGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) WithContext(ctx context.Context) *StorageServiceBulkLoadAsyncByPathGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) WithHTTPClient(client *http.Client) *StorageServiceBulkLoadAsyncByPathGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPath adds the path to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) WithPath(path string) *StorageServiceBulkLoadAsyncByPathGetParams { + o.SetPath(path) + return o +} + +// SetPath adds the path to the storage service bulk load async by path get params +func (o *StorageServiceBulkLoadAsyncByPathGetParams) SetPath(path string) { + o.Path = path +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceBulkLoadAsyncByPathGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param path + if err := r.SetPathParam("path", o.Path); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_responses.go new file mode 100644 index 00000000000..4ad135e39b7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_async_by_path_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceBulkLoadAsyncByPathGetReader is a Reader for the StorageServiceBulkLoadAsyncByPathGet structure. +type StorageServiceBulkLoadAsyncByPathGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceBulkLoadAsyncByPathGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceBulkLoadAsyncByPathGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceBulkLoadAsyncByPathGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceBulkLoadAsyncByPathGetOK creates a StorageServiceBulkLoadAsyncByPathGetOK with default headers values +func NewStorageServiceBulkLoadAsyncByPathGetOK() *StorageServiceBulkLoadAsyncByPathGetOK { + return &StorageServiceBulkLoadAsyncByPathGetOK{} +} + +/*StorageServiceBulkLoadAsyncByPathGetOK handles this case with default header values. + +StorageServiceBulkLoadAsyncByPathGetOK storage service bulk load async by path get o k +*/ +type StorageServiceBulkLoadAsyncByPathGetOK struct { + Payload string +} + +func (o *StorageServiceBulkLoadAsyncByPathGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceBulkLoadAsyncByPathGetOK) 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 +} + +// NewStorageServiceBulkLoadAsyncByPathGetDefault creates a StorageServiceBulkLoadAsyncByPathGetDefault with default headers values +func NewStorageServiceBulkLoadAsyncByPathGetDefault(code int) *StorageServiceBulkLoadAsyncByPathGetDefault { + return &StorageServiceBulkLoadAsyncByPathGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceBulkLoadAsyncByPathGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceBulkLoadAsyncByPathGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service bulk load async by path get default response +func (o *StorageServiceBulkLoadAsyncByPathGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceBulkLoadAsyncByPathGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceBulkLoadAsyncByPathGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceBulkLoadAsyncByPathGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_parameters.go new file mode 100644 index 00000000000..3425ed5d134 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceBulkLoadByPathPostParams creates a new StorageServiceBulkLoadByPathPostParams object +// with the default values initialized. +func NewStorageServiceBulkLoadByPathPostParams() *StorageServiceBulkLoadByPathPostParams { + var () + return &StorageServiceBulkLoadByPathPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceBulkLoadByPathPostParamsWithTimeout creates a new StorageServiceBulkLoadByPathPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceBulkLoadByPathPostParamsWithTimeout(timeout time.Duration) *StorageServiceBulkLoadByPathPostParams { + var () + return &StorageServiceBulkLoadByPathPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceBulkLoadByPathPostParamsWithContext creates a new StorageServiceBulkLoadByPathPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceBulkLoadByPathPostParamsWithContext(ctx context.Context) *StorageServiceBulkLoadByPathPostParams { + var () + return &StorageServiceBulkLoadByPathPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceBulkLoadByPathPostParamsWithHTTPClient creates a new StorageServiceBulkLoadByPathPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceBulkLoadByPathPostParamsWithHTTPClient(client *http.Client) *StorageServiceBulkLoadByPathPostParams { + var () + return &StorageServiceBulkLoadByPathPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceBulkLoadByPathPostParams contains all the parameters to send to the API endpoint +for the storage service bulk load by path post operation typically these are written to a http.Request +*/ +type StorageServiceBulkLoadByPathPostParams struct { + + /*Path + Path to directory to load from + + */ + Path string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) WithTimeout(timeout time.Duration) *StorageServiceBulkLoadByPathPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) WithContext(ctx context.Context) *StorageServiceBulkLoadByPathPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) WithHTTPClient(client *http.Client) *StorageServiceBulkLoadByPathPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPath adds the path to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) WithPath(path string) *StorageServiceBulkLoadByPathPostParams { + o.SetPath(path) + return o +} + +// SetPath adds the path to the storage service bulk load by path post params +func (o *StorageServiceBulkLoadByPathPostParams) SetPath(path string) { + o.Path = path +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceBulkLoadByPathPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param path + if err := r.SetPathParam("path", o.Path); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_responses.go new file mode 100644 index 00000000000..9810713b451 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_bulk_load_by_path_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceBulkLoadByPathPostReader is a Reader for the StorageServiceBulkLoadByPathPost structure. +type StorageServiceBulkLoadByPathPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceBulkLoadByPathPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceBulkLoadByPathPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceBulkLoadByPathPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceBulkLoadByPathPostOK creates a StorageServiceBulkLoadByPathPostOK with default headers values +func NewStorageServiceBulkLoadByPathPostOK() *StorageServiceBulkLoadByPathPostOK { + return &StorageServiceBulkLoadByPathPostOK{} +} + +/*StorageServiceBulkLoadByPathPostOK handles this case with default header values. + +StorageServiceBulkLoadByPathPostOK storage service bulk load by path post o k +*/ +type StorageServiceBulkLoadByPathPostOK struct { +} + +func (o *StorageServiceBulkLoadByPathPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceBulkLoadByPathPostDefault creates a StorageServiceBulkLoadByPathPostDefault with default headers values +func NewStorageServiceBulkLoadByPathPostDefault(code int) *StorageServiceBulkLoadByPathPostDefault { + return &StorageServiceBulkLoadByPathPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceBulkLoadByPathPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceBulkLoadByPathPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service bulk load by path post default response +func (o *StorageServiceBulkLoadByPathPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceBulkLoadByPathPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceBulkLoadByPathPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceBulkLoadByPathPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_parameters.go new file mode 100644 index 00000000000..181f2edbab9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceClusterNameGetParams creates a new StorageServiceClusterNameGetParams object +// with the default values initialized. +func NewStorageServiceClusterNameGetParams() *StorageServiceClusterNameGetParams { + + return &StorageServiceClusterNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceClusterNameGetParamsWithTimeout creates a new StorageServiceClusterNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceClusterNameGetParamsWithTimeout(timeout time.Duration) *StorageServiceClusterNameGetParams { + + return &StorageServiceClusterNameGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceClusterNameGetParamsWithContext creates a new StorageServiceClusterNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceClusterNameGetParamsWithContext(ctx context.Context) *StorageServiceClusterNameGetParams { + + return &StorageServiceClusterNameGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceClusterNameGetParamsWithHTTPClient creates a new StorageServiceClusterNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceClusterNameGetParamsWithHTTPClient(client *http.Client) *StorageServiceClusterNameGetParams { + + return &StorageServiceClusterNameGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceClusterNameGetParams contains all the parameters to send to the API endpoint +for the storage service cluster name get operation typically these are written to a http.Request +*/ +type StorageServiceClusterNameGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) WithTimeout(timeout time.Duration) *StorageServiceClusterNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) WithContext(ctx context.Context) *StorageServiceClusterNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) WithHTTPClient(client *http.Client) *StorageServiceClusterNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service cluster name get params +func (o *StorageServiceClusterNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceClusterNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_responses.go new file mode 100644 index 00000000000..ef4d9a93e9a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_cluster_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceClusterNameGetReader is a Reader for the StorageServiceClusterNameGet structure. +type StorageServiceClusterNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceClusterNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceClusterNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceClusterNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceClusterNameGetOK creates a StorageServiceClusterNameGetOK with default headers values +func NewStorageServiceClusterNameGetOK() *StorageServiceClusterNameGetOK { + return &StorageServiceClusterNameGetOK{} +} + +/*StorageServiceClusterNameGetOK handles this case with default header values. + +StorageServiceClusterNameGetOK storage service cluster name get o k +*/ +type StorageServiceClusterNameGetOK struct { + Payload string +} + +func (o *StorageServiceClusterNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceClusterNameGetOK) 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 +} + +// NewStorageServiceClusterNameGetDefault creates a StorageServiceClusterNameGetDefault with default headers values +func NewStorageServiceClusterNameGetDefault(code int) *StorageServiceClusterNameGetDefault { + return &StorageServiceClusterNameGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceClusterNameGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceClusterNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service cluster name get default response +func (o *StorageServiceClusterNameGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceClusterNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceClusterNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceClusterNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_parameters.go new file mode 100644 index 00000000000..1a0ca1e3d05 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceCommitlogGetParams creates a new StorageServiceCommitlogGetParams object +// with the default values initialized. +func NewStorageServiceCommitlogGetParams() *StorageServiceCommitlogGetParams { + + return &StorageServiceCommitlogGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceCommitlogGetParamsWithTimeout creates a new StorageServiceCommitlogGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceCommitlogGetParamsWithTimeout(timeout time.Duration) *StorageServiceCommitlogGetParams { + + return &StorageServiceCommitlogGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceCommitlogGetParamsWithContext creates a new StorageServiceCommitlogGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceCommitlogGetParamsWithContext(ctx context.Context) *StorageServiceCommitlogGetParams { + + return &StorageServiceCommitlogGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceCommitlogGetParamsWithHTTPClient creates a new StorageServiceCommitlogGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceCommitlogGetParamsWithHTTPClient(client *http.Client) *StorageServiceCommitlogGetParams { + + return &StorageServiceCommitlogGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceCommitlogGetParams contains all the parameters to send to the API endpoint +for the storage service commitlog get operation typically these are written to a http.Request +*/ +type StorageServiceCommitlogGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) WithTimeout(timeout time.Duration) *StorageServiceCommitlogGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) WithContext(ctx context.Context) *StorageServiceCommitlogGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) WithHTTPClient(client *http.Client) *StorageServiceCommitlogGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service commitlog get params +func (o *StorageServiceCommitlogGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceCommitlogGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_responses.go new file mode 100644 index 00000000000..de42e41e96e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_commitlog_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceCommitlogGetReader is a Reader for the StorageServiceCommitlogGet structure. +type StorageServiceCommitlogGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceCommitlogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceCommitlogGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceCommitlogGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceCommitlogGetOK creates a StorageServiceCommitlogGetOK with default headers values +func NewStorageServiceCommitlogGetOK() *StorageServiceCommitlogGetOK { + return &StorageServiceCommitlogGetOK{} +} + +/*StorageServiceCommitlogGetOK handles this case with default header values. + +StorageServiceCommitlogGetOK storage service commitlog get o k +*/ +type StorageServiceCommitlogGetOK struct { + Payload string +} + +func (o *StorageServiceCommitlogGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceCommitlogGetOK) 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 +} + +// NewStorageServiceCommitlogGetDefault creates a StorageServiceCommitlogGetDefault with default headers values +func NewStorageServiceCommitlogGetDefault(code int) *StorageServiceCommitlogGetDefault { + return &StorageServiceCommitlogGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceCommitlogGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceCommitlogGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service commitlog get default response +func (o *StorageServiceCommitlogGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceCommitlogGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceCommitlogGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceCommitlogGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_parameters.go new file mode 100644 index 00000000000..6499cdd9fae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceCompactionThroughputGetParams creates a new StorageServiceCompactionThroughputGetParams object +// with the default values initialized. +func NewStorageServiceCompactionThroughputGetParams() *StorageServiceCompactionThroughputGetParams { + + return &StorageServiceCompactionThroughputGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceCompactionThroughputGetParamsWithTimeout creates a new StorageServiceCompactionThroughputGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceCompactionThroughputGetParamsWithTimeout(timeout time.Duration) *StorageServiceCompactionThroughputGetParams { + + return &StorageServiceCompactionThroughputGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceCompactionThroughputGetParamsWithContext creates a new StorageServiceCompactionThroughputGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceCompactionThroughputGetParamsWithContext(ctx context.Context) *StorageServiceCompactionThroughputGetParams { + + return &StorageServiceCompactionThroughputGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceCompactionThroughputGetParamsWithHTTPClient creates a new StorageServiceCompactionThroughputGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceCompactionThroughputGetParamsWithHTTPClient(client *http.Client) *StorageServiceCompactionThroughputGetParams { + + return &StorageServiceCompactionThroughputGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceCompactionThroughputGetParams contains all the parameters to send to the API endpoint +for the storage service compaction throughput get operation typically these are written to a http.Request +*/ +type StorageServiceCompactionThroughputGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) WithTimeout(timeout time.Duration) *StorageServiceCompactionThroughputGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) WithContext(ctx context.Context) *StorageServiceCompactionThroughputGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) WithHTTPClient(client *http.Client) *StorageServiceCompactionThroughputGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service compaction throughput get params +func (o *StorageServiceCompactionThroughputGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceCompactionThroughputGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_responses.go new file mode 100644 index 00000000000..d5b8f17c742 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceCompactionThroughputGetReader is a Reader for the StorageServiceCompactionThroughputGet structure. +type StorageServiceCompactionThroughputGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceCompactionThroughputGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceCompactionThroughputGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceCompactionThroughputGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceCompactionThroughputGetOK creates a StorageServiceCompactionThroughputGetOK with default headers values +func NewStorageServiceCompactionThroughputGetOK() *StorageServiceCompactionThroughputGetOK { + return &StorageServiceCompactionThroughputGetOK{} +} + +/*StorageServiceCompactionThroughputGetOK handles this case with default header values. + +StorageServiceCompactionThroughputGetOK storage service compaction throughput get o k +*/ +type StorageServiceCompactionThroughputGetOK struct { + Payload int32 +} + +func (o *StorageServiceCompactionThroughputGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceCompactionThroughputGetOK) 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 +} + +// NewStorageServiceCompactionThroughputGetDefault creates a StorageServiceCompactionThroughputGetDefault with default headers values +func NewStorageServiceCompactionThroughputGetDefault(code int) *StorageServiceCompactionThroughputGetDefault { + return &StorageServiceCompactionThroughputGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceCompactionThroughputGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceCompactionThroughputGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service compaction throughput get default response +func (o *StorageServiceCompactionThroughputGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceCompactionThroughputGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceCompactionThroughputGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceCompactionThroughputGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_parameters.go new file mode 100644 index 00000000000..9ac37cb0017 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceCompactionThroughputPostParams creates a new StorageServiceCompactionThroughputPostParams object +// with the default values initialized. +func NewStorageServiceCompactionThroughputPostParams() *StorageServiceCompactionThroughputPostParams { + var () + return &StorageServiceCompactionThroughputPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceCompactionThroughputPostParamsWithTimeout creates a new StorageServiceCompactionThroughputPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceCompactionThroughputPostParamsWithTimeout(timeout time.Duration) *StorageServiceCompactionThroughputPostParams { + var () + return &StorageServiceCompactionThroughputPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceCompactionThroughputPostParamsWithContext creates a new StorageServiceCompactionThroughputPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceCompactionThroughputPostParamsWithContext(ctx context.Context) *StorageServiceCompactionThroughputPostParams { + var () + return &StorageServiceCompactionThroughputPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceCompactionThroughputPostParamsWithHTTPClient creates a new StorageServiceCompactionThroughputPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceCompactionThroughputPostParamsWithHTTPClient(client *http.Client) *StorageServiceCompactionThroughputPostParams { + var () + return &StorageServiceCompactionThroughputPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceCompactionThroughputPostParams contains all the parameters to send to the API endpoint +for the storage service compaction throughput post operation typically these are written to a http.Request +*/ +type StorageServiceCompactionThroughputPostParams struct { + + /*Value + compaction throughput + + */ + Value int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) WithTimeout(timeout time.Duration) *StorageServiceCompactionThroughputPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) WithContext(ctx context.Context) *StorageServiceCompactionThroughputPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) WithHTTPClient(client *http.Client) *StorageServiceCompactionThroughputPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithValue adds the value to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) WithValue(value int32) *StorageServiceCompactionThroughputPostParams { + o.SetValue(value) + return o +} + +// SetValue adds the value to the storage service compaction throughput post params +func (o *StorageServiceCompactionThroughputPostParams) SetValue(value int32) { + o.Value = value +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceCompactionThroughputPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param value + qrValue := o.Value + qValue := swag.FormatInt32(qrValue) + if qValue != "" { + if err := r.SetQueryParam("value", qValue); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_responses.go new file mode 100644 index 00000000000..823c26bb5b8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_compaction_throughput_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceCompactionThroughputPostReader is a Reader for the StorageServiceCompactionThroughputPost structure. +type StorageServiceCompactionThroughputPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceCompactionThroughputPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceCompactionThroughputPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceCompactionThroughputPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceCompactionThroughputPostOK creates a StorageServiceCompactionThroughputPostOK with default headers values +func NewStorageServiceCompactionThroughputPostOK() *StorageServiceCompactionThroughputPostOK { + return &StorageServiceCompactionThroughputPostOK{} +} + +/*StorageServiceCompactionThroughputPostOK handles this case with default header values. + +StorageServiceCompactionThroughputPostOK storage service compaction throughput post o k +*/ +type StorageServiceCompactionThroughputPostOK struct { +} + +func (o *StorageServiceCompactionThroughputPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceCompactionThroughputPostDefault creates a StorageServiceCompactionThroughputPostDefault with default headers values +func NewStorageServiceCompactionThroughputPostDefault(code int) *StorageServiceCompactionThroughputPostDefault { + return &StorageServiceCompactionThroughputPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceCompactionThroughputPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceCompactionThroughputPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service compaction throughput post default response +func (o *StorageServiceCompactionThroughputPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceCompactionThroughputPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceCompactionThroughputPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceCompactionThroughputPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_parameters.go new file mode 100644 index 00000000000..27b6a3dd873 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDataFileLocationsGetParams creates a new StorageServiceDataFileLocationsGetParams object +// with the default values initialized. +func NewStorageServiceDataFileLocationsGetParams() *StorageServiceDataFileLocationsGetParams { + + return &StorageServiceDataFileLocationsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDataFileLocationsGetParamsWithTimeout creates a new StorageServiceDataFileLocationsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDataFileLocationsGetParamsWithTimeout(timeout time.Duration) *StorageServiceDataFileLocationsGetParams { + + return &StorageServiceDataFileLocationsGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDataFileLocationsGetParamsWithContext creates a new StorageServiceDataFileLocationsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDataFileLocationsGetParamsWithContext(ctx context.Context) *StorageServiceDataFileLocationsGetParams { + + return &StorageServiceDataFileLocationsGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceDataFileLocationsGetParamsWithHTTPClient creates a new StorageServiceDataFileLocationsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDataFileLocationsGetParamsWithHTTPClient(client *http.Client) *StorageServiceDataFileLocationsGetParams { + + return &StorageServiceDataFileLocationsGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceDataFileLocationsGetParams contains all the parameters to send to the API endpoint +for the storage service data file locations get operation typically these are written to a http.Request +*/ +type StorageServiceDataFileLocationsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) WithTimeout(timeout time.Duration) *StorageServiceDataFileLocationsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) WithContext(ctx context.Context) *StorageServiceDataFileLocationsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) WithHTTPClient(client *http.Client) *StorageServiceDataFileLocationsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service data file locations get params +func (o *StorageServiceDataFileLocationsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDataFileLocationsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_responses.go new file mode 100644 index 00000000000..219d560efc9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_data_file_locations_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDataFileLocationsGetReader is a Reader for the StorageServiceDataFileLocationsGet structure. +type StorageServiceDataFileLocationsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDataFileLocationsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDataFileLocationsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDataFileLocationsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDataFileLocationsGetOK creates a StorageServiceDataFileLocationsGetOK with default headers values +func NewStorageServiceDataFileLocationsGetOK() *StorageServiceDataFileLocationsGetOK { + return &StorageServiceDataFileLocationsGetOK{} +} + +/*StorageServiceDataFileLocationsGetOK handles this case with default header values. + +StorageServiceDataFileLocationsGetOK storage service data file locations get o k +*/ +type StorageServiceDataFileLocationsGetOK struct { + Payload []string +} + +func (o *StorageServiceDataFileLocationsGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceDataFileLocationsGetOK) 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 +} + +// NewStorageServiceDataFileLocationsGetDefault creates a StorageServiceDataFileLocationsGetDefault with default headers values +func NewStorageServiceDataFileLocationsGetDefault(code int) *StorageServiceDataFileLocationsGetDefault { + return &StorageServiceDataFileLocationsGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceDataFileLocationsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDataFileLocationsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service data file locations get default response +func (o *StorageServiceDataFileLocationsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDataFileLocationsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDataFileLocationsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDataFileLocationsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_parameters.go new file mode 100644 index 00000000000..44276a961d6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDecommissionPostParams creates a new StorageServiceDecommissionPostParams object +// with the default values initialized. +func NewStorageServiceDecommissionPostParams() *StorageServiceDecommissionPostParams { + + return &StorageServiceDecommissionPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDecommissionPostParamsWithTimeout creates a new StorageServiceDecommissionPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDecommissionPostParamsWithTimeout(timeout time.Duration) *StorageServiceDecommissionPostParams { + + return &StorageServiceDecommissionPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDecommissionPostParamsWithContext creates a new StorageServiceDecommissionPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDecommissionPostParamsWithContext(ctx context.Context) *StorageServiceDecommissionPostParams { + + return &StorageServiceDecommissionPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceDecommissionPostParamsWithHTTPClient creates a new StorageServiceDecommissionPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDecommissionPostParamsWithHTTPClient(client *http.Client) *StorageServiceDecommissionPostParams { + + return &StorageServiceDecommissionPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceDecommissionPostParams contains all the parameters to send to the API endpoint +for the storage service decommission post operation typically these are written to a http.Request +*/ +type StorageServiceDecommissionPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) WithTimeout(timeout time.Duration) *StorageServiceDecommissionPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) WithContext(ctx context.Context) *StorageServiceDecommissionPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) WithHTTPClient(client *http.Client) *StorageServiceDecommissionPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service decommission post params +func (o *StorageServiceDecommissionPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDecommissionPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_responses.go new file mode 100644 index 00000000000..fd67574c6d7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_decommission_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDecommissionPostReader is a Reader for the StorageServiceDecommissionPost structure. +type StorageServiceDecommissionPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDecommissionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDecommissionPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDecommissionPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDecommissionPostOK creates a StorageServiceDecommissionPostOK with default headers values +func NewStorageServiceDecommissionPostOK() *StorageServiceDecommissionPostOK { + return &StorageServiceDecommissionPostOK{} +} + +/*StorageServiceDecommissionPostOK handles this case with default header values. + +StorageServiceDecommissionPostOK storage service decommission post o k +*/ +type StorageServiceDecommissionPostOK struct { +} + +func (o *StorageServiceDecommissionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceDecommissionPostDefault creates a StorageServiceDecommissionPostDefault with default headers values +func NewStorageServiceDecommissionPostDefault(code int) *StorageServiceDecommissionPostDefault { + return &StorageServiceDecommissionPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceDecommissionPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDecommissionPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service decommission post default response +func (o *StorageServiceDecommissionPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDecommissionPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDecommissionPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDecommissionPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_parameters.go new file mode 100644 index 00000000000..cd6b4caf08d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDeliverHintsPostParams creates a new StorageServiceDeliverHintsPostParams object +// with the default values initialized. +func NewStorageServiceDeliverHintsPostParams() *StorageServiceDeliverHintsPostParams { + var () + return &StorageServiceDeliverHintsPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDeliverHintsPostParamsWithTimeout creates a new StorageServiceDeliverHintsPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDeliverHintsPostParamsWithTimeout(timeout time.Duration) *StorageServiceDeliverHintsPostParams { + var () + return &StorageServiceDeliverHintsPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDeliverHintsPostParamsWithContext creates a new StorageServiceDeliverHintsPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDeliverHintsPostParamsWithContext(ctx context.Context) *StorageServiceDeliverHintsPostParams { + var () + return &StorageServiceDeliverHintsPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceDeliverHintsPostParamsWithHTTPClient creates a new StorageServiceDeliverHintsPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDeliverHintsPostParamsWithHTTPClient(client *http.Client) *StorageServiceDeliverHintsPostParams { + var () + return &StorageServiceDeliverHintsPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceDeliverHintsPostParams contains all the parameters to send to the API endpoint +for the storage service deliver hints post operation typically these are written to a http.Request +*/ +type StorageServiceDeliverHintsPostParams struct { + + /*Host + The host name + + */ + Host string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) WithTimeout(timeout time.Duration) *StorageServiceDeliverHintsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) WithContext(ctx context.Context) *StorageServiceDeliverHintsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) WithHTTPClient(client *http.Client) *StorageServiceDeliverHintsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHost adds the host to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) WithHost(host string) *StorageServiceDeliverHintsPostParams { + o.SetHost(host) + return o +} + +// SetHost adds the host to the storage service deliver hints post params +func (o *StorageServiceDeliverHintsPostParams) SetHost(host string) { + o.Host = host +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDeliverHintsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param host + qrHost := o.Host + qHost := qrHost + if qHost != "" { + if err := r.SetQueryParam("host", qHost); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_responses.go new file mode 100644 index 00000000000..13aecad6a5c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_deliver_hints_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDeliverHintsPostReader is a Reader for the StorageServiceDeliverHintsPost structure. +type StorageServiceDeliverHintsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDeliverHintsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDeliverHintsPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDeliverHintsPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDeliverHintsPostOK creates a StorageServiceDeliverHintsPostOK with default headers values +func NewStorageServiceDeliverHintsPostOK() *StorageServiceDeliverHintsPostOK { + return &StorageServiceDeliverHintsPostOK{} +} + +/*StorageServiceDeliverHintsPostOK handles this case with default header values. + +StorageServiceDeliverHintsPostOK storage service deliver hints post o k +*/ +type StorageServiceDeliverHintsPostOK struct { +} + +func (o *StorageServiceDeliverHintsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceDeliverHintsPostDefault creates a StorageServiceDeliverHintsPostDefault with default headers values +func NewStorageServiceDeliverHintsPostDefault(code int) *StorageServiceDeliverHintsPostDefault { + return &StorageServiceDeliverHintsPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceDeliverHintsPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDeliverHintsPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service deliver hints post default response +func (o *StorageServiceDeliverHintsPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDeliverHintsPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDeliverHintsPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDeliverHintsPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..52a87954575 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDescribeRingByKeyspaceGetParams creates a new StorageServiceDescribeRingByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceDescribeRingByKeyspaceGetParams() *StorageServiceDescribeRingByKeyspaceGetParams { + var () + return &StorageServiceDescribeRingByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDescribeRingByKeyspaceGetParamsWithTimeout creates a new StorageServiceDescribeRingByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDescribeRingByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceDescribeRingByKeyspaceGetParams { + var () + return &StorageServiceDescribeRingByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDescribeRingByKeyspaceGetParamsWithContext creates a new StorageServiceDescribeRingByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDescribeRingByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceDescribeRingByKeyspaceGetParams { + var () + return &StorageServiceDescribeRingByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceDescribeRingByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceDescribeRingByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDescribeRingByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceDescribeRingByKeyspaceGetParams { + var () + return &StorageServiceDescribeRingByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceDescribeRingByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service describe ring by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceDescribeRingByKeyspaceGetParams struct { + + /*Keyspace + The keyspace to fetch information about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceDescribeRingByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceDescribeRingByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceDescribeRingByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKeyspace adds the keyspace to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceDescribeRingByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service describe ring by keyspace get params +func (o *StorageServiceDescribeRingByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDescribeRingByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_responses.go new file mode 100644 index 00000000000..890b42ff29b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDescribeRingByKeyspaceGetReader is a Reader for the StorageServiceDescribeRingByKeyspaceGet structure. +type StorageServiceDescribeRingByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDescribeRingByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDescribeRingByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDescribeRingByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDescribeRingByKeyspaceGetOK creates a StorageServiceDescribeRingByKeyspaceGetOK with default headers values +func NewStorageServiceDescribeRingByKeyspaceGetOK() *StorageServiceDescribeRingByKeyspaceGetOK { + return &StorageServiceDescribeRingByKeyspaceGetOK{} +} + +/*StorageServiceDescribeRingByKeyspaceGetOK handles this case with default header values. + +StorageServiceDescribeRingByKeyspaceGetOK storage service describe ring by keyspace get o k +*/ +type StorageServiceDescribeRingByKeyspaceGetOK struct { + Payload []*models.TokenRange +} + +func (o *StorageServiceDescribeRingByKeyspaceGetOK) GetPayload() []*models.TokenRange { + return o.Payload +} + +func (o *StorageServiceDescribeRingByKeyspaceGetOK) 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 +} + +// NewStorageServiceDescribeRingByKeyspaceGetDefault creates a StorageServiceDescribeRingByKeyspaceGetDefault with default headers values +func NewStorageServiceDescribeRingByKeyspaceGetDefault(code int) *StorageServiceDescribeRingByKeyspaceGetDefault { + return &StorageServiceDescribeRingByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceDescribeRingByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDescribeRingByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service describe ring by keyspace get default response +func (o *StorageServiceDescribeRingByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDescribeRingByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDescribeRingByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDescribeRingByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_parameters.go new file mode 100644 index 00000000000..aec51f6cf29 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDescribeRingGetParams creates a new StorageServiceDescribeRingGetParams object +// with the default values initialized. +func NewStorageServiceDescribeRingGetParams() *StorageServiceDescribeRingGetParams { + + return &StorageServiceDescribeRingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDescribeRingGetParamsWithTimeout creates a new StorageServiceDescribeRingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDescribeRingGetParamsWithTimeout(timeout time.Duration) *StorageServiceDescribeRingGetParams { + + return &StorageServiceDescribeRingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDescribeRingGetParamsWithContext creates a new StorageServiceDescribeRingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDescribeRingGetParamsWithContext(ctx context.Context) *StorageServiceDescribeRingGetParams { + + return &StorageServiceDescribeRingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceDescribeRingGetParamsWithHTTPClient creates a new StorageServiceDescribeRingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDescribeRingGetParamsWithHTTPClient(client *http.Client) *StorageServiceDescribeRingGetParams { + + return &StorageServiceDescribeRingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceDescribeRingGetParams contains all the parameters to send to the API endpoint +for the storage service describe ring get operation typically these are written to a http.Request +*/ +type StorageServiceDescribeRingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) WithTimeout(timeout time.Duration) *StorageServiceDescribeRingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) WithContext(ctx context.Context) *StorageServiceDescribeRingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) WithHTTPClient(client *http.Client) *StorageServiceDescribeRingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service describe ring get params +func (o *StorageServiceDescribeRingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDescribeRingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_responses.go new file mode 100644 index 00000000000..9fe0a22015e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_describe_ring_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDescribeRingGetReader is a Reader for the StorageServiceDescribeRingGet structure. +type StorageServiceDescribeRingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDescribeRingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDescribeRingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDescribeRingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDescribeRingGetOK creates a StorageServiceDescribeRingGetOK with default headers values +func NewStorageServiceDescribeRingGetOK() *StorageServiceDescribeRingGetOK { + return &StorageServiceDescribeRingGetOK{} +} + +/*StorageServiceDescribeRingGetOK handles this case with default header values. + +StorageServiceDescribeRingGetOK storage service describe ring get o k +*/ +type StorageServiceDescribeRingGetOK struct { + Payload []*models.TokenRange +} + +func (o *StorageServiceDescribeRingGetOK) GetPayload() []*models.TokenRange { + return o.Payload +} + +func (o *StorageServiceDescribeRingGetOK) 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 +} + +// NewStorageServiceDescribeRingGetDefault creates a StorageServiceDescribeRingGetDefault with default headers values +func NewStorageServiceDescribeRingGetDefault(code int) *StorageServiceDescribeRingGetDefault { + return &StorageServiceDescribeRingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceDescribeRingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDescribeRingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service describe ring get default response +func (o *StorageServiceDescribeRingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDescribeRingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDescribeRingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDescribeRingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_parameters.go new file mode 100644 index 00000000000..7cacd459cfe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDrainGetParams creates a new StorageServiceDrainGetParams object +// with the default values initialized. +func NewStorageServiceDrainGetParams() *StorageServiceDrainGetParams { + + return &StorageServiceDrainGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDrainGetParamsWithTimeout creates a new StorageServiceDrainGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDrainGetParamsWithTimeout(timeout time.Duration) *StorageServiceDrainGetParams { + + return &StorageServiceDrainGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDrainGetParamsWithContext creates a new StorageServiceDrainGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDrainGetParamsWithContext(ctx context.Context) *StorageServiceDrainGetParams { + + return &StorageServiceDrainGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceDrainGetParamsWithHTTPClient creates a new StorageServiceDrainGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDrainGetParamsWithHTTPClient(client *http.Client) *StorageServiceDrainGetParams { + + return &StorageServiceDrainGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceDrainGetParams contains all the parameters to send to the API endpoint +for the storage service drain get operation typically these are written to a http.Request +*/ +type StorageServiceDrainGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service drain get params +func (o *StorageServiceDrainGetParams) WithTimeout(timeout time.Duration) *StorageServiceDrainGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service drain get params +func (o *StorageServiceDrainGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service drain get params +func (o *StorageServiceDrainGetParams) WithContext(ctx context.Context) *StorageServiceDrainGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service drain get params +func (o *StorageServiceDrainGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service drain get params +func (o *StorageServiceDrainGetParams) WithHTTPClient(client *http.Client) *StorageServiceDrainGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service drain get params +func (o *StorageServiceDrainGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDrainGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_responses.go new file mode 100644 index 00000000000..6779ceee733 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDrainGetReader is a Reader for the StorageServiceDrainGet structure. +type StorageServiceDrainGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDrainGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDrainGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDrainGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDrainGetOK creates a StorageServiceDrainGetOK with default headers values +func NewStorageServiceDrainGetOK() *StorageServiceDrainGetOK { + return &StorageServiceDrainGetOK{} +} + +/*StorageServiceDrainGetOK handles this case with default header values. + +StorageServiceDrainGetOK storage service drain get o k +*/ +type StorageServiceDrainGetOK struct { + Payload string +} + +func (o *StorageServiceDrainGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceDrainGetOK) 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 +} + +// NewStorageServiceDrainGetDefault creates a StorageServiceDrainGetDefault with default headers values +func NewStorageServiceDrainGetDefault(code int) *StorageServiceDrainGetDefault { + return &StorageServiceDrainGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceDrainGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDrainGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service drain get default response +func (o *StorageServiceDrainGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDrainGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDrainGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDrainGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_parameters.go new file mode 100644 index 00000000000..6273ba65f7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceDrainPostParams creates a new StorageServiceDrainPostParams object +// with the default values initialized. +func NewStorageServiceDrainPostParams() *StorageServiceDrainPostParams { + + return &StorageServiceDrainPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceDrainPostParamsWithTimeout creates a new StorageServiceDrainPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceDrainPostParamsWithTimeout(timeout time.Duration) *StorageServiceDrainPostParams { + + return &StorageServiceDrainPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceDrainPostParamsWithContext creates a new StorageServiceDrainPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceDrainPostParamsWithContext(ctx context.Context) *StorageServiceDrainPostParams { + + return &StorageServiceDrainPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceDrainPostParamsWithHTTPClient creates a new StorageServiceDrainPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceDrainPostParamsWithHTTPClient(client *http.Client) *StorageServiceDrainPostParams { + + return &StorageServiceDrainPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceDrainPostParams contains all the parameters to send to the API endpoint +for the storage service drain post operation typically these are written to a http.Request +*/ +type StorageServiceDrainPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service drain post params +func (o *StorageServiceDrainPostParams) WithTimeout(timeout time.Duration) *StorageServiceDrainPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service drain post params +func (o *StorageServiceDrainPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service drain post params +func (o *StorageServiceDrainPostParams) WithContext(ctx context.Context) *StorageServiceDrainPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service drain post params +func (o *StorageServiceDrainPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service drain post params +func (o *StorageServiceDrainPostParams) WithHTTPClient(client *http.Client) *StorageServiceDrainPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service drain post params +func (o *StorageServiceDrainPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceDrainPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_responses.go new file mode 100644 index 00000000000..d102322fea9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_drain_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceDrainPostReader is a Reader for the StorageServiceDrainPost structure. +type StorageServiceDrainPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceDrainPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceDrainPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceDrainPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceDrainPostOK creates a StorageServiceDrainPostOK with default headers values +func NewStorageServiceDrainPostOK() *StorageServiceDrainPostOK { + return &StorageServiceDrainPostOK{} +} + +/*StorageServiceDrainPostOK handles this case with default header values. + +StorageServiceDrainPostOK storage service drain post o k +*/ +type StorageServiceDrainPostOK struct { +} + +func (o *StorageServiceDrainPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceDrainPostDefault creates a StorageServiceDrainPostDefault with default headers values +func NewStorageServiceDrainPostDefault(code int) *StorageServiceDrainPostDefault { + return &StorageServiceDrainPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceDrainPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceDrainPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service drain post default response +func (o *StorageServiceDrainPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceDrainPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceDrainPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceDrainPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_parameters.go new file mode 100644 index 00000000000..3db76c07c00 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceForceRemoveCompletionPostParams creates a new StorageServiceForceRemoveCompletionPostParams object +// with the default values initialized. +func NewStorageServiceForceRemoveCompletionPostParams() *StorageServiceForceRemoveCompletionPostParams { + + return &StorageServiceForceRemoveCompletionPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceForceRemoveCompletionPostParamsWithTimeout creates a new StorageServiceForceRemoveCompletionPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceForceRemoveCompletionPostParamsWithTimeout(timeout time.Duration) *StorageServiceForceRemoveCompletionPostParams { + + return &StorageServiceForceRemoveCompletionPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceForceRemoveCompletionPostParamsWithContext creates a new StorageServiceForceRemoveCompletionPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceForceRemoveCompletionPostParamsWithContext(ctx context.Context) *StorageServiceForceRemoveCompletionPostParams { + + return &StorageServiceForceRemoveCompletionPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceForceRemoveCompletionPostParamsWithHTTPClient creates a new StorageServiceForceRemoveCompletionPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceForceRemoveCompletionPostParamsWithHTTPClient(client *http.Client) *StorageServiceForceRemoveCompletionPostParams { + + return &StorageServiceForceRemoveCompletionPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceForceRemoveCompletionPostParams contains all the parameters to send to the API endpoint +for the storage service force remove completion post operation typically these are written to a http.Request +*/ +type StorageServiceForceRemoveCompletionPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) WithTimeout(timeout time.Duration) *StorageServiceForceRemoveCompletionPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) WithContext(ctx context.Context) *StorageServiceForceRemoveCompletionPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) WithHTTPClient(client *http.Client) *StorageServiceForceRemoveCompletionPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service force remove completion post params +func (o *StorageServiceForceRemoveCompletionPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceForceRemoveCompletionPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_responses.go new file mode 100644 index 00000000000..1c8a925d930 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_remove_completion_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceForceRemoveCompletionPostReader is a Reader for the StorageServiceForceRemoveCompletionPost structure. +type StorageServiceForceRemoveCompletionPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceForceRemoveCompletionPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceForceRemoveCompletionPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceForceRemoveCompletionPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceForceRemoveCompletionPostOK creates a StorageServiceForceRemoveCompletionPostOK with default headers values +func NewStorageServiceForceRemoveCompletionPostOK() *StorageServiceForceRemoveCompletionPostOK { + return &StorageServiceForceRemoveCompletionPostOK{} +} + +/*StorageServiceForceRemoveCompletionPostOK handles this case with default header values. + +StorageServiceForceRemoveCompletionPostOK storage service force remove completion post o k +*/ +type StorageServiceForceRemoveCompletionPostOK struct { +} + +func (o *StorageServiceForceRemoveCompletionPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceForceRemoveCompletionPostDefault creates a StorageServiceForceRemoveCompletionPostDefault with default headers values +func NewStorageServiceForceRemoveCompletionPostDefault(code int) *StorageServiceForceRemoveCompletionPostDefault { + return &StorageServiceForceRemoveCompletionPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceForceRemoveCompletionPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceForceRemoveCompletionPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service force remove completion post default response +func (o *StorageServiceForceRemoveCompletionPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceForceRemoveCompletionPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceForceRemoveCompletionPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceForceRemoveCompletionPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_parameters.go new file mode 100644 index 00000000000..5ed6de0e8d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceForceTerminatePostParams creates a new StorageServiceForceTerminatePostParams object +// with the default values initialized. +func NewStorageServiceForceTerminatePostParams() *StorageServiceForceTerminatePostParams { + + return &StorageServiceForceTerminatePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceForceTerminatePostParamsWithTimeout creates a new StorageServiceForceTerminatePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceForceTerminatePostParamsWithTimeout(timeout time.Duration) *StorageServiceForceTerminatePostParams { + + return &StorageServiceForceTerminatePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceForceTerminatePostParamsWithContext creates a new StorageServiceForceTerminatePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceForceTerminatePostParamsWithContext(ctx context.Context) *StorageServiceForceTerminatePostParams { + + return &StorageServiceForceTerminatePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceForceTerminatePostParamsWithHTTPClient creates a new StorageServiceForceTerminatePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceForceTerminatePostParamsWithHTTPClient(client *http.Client) *StorageServiceForceTerminatePostParams { + + return &StorageServiceForceTerminatePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceForceTerminatePostParams contains all the parameters to send to the API endpoint +for the storage service force terminate post operation typically these are written to a http.Request +*/ +type StorageServiceForceTerminatePostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) WithTimeout(timeout time.Duration) *StorageServiceForceTerminatePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) WithContext(ctx context.Context) *StorageServiceForceTerminatePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) WithHTTPClient(client *http.Client) *StorageServiceForceTerminatePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service force terminate post params +func (o *StorageServiceForceTerminatePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceForceTerminatePostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_responses.go new file mode 100644 index 00000000000..50037710e4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceForceTerminatePostReader is a Reader for the StorageServiceForceTerminatePost structure. +type StorageServiceForceTerminatePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceForceTerminatePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceForceTerminatePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceForceTerminatePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceForceTerminatePostOK creates a StorageServiceForceTerminatePostOK with default headers values +func NewStorageServiceForceTerminatePostOK() *StorageServiceForceTerminatePostOK { + return &StorageServiceForceTerminatePostOK{} +} + +/*StorageServiceForceTerminatePostOK handles this case with default header values. + +StorageServiceForceTerminatePostOK storage service force terminate post o k +*/ +type StorageServiceForceTerminatePostOK struct { +} + +func (o *StorageServiceForceTerminatePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceForceTerminatePostDefault creates a StorageServiceForceTerminatePostDefault with default headers values +func NewStorageServiceForceTerminatePostDefault(code int) *StorageServiceForceTerminatePostDefault { + return &StorageServiceForceTerminatePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceForceTerminatePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceForceTerminatePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service force terminate post default response +func (o *StorageServiceForceTerminatePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceForceTerminatePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceForceTerminatePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceForceTerminatePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_parameters.go new file mode 100644 index 00000000000..91ac79eafba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceForceTerminateRepairPostParams creates a new StorageServiceForceTerminateRepairPostParams object +// with the default values initialized. +func NewStorageServiceForceTerminateRepairPostParams() *StorageServiceForceTerminateRepairPostParams { + + return &StorageServiceForceTerminateRepairPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceForceTerminateRepairPostParamsWithTimeout creates a new StorageServiceForceTerminateRepairPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceForceTerminateRepairPostParamsWithTimeout(timeout time.Duration) *StorageServiceForceTerminateRepairPostParams { + + return &StorageServiceForceTerminateRepairPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceForceTerminateRepairPostParamsWithContext creates a new StorageServiceForceTerminateRepairPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceForceTerminateRepairPostParamsWithContext(ctx context.Context) *StorageServiceForceTerminateRepairPostParams { + + return &StorageServiceForceTerminateRepairPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceForceTerminateRepairPostParamsWithHTTPClient creates a new StorageServiceForceTerminateRepairPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceForceTerminateRepairPostParamsWithHTTPClient(client *http.Client) *StorageServiceForceTerminateRepairPostParams { + + return &StorageServiceForceTerminateRepairPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceForceTerminateRepairPostParams contains all the parameters to send to the API endpoint +for the storage service force terminate repair post operation typically these are written to a http.Request +*/ +type StorageServiceForceTerminateRepairPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) WithTimeout(timeout time.Duration) *StorageServiceForceTerminateRepairPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) WithContext(ctx context.Context) *StorageServiceForceTerminateRepairPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) WithHTTPClient(client *http.Client) *StorageServiceForceTerminateRepairPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service force terminate repair post params +func (o *StorageServiceForceTerminateRepairPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceForceTerminateRepairPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_responses.go new file mode 100644 index 00000000000..398deaa6b26 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_force_terminate_repair_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceForceTerminateRepairPostReader is a Reader for the StorageServiceForceTerminateRepairPost structure. +type StorageServiceForceTerminateRepairPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceForceTerminateRepairPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceForceTerminateRepairPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceForceTerminateRepairPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceForceTerminateRepairPostOK creates a StorageServiceForceTerminateRepairPostOK with default headers values +func NewStorageServiceForceTerminateRepairPostOK() *StorageServiceForceTerminateRepairPostOK { + return &StorageServiceForceTerminateRepairPostOK{} +} + +/*StorageServiceForceTerminateRepairPostOK handles this case with default header values. + +StorageServiceForceTerminateRepairPostOK storage service force terminate repair post o k +*/ +type StorageServiceForceTerminateRepairPostOK struct { +} + +func (o *StorageServiceForceTerminateRepairPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceForceTerminateRepairPostDefault creates a StorageServiceForceTerminateRepairPostDefault with default headers values +func NewStorageServiceForceTerminateRepairPostDefault(code int) *StorageServiceForceTerminateRepairPostDefault { + return &StorageServiceForceTerminateRepairPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceForceTerminateRepairPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceForceTerminateRepairPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service force terminate repair post default response +func (o *StorageServiceForceTerminateRepairPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceForceTerminateRepairPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceForceTerminateRepairPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceForceTerminateRepairPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_parameters.go new file mode 100644 index 00000000000..0409c0878a5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceGenerationNumberGetParams creates a new StorageServiceGenerationNumberGetParams object +// with the default values initialized. +func NewStorageServiceGenerationNumberGetParams() *StorageServiceGenerationNumberGetParams { + + return &StorageServiceGenerationNumberGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceGenerationNumberGetParamsWithTimeout creates a new StorageServiceGenerationNumberGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceGenerationNumberGetParamsWithTimeout(timeout time.Duration) *StorageServiceGenerationNumberGetParams { + + return &StorageServiceGenerationNumberGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceGenerationNumberGetParamsWithContext creates a new StorageServiceGenerationNumberGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceGenerationNumberGetParamsWithContext(ctx context.Context) *StorageServiceGenerationNumberGetParams { + + return &StorageServiceGenerationNumberGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceGenerationNumberGetParamsWithHTTPClient creates a new StorageServiceGenerationNumberGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceGenerationNumberGetParamsWithHTTPClient(client *http.Client) *StorageServiceGenerationNumberGetParams { + + return &StorageServiceGenerationNumberGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceGenerationNumberGetParams contains all the parameters to send to the API endpoint +for the storage service generation number get operation typically these are written to a http.Request +*/ +type StorageServiceGenerationNumberGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) WithTimeout(timeout time.Duration) *StorageServiceGenerationNumberGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) WithContext(ctx context.Context) *StorageServiceGenerationNumberGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) WithHTTPClient(client *http.Client) *StorageServiceGenerationNumberGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service generation number get params +func (o *StorageServiceGenerationNumberGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceGenerationNumberGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_responses.go new file mode 100644 index 00000000000..09cb605afc3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_generation_number_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceGenerationNumberGetReader is a Reader for the StorageServiceGenerationNumberGet structure. +type StorageServiceGenerationNumberGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceGenerationNumberGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceGenerationNumberGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceGenerationNumberGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceGenerationNumberGetOK creates a StorageServiceGenerationNumberGetOK with default headers values +func NewStorageServiceGenerationNumberGetOK() *StorageServiceGenerationNumberGetOK { + return &StorageServiceGenerationNumberGetOK{} +} + +/*StorageServiceGenerationNumberGetOK handles this case with default header values. + +StorageServiceGenerationNumberGetOK storage service generation number get o k +*/ +type StorageServiceGenerationNumberGetOK struct { + Payload int32 +} + +func (o *StorageServiceGenerationNumberGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceGenerationNumberGetOK) 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 +} + +// NewStorageServiceGenerationNumberGetDefault creates a StorageServiceGenerationNumberGetDefault with default headers values +func NewStorageServiceGenerationNumberGetDefault(code int) *StorageServiceGenerationNumberGetDefault { + return &StorageServiceGenerationNumberGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceGenerationNumberGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceGenerationNumberGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service generation number get default response +func (o *StorageServiceGenerationNumberGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceGenerationNumberGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceGenerationNumberGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceGenerationNumberGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_parameters.go new file mode 100644 index 00000000000..d4e643fcda1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceGossipingDeleteParams creates a new StorageServiceGossipingDeleteParams object +// with the default values initialized. +func NewStorageServiceGossipingDeleteParams() *StorageServiceGossipingDeleteParams { + + return &StorageServiceGossipingDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceGossipingDeleteParamsWithTimeout creates a new StorageServiceGossipingDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceGossipingDeleteParamsWithTimeout(timeout time.Duration) *StorageServiceGossipingDeleteParams { + + return &StorageServiceGossipingDeleteParams{ + + timeout: timeout, + } +} + +// NewStorageServiceGossipingDeleteParamsWithContext creates a new StorageServiceGossipingDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceGossipingDeleteParamsWithContext(ctx context.Context) *StorageServiceGossipingDeleteParams { + + return &StorageServiceGossipingDeleteParams{ + + Context: ctx, + } +} + +// NewStorageServiceGossipingDeleteParamsWithHTTPClient creates a new StorageServiceGossipingDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceGossipingDeleteParamsWithHTTPClient(client *http.Client) *StorageServiceGossipingDeleteParams { + + return &StorageServiceGossipingDeleteParams{ + HTTPClient: client, + } +} + +/*StorageServiceGossipingDeleteParams contains all the parameters to send to the API endpoint +for the storage service gossiping delete operation typically these are written to a http.Request +*/ +type StorageServiceGossipingDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) WithTimeout(timeout time.Duration) *StorageServiceGossipingDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) WithContext(ctx context.Context) *StorageServiceGossipingDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) WithHTTPClient(client *http.Client) *StorageServiceGossipingDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service gossiping delete params +func (o *StorageServiceGossipingDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceGossipingDeleteParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_responses.go new file mode 100644 index 00000000000..970d9a03b6f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceGossipingDeleteReader is a Reader for the StorageServiceGossipingDelete structure. +type StorageServiceGossipingDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceGossipingDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceGossipingDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceGossipingDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceGossipingDeleteOK creates a StorageServiceGossipingDeleteOK with default headers values +func NewStorageServiceGossipingDeleteOK() *StorageServiceGossipingDeleteOK { + return &StorageServiceGossipingDeleteOK{} +} + +/*StorageServiceGossipingDeleteOK handles this case with default header values. + +StorageServiceGossipingDeleteOK storage service gossiping delete o k +*/ +type StorageServiceGossipingDeleteOK struct { +} + +func (o *StorageServiceGossipingDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceGossipingDeleteDefault creates a StorageServiceGossipingDeleteDefault with default headers values +func NewStorageServiceGossipingDeleteDefault(code int) *StorageServiceGossipingDeleteDefault { + return &StorageServiceGossipingDeleteDefault{ + _statusCode: code, + } +} + +/*StorageServiceGossipingDeleteDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceGossipingDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service gossiping delete default response +func (o *StorageServiceGossipingDeleteDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceGossipingDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceGossipingDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceGossipingDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_parameters.go new file mode 100644 index 00000000000..1419727139b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceGossipingGetParams creates a new StorageServiceGossipingGetParams object +// with the default values initialized. +func NewStorageServiceGossipingGetParams() *StorageServiceGossipingGetParams { + + return &StorageServiceGossipingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceGossipingGetParamsWithTimeout creates a new StorageServiceGossipingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceGossipingGetParamsWithTimeout(timeout time.Duration) *StorageServiceGossipingGetParams { + + return &StorageServiceGossipingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceGossipingGetParamsWithContext creates a new StorageServiceGossipingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceGossipingGetParamsWithContext(ctx context.Context) *StorageServiceGossipingGetParams { + + return &StorageServiceGossipingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceGossipingGetParamsWithHTTPClient creates a new StorageServiceGossipingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceGossipingGetParamsWithHTTPClient(client *http.Client) *StorageServiceGossipingGetParams { + + return &StorageServiceGossipingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceGossipingGetParams contains all the parameters to send to the API endpoint +for the storage service gossiping get operation typically these are written to a http.Request +*/ +type StorageServiceGossipingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) WithTimeout(timeout time.Duration) *StorageServiceGossipingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) WithContext(ctx context.Context) *StorageServiceGossipingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) WithHTTPClient(client *http.Client) *StorageServiceGossipingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service gossiping get params +func (o *StorageServiceGossipingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceGossipingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_responses.go new file mode 100644 index 00000000000..508bb006932 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceGossipingGetReader is a Reader for the StorageServiceGossipingGet structure. +type StorageServiceGossipingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceGossipingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceGossipingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceGossipingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceGossipingGetOK creates a StorageServiceGossipingGetOK with default headers values +func NewStorageServiceGossipingGetOK() *StorageServiceGossipingGetOK { + return &StorageServiceGossipingGetOK{} +} + +/*StorageServiceGossipingGetOK handles this case with default header values. + +StorageServiceGossipingGetOK storage service gossiping get o k +*/ +type StorageServiceGossipingGetOK struct { + Payload bool +} + +func (o *StorageServiceGossipingGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceGossipingGetOK) 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 +} + +// NewStorageServiceGossipingGetDefault creates a StorageServiceGossipingGetDefault with default headers values +func NewStorageServiceGossipingGetDefault(code int) *StorageServiceGossipingGetDefault { + return &StorageServiceGossipingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceGossipingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceGossipingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service gossiping get default response +func (o *StorageServiceGossipingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceGossipingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceGossipingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceGossipingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_parameters.go new file mode 100644 index 00000000000..4a2a9ef5f57 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceGossipingPostParams creates a new StorageServiceGossipingPostParams object +// with the default values initialized. +func NewStorageServiceGossipingPostParams() *StorageServiceGossipingPostParams { + + return &StorageServiceGossipingPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceGossipingPostParamsWithTimeout creates a new StorageServiceGossipingPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceGossipingPostParamsWithTimeout(timeout time.Duration) *StorageServiceGossipingPostParams { + + return &StorageServiceGossipingPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceGossipingPostParamsWithContext creates a new StorageServiceGossipingPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceGossipingPostParamsWithContext(ctx context.Context) *StorageServiceGossipingPostParams { + + return &StorageServiceGossipingPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceGossipingPostParamsWithHTTPClient creates a new StorageServiceGossipingPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceGossipingPostParamsWithHTTPClient(client *http.Client) *StorageServiceGossipingPostParams { + + return &StorageServiceGossipingPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceGossipingPostParams contains all the parameters to send to the API endpoint +for the storage service gossiping post operation typically these are written to a http.Request +*/ +type StorageServiceGossipingPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) WithTimeout(timeout time.Duration) *StorageServiceGossipingPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) WithContext(ctx context.Context) *StorageServiceGossipingPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) WithHTTPClient(client *http.Client) *StorageServiceGossipingPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service gossiping post params +func (o *StorageServiceGossipingPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceGossipingPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_responses.go new file mode 100644 index 00000000000..7ef5b699ac4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_gossiping_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceGossipingPostReader is a Reader for the StorageServiceGossipingPost structure. +type StorageServiceGossipingPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceGossipingPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceGossipingPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceGossipingPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceGossipingPostOK creates a StorageServiceGossipingPostOK with default headers values +func NewStorageServiceGossipingPostOK() *StorageServiceGossipingPostOK { + return &StorageServiceGossipingPostOK{} +} + +/*StorageServiceGossipingPostOK handles this case with default header values. + +StorageServiceGossipingPostOK storage service gossiping post o k +*/ +type StorageServiceGossipingPostOK struct { +} + +func (o *StorageServiceGossipingPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceGossipingPostDefault creates a StorageServiceGossipingPostDefault with default headers values +func NewStorageServiceGossipingPostDefault(code int) *StorageServiceGossipingPostDefault { + return &StorageServiceGossipingPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceGossipingPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceGossipingPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service gossiping post default response +func (o *StorageServiceGossipingPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceGossipingPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceGossipingPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceGossipingPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_parameters.go new file mode 100644 index 00000000000..de0cc44412e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceHintedHandoffPostParams creates a new StorageServiceHintedHandoffPostParams object +// with the default values initialized. +func NewStorageServiceHintedHandoffPostParams() *StorageServiceHintedHandoffPostParams { + var () + return &StorageServiceHintedHandoffPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceHintedHandoffPostParamsWithTimeout creates a new StorageServiceHintedHandoffPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceHintedHandoffPostParamsWithTimeout(timeout time.Duration) *StorageServiceHintedHandoffPostParams { + var () + return &StorageServiceHintedHandoffPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceHintedHandoffPostParamsWithContext creates a new StorageServiceHintedHandoffPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceHintedHandoffPostParamsWithContext(ctx context.Context) *StorageServiceHintedHandoffPostParams { + var () + return &StorageServiceHintedHandoffPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceHintedHandoffPostParamsWithHTTPClient creates a new StorageServiceHintedHandoffPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceHintedHandoffPostParamsWithHTTPClient(client *http.Client) *StorageServiceHintedHandoffPostParams { + var () + return &StorageServiceHintedHandoffPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceHintedHandoffPostParams contains all the parameters to send to the API endpoint +for the storage service hinted handoff post operation typically these are written to a http.Request +*/ +type StorageServiceHintedHandoffPostParams struct { + + /*Throttle + throttle in kb + + */ + Throttle int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) WithTimeout(timeout time.Duration) *StorageServiceHintedHandoffPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) WithContext(ctx context.Context) *StorageServiceHintedHandoffPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) WithHTTPClient(client *http.Client) *StorageServiceHintedHandoffPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithThrottle adds the throttle to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) WithThrottle(throttle int32) *StorageServiceHintedHandoffPostParams { + o.SetThrottle(throttle) + return o +} + +// SetThrottle adds the throttle to the storage service hinted handoff post params +func (o *StorageServiceHintedHandoffPostParams) SetThrottle(throttle int32) { + o.Throttle = throttle +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceHintedHandoffPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param throttle + qrThrottle := o.Throttle + qThrottle := swag.FormatInt32(qrThrottle) + if qThrottle != "" { + if err := r.SetQueryParam("throttle", qThrottle); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_responses.go new file mode 100644 index 00000000000..f64d7782b9e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hinted_handoff_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceHintedHandoffPostReader is a Reader for the StorageServiceHintedHandoffPost structure. +type StorageServiceHintedHandoffPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceHintedHandoffPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceHintedHandoffPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceHintedHandoffPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceHintedHandoffPostOK creates a StorageServiceHintedHandoffPostOK with default headers values +func NewStorageServiceHintedHandoffPostOK() *StorageServiceHintedHandoffPostOK { + return &StorageServiceHintedHandoffPostOK{} +} + +/*StorageServiceHintedHandoffPostOK handles this case with default header values. + +StorageServiceHintedHandoffPostOK storage service hinted handoff post o k +*/ +type StorageServiceHintedHandoffPostOK struct { +} + +func (o *StorageServiceHintedHandoffPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceHintedHandoffPostDefault creates a StorageServiceHintedHandoffPostDefault with default headers values +func NewStorageServiceHintedHandoffPostDefault(code int) *StorageServiceHintedHandoffPostDefault { + return &StorageServiceHintedHandoffPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceHintedHandoffPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceHintedHandoffPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service hinted handoff post default response +func (o *StorageServiceHintedHandoffPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceHintedHandoffPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceHintedHandoffPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceHintedHandoffPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_parameters.go new file mode 100644 index 00000000000..cf15b52c4a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceHostIDGetParams creates a new StorageServiceHostIDGetParams object +// with the default values initialized. +func NewStorageServiceHostIDGetParams() *StorageServiceHostIDGetParams { + + return &StorageServiceHostIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceHostIDGetParamsWithTimeout creates a new StorageServiceHostIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceHostIDGetParamsWithTimeout(timeout time.Duration) *StorageServiceHostIDGetParams { + + return &StorageServiceHostIDGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceHostIDGetParamsWithContext creates a new StorageServiceHostIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceHostIDGetParamsWithContext(ctx context.Context) *StorageServiceHostIDGetParams { + + return &StorageServiceHostIDGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceHostIDGetParamsWithHTTPClient creates a new StorageServiceHostIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceHostIDGetParamsWithHTTPClient(client *http.Client) *StorageServiceHostIDGetParams { + + return &StorageServiceHostIDGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceHostIDGetParams contains all the parameters to send to the API endpoint +for the storage service host Id get operation typically these are written to a http.Request +*/ +type StorageServiceHostIDGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) WithTimeout(timeout time.Duration) *StorageServiceHostIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) WithContext(ctx context.Context) *StorageServiceHostIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) WithHTTPClient(client *http.Client) *StorageServiceHostIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service host Id get params +func (o *StorageServiceHostIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceHostIDGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_responses.go new file mode 100644 index 00000000000..84720bb0574 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_host_id_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceHostIDGetReader is a Reader for the StorageServiceHostIDGet structure. +type StorageServiceHostIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceHostIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceHostIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceHostIDGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceHostIDGetOK creates a StorageServiceHostIDGetOK with default headers values +func NewStorageServiceHostIDGetOK() *StorageServiceHostIDGetOK { + return &StorageServiceHostIDGetOK{} +} + +/*StorageServiceHostIDGetOK handles this case with default header values. + +StorageServiceHostIDGetOK storage service host Id get o k +*/ +type StorageServiceHostIDGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceHostIDGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceHostIDGetOK) 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 +} + +// NewStorageServiceHostIDGetDefault creates a StorageServiceHostIDGetDefault with default headers values +func NewStorageServiceHostIDGetDefault(code int) *StorageServiceHostIDGetDefault { + return &StorageServiceHostIDGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceHostIDGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceHostIDGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service host Id get default response +func (o *StorageServiceHostIDGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceHostIDGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceHostIDGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceHostIDGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_parameters.go new file mode 100644 index 00000000000..4b3844d16a6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceHostidLocalGetParams creates a new StorageServiceHostidLocalGetParams object +// with the default values initialized. +func NewStorageServiceHostidLocalGetParams() *StorageServiceHostidLocalGetParams { + + return &StorageServiceHostidLocalGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceHostidLocalGetParamsWithTimeout creates a new StorageServiceHostidLocalGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceHostidLocalGetParamsWithTimeout(timeout time.Duration) *StorageServiceHostidLocalGetParams { + + return &StorageServiceHostidLocalGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceHostidLocalGetParamsWithContext creates a new StorageServiceHostidLocalGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceHostidLocalGetParamsWithContext(ctx context.Context) *StorageServiceHostidLocalGetParams { + + return &StorageServiceHostidLocalGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceHostidLocalGetParamsWithHTTPClient creates a new StorageServiceHostidLocalGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceHostidLocalGetParamsWithHTTPClient(client *http.Client) *StorageServiceHostidLocalGetParams { + + return &StorageServiceHostidLocalGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceHostidLocalGetParams contains all the parameters to send to the API endpoint +for the storage service hostid local get operation typically these are written to a http.Request +*/ +type StorageServiceHostidLocalGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) WithTimeout(timeout time.Duration) *StorageServiceHostidLocalGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) WithContext(ctx context.Context) *StorageServiceHostidLocalGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) WithHTTPClient(client *http.Client) *StorageServiceHostidLocalGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service hostid local get params +func (o *StorageServiceHostidLocalGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceHostidLocalGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_responses.go new file mode 100644 index 00000000000..cdffde30f4d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_hostid_local_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceHostidLocalGetReader is a Reader for the StorageServiceHostidLocalGet structure. +type StorageServiceHostidLocalGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceHostidLocalGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceHostidLocalGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceHostidLocalGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceHostidLocalGetOK creates a StorageServiceHostidLocalGetOK with default headers values +func NewStorageServiceHostidLocalGetOK() *StorageServiceHostidLocalGetOK { + return &StorageServiceHostidLocalGetOK{} +} + +/*StorageServiceHostidLocalGetOK handles this case with default header values. + +StorageServiceHostidLocalGetOK storage service hostid local get o k +*/ +type StorageServiceHostidLocalGetOK struct { + Payload string +} + +func (o *StorageServiceHostidLocalGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceHostidLocalGetOK) 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 +} + +// NewStorageServiceHostidLocalGetDefault creates a StorageServiceHostidLocalGetDefault with default headers values +func NewStorageServiceHostidLocalGetDefault(code int) *StorageServiceHostidLocalGetDefault { + return &StorageServiceHostidLocalGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceHostidLocalGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceHostidLocalGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service hostid local get default response +func (o *StorageServiceHostidLocalGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceHostidLocalGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceHostidLocalGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceHostidLocalGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_parameters.go new file mode 100644 index 00000000000..31f3785299a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceIncrementalBackupsGetParams creates a new StorageServiceIncrementalBackupsGetParams object +// with the default values initialized. +func NewStorageServiceIncrementalBackupsGetParams() *StorageServiceIncrementalBackupsGetParams { + + return &StorageServiceIncrementalBackupsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceIncrementalBackupsGetParamsWithTimeout creates a new StorageServiceIncrementalBackupsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceIncrementalBackupsGetParamsWithTimeout(timeout time.Duration) *StorageServiceIncrementalBackupsGetParams { + + return &StorageServiceIncrementalBackupsGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceIncrementalBackupsGetParamsWithContext creates a new StorageServiceIncrementalBackupsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceIncrementalBackupsGetParamsWithContext(ctx context.Context) *StorageServiceIncrementalBackupsGetParams { + + return &StorageServiceIncrementalBackupsGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceIncrementalBackupsGetParamsWithHTTPClient creates a new StorageServiceIncrementalBackupsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceIncrementalBackupsGetParamsWithHTTPClient(client *http.Client) *StorageServiceIncrementalBackupsGetParams { + + return &StorageServiceIncrementalBackupsGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceIncrementalBackupsGetParams contains all the parameters to send to the API endpoint +for the storage service incremental backups get operation typically these are written to a http.Request +*/ +type StorageServiceIncrementalBackupsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) WithTimeout(timeout time.Duration) *StorageServiceIncrementalBackupsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) WithContext(ctx context.Context) *StorageServiceIncrementalBackupsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) WithHTTPClient(client *http.Client) *StorageServiceIncrementalBackupsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service incremental backups get params +func (o *StorageServiceIncrementalBackupsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceIncrementalBackupsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_responses.go new file mode 100644 index 00000000000..8a6dc0897c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceIncrementalBackupsGetReader is a Reader for the StorageServiceIncrementalBackupsGet structure. +type StorageServiceIncrementalBackupsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceIncrementalBackupsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceIncrementalBackupsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceIncrementalBackupsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceIncrementalBackupsGetOK creates a StorageServiceIncrementalBackupsGetOK with default headers values +func NewStorageServiceIncrementalBackupsGetOK() *StorageServiceIncrementalBackupsGetOK { + return &StorageServiceIncrementalBackupsGetOK{} +} + +/*StorageServiceIncrementalBackupsGetOK handles this case with default header values. + +StorageServiceIncrementalBackupsGetOK storage service incremental backups get o k +*/ +type StorageServiceIncrementalBackupsGetOK struct { + Payload bool +} + +func (o *StorageServiceIncrementalBackupsGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceIncrementalBackupsGetOK) 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 +} + +// NewStorageServiceIncrementalBackupsGetDefault creates a StorageServiceIncrementalBackupsGetDefault with default headers values +func NewStorageServiceIncrementalBackupsGetDefault(code int) *StorageServiceIncrementalBackupsGetDefault { + return &StorageServiceIncrementalBackupsGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceIncrementalBackupsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceIncrementalBackupsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service incremental backups get default response +func (o *StorageServiceIncrementalBackupsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceIncrementalBackupsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceIncrementalBackupsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceIncrementalBackupsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_parameters.go new file mode 100644 index 00000000000..ba8b900409a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceIncrementalBackupsPostParams creates a new StorageServiceIncrementalBackupsPostParams object +// with the default values initialized. +func NewStorageServiceIncrementalBackupsPostParams() *StorageServiceIncrementalBackupsPostParams { + var () + return &StorageServiceIncrementalBackupsPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceIncrementalBackupsPostParamsWithTimeout creates a new StorageServiceIncrementalBackupsPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceIncrementalBackupsPostParamsWithTimeout(timeout time.Duration) *StorageServiceIncrementalBackupsPostParams { + var () + return &StorageServiceIncrementalBackupsPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceIncrementalBackupsPostParamsWithContext creates a new StorageServiceIncrementalBackupsPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceIncrementalBackupsPostParamsWithContext(ctx context.Context) *StorageServiceIncrementalBackupsPostParams { + var () + return &StorageServiceIncrementalBackupsPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceIncrementalBackupsPostParamsWithHTTPClient creates a new StorageServiceIncrementalBackupsPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceIncrementalBackupsPostParamsWithHTTPClient(client *http.Client) *StorageServiceIncrementalBackupsPostParams { + var () + return &StorageServiceIncrementalBackupsPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceIncrementalBackupsPostParams contains all the parameters to send to the API endpoint +for the storage service incremental backups post operation typically these are written to a http.Request +*/ +type StorageServiceIncrementalBackupsPostParams struct { + + /*Value + Set to true for incremental backup enabled + + */ + Value bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) WithTimeout(timeout time.Duration) *StorageServiceIncrementalBackupsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) WithContext(ctx context.Context) *StorageServiceIncrementalBackupsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) WithHTTPClient(client *http.Client) *StorageServiceIncrementalBackupsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithValue adds the value to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) WithValue(value bool) *StorageServiceIncrementalBackupsPostParams { + o.SetValue(value) + return o +} + +// SetValue adds the value to the storage service incremental backups post params +func (o *StorageServiceIncrementalBackupsPostParams) SetValue(value bool) { + o.Value = value +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceIncrementalBackupsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param value + qrValue := o.Value + qValue := swag.FormatBool(qrValue) + if qValue != "" { + if err := r.SetQueryParam("value", qValue); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_responses.go new file mode 100644 index 00000000000..da00f1d2e91 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_incremental_backups_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceIncrementalBackupsPostReader is a Reader for the StorageServiceIncrementalBackupsPost structure. +type StorageServiceIncrementalBackupsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceIncrementalBackupsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceIncrementalBackupsPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceIncrementalBackupsPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceIncrementalBackupsPostOK creates a StorageServiceIncrementalBackupsPostOK with default headers values +func NewStorageServiceIncrementalBackupsPostOK() *StorageServiceIncrementalBackupsPostOK { + return &StorageServiceIncrementalBackupsPostOK{} +} + +/*StorageServiceIncrementalBackupsPostOK handles this case with default header values. + +StorageServiceIncrementalBackupsPostOK storage service incremental backups post o k +*/ +type StorageServiceIncrementalBackupsPostOK struct { +} + +func (o *StorageServiceIncrementalBackupsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceIncrementalBackupsPostDefault creates a StorageServiceIncrementalBackupsPostDefault with default headers values +func NewStorageServiceIncrementalBackupsPostDefault(code int) *StorageServiceIncrementalBackupsPostDefault { + return &StorageServiceIncrementalBackupsPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceIncrementalBackupsPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceIncrementalBackupsPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service incremental backups post default response +func (o *StorageServiceIncrementalBackupsPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceIncrementalBackupsPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceIncrementalBackupsPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceIncrementalBackupsPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_parameters.go new file mode 100644 index 00000000000..39288568252 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceIsInitializedGetParams creates a new StorageServiceIsInitializedGetParams object +// with the default values initialized. +func NewStorageServiceIsInitializedGetParams() *StorageServiceIsInitializedGetParams { + + return &StorageServiceIsInitializedGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceIsInitializedGetParamsWithTimeout creates a new StorageServiceIsInitializedGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceIsInitializedGetParamsWithTimeout(timeout time.Duration) *StorageServiceIsInitializedGetParams { + + return &StorageServiceIsInitializedGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceIsInitializedGetParamsWithContext creates a new StorageServiceIsInitializedGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceIsInitializedGetParamsWithContext(ctx context.Context) *StorageServiceIsInitializedGetParams { + + return &StorageServiceIsInitializedGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceIsInitializedGetParamsWithHTTPClient creates a new StorageServiceIsInitializedGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceIsInitializedGetParamsWithHTTPClient(client *http.Client) *StorageServiceIsInitializedGetParams { + + return &StorageServiceIsInitializedGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceIsInitializedGetParams contains all the parameters to send to the API endpoint +for the storage service is initialized get operation typically these are written to a http.Request +*/ +type StorageServiceIsInitializedGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) WithTimeout(timeout time.Duration) *StorageServiceIsInitializedGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) WithContext(ctx context.Context) *StorageServiceIsInitializedGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) WithHTTPClient(client *http.Client) *StorageServiceIsInitializedGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service is initialized get params +func (o *StorageServiceIsInitializedGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceIsInitializedGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_responses.go new file mode 100644 index 00000000000..3f0675fff3a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_initialized_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceIsInitializedGetReader is a Reader for the StorageServiceIsInitializedGet structure. +type StorageServiceIsInitializedGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceIsInitializedGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceIsInitializedGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceIsInitializedGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceIsInitializedGetOK creates a StorageServiceIsInitializedGetOK with default headers values +func NewStorageServiceIsInitializedGetOK() *StorageServiceIsInitializedGetOK { + return &StorageServiceIsInitializedGetOK{} +} + +/*StorageServiceIsInitializedGetOK handles this case with default header values. + +StorageServiceIsInitializedGetOK storage service is initialized get o k +*/ +type StorageServiceIsInitializedGetOK struct { + Payload bool +} + +func (o *StorageServiceIsInitializedGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceIsInitializedGetOK) 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 +} + +// NewStorageServiceIsInitializedGetDefault creates a StorageServiceIsInitializedGetDefault with default headers values +func NewStorageServiceIsInitializedGetDefault(code int) *StorageServiceIsInitializedGetDefault { + return &StorageServiceIsInitializedGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceIsInitializedGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceIsInitializedGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service is initialized get default response +func (o *StorageServiceIsInitializedGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceIsInitializedGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceIsInitializedGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceIsInitializedGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_parameters.go new file mode 100644 index 00000000000..11903af8003 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceIsStartingGetParams creates a new StorageServiceIsStartingGetParams object +// with the default values initialized. +func NewStorageServiceIsStartingGetParams() *StorageServiceIsStartingGetParams { + + return &StorageServiceIsStartingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceIsStartingGetParamsWithTimeout creates a new StorageServiceIsStartingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceIsStartingGetParamsWithTimeout(timeout time.Duration) *StorageServiceIsStartingGetParams { + + return &StorageServiceIsStartingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceIsStartingGetParamsWithContext creates a new StorageServiceIsStartingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceIsStartingGetParamsWithContext(ctx context.Context) *StorageServiceIsStartingGetParams { + + return &StorageServiceIsStartingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceIsStartingGetParamsWithHTTPClient creates a new StorageServiceIsStartingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceIsStartingGetParamsWithHTTPClient(client *http.Client) *StorageServiceIsStartingGetParams { + + return &StorageServiceIsStartingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceIsStartingGetParams contains all the parameters to send to the API endpoint +for the storage service is starting get operation typically these are written to a http.Request +*/ +type StorageServiceIsStartingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) WithTimeout(timeout time.Duration) *StorageServiceIsStartingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) WithContext(ctx context.Context) *StorageServiceIsStartingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) WithHTTPClient(client *http.Client) *StorageServiceIsStartingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service is starting get params +func (o *StorageServiceIsStartingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceIsStartingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_responses.go new file mode 100644 index 00000000000..8579770b0ec --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_is_starting_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceIsStartingGetReader is a Reader for the StorageServiceIsStartingGet structure. +type StorageServiceIsStartingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceIsStartingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceIsStartingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceIsStartingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceIsStartingGetOK creates a StorageServiceIsStartingGetOK with default headers values +func NewStorageServiceIsStartingGetOK() *StorageServiceIsStartingGetOK { + return &StorageServiceIsStartingGetOK{} +} + +/*StorageServiceIsStartingGetOK handles this case with default header values. + +StorageServiceIsStartingGetOK storage service is starting get o k +*/ +type StorageServiceIsStartingGetOK struct { + Payload bool +} + +func (o *StorageServiceIsStartingGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceIsStartingGetOK) 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 +} + +// NewStorageServiceIsStartingGetDefault creates a StorageServiceIsStartingGetDefault with default headers values +func NewStorageServiceIsStartingGetDefault(code int) *StorageServiceIsStartingGetDefault { + return &StorageServiceIsStartingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceIsStartingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceIsStartingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service is starting get default response +func (o *StorageServiceIsStartingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceIsStartingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceIsStartingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceIsStartingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_parameters.go new file mode 100644 index 00000000000..7900a903e98 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceJoinRingGetParams creates a new StorageServiceJoinRingGetParams object +// with the default values initialized. +func NewStorageServiceJoinRingGetParams() *StorageServiceJoinRingGetParams { + + return &StorageServiceJoinRingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceJoinRingGetParamsWithTimeout creates a new StorageServiceJoinRingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceJoinRingGetParamsWithTimeout(timeout time.Duration) *StorageServiceJoinRingGetParams { + + return &StorageServiceJoinRingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceJoinRingGetParamsWithContext creates a new StorageServiceJoinRingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceJoinRingGetParamsWithContext(ctx context.Context) *StorageServiceJoinRingGetParams { + + return &StorageServiceJoinRingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceJoinRingGetParamsWithHTTPClient creates a new StorageServiceJoinRingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceJoinRingGetParamsWithHTTPClient(client *http.Client) *StorageServiceJoinRingGetParams { + + return &StorageServiceJoinRingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceJoinRingGetParams contains all the parameters to send to the API endpoint +for the storage service join ring get operation typically these are written to a http.Request +*/ +type StorageServiceJoinRingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) WithTimeout(timeout time.Duration) *StorageServiceJoinRingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) WithContext(ctx context.Context) *StorageServiceJoinRingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) WithHTTPClient(client *http.Client) *StorageServiceJoinRingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service join ring get params +func (o *StorageServiceJoinRingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceJoinRingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_responses.go new file mode 100644 index 00000000000..222a2326f55 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceJoinRingGetReader is a Reader for the StorageServiceJoinRingGet structure. +type StorageServiceJoinRingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceJoinRingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceJoinRingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceJoinRingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceJoinRingGetOK creates a StorageServiceJoinRingGetOK with default headers values +func NewStorageServiceJoinRingGetOK() *StorageServiceJoinRingGetOK { + return &StorageServiceJoinRingGetOK{} +} + +/*StorageServiceJoinRingGetOK handles this case with default header values. + +StorageServiceJoinRingGetOK storage service join ring get o k +*/ +type StorageServiceJoinRingGetOK struct { + Payload bool +} + +func (o *StorageServiceJoinRingGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceJoinRingGetOK) 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 +} + +// NewStorageServiceJoinRingGetDefault creates a StorageServiceJoinRingGetDefault with default headers values +func NewStorageServiceJoinRingGetDefault(code int) *StorageServiceJoinRingGetDefault { + return &StorageServiceJoinRingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceJoinRingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceJoinRingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service join ring get default response +func (o *StorageServiceJoinRingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceJoinRingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceJoinRingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceJoinRingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_parameters.go new file mode 100644 index 00000000000..e336cddfcd9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceJoinRingPostParams creates a new StorageServiceJoinRingPostParams object +// with the default values initialized. +func NewStorageServiceJoinRingPostParams() *StorageServiceJoinRingPostParams { + + return &StorageServiceJoinRingPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceJoinRingPostParamsWithTimeout creates a new StorageServiceJoinRingPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceJoinRingPostParamsWithTimeout(timeout time.Duration) *StorageServiceJoinRingPostParams { + + return &StorageServiceJoinRingPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceJoinRingPostParamsWithContext creates a new StorageServiceJoinRingPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceJoinRingPostParamsWithContext(ctx context.Context) *StorageServiceJoinRingPostParams { + + return &StorageServiceJoinRingPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceJoinRingPostParamsWithHTTPClient creates a new StorageServiceJoinRingPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceJoinRingPostParamsWithHTTPClient(client *http.Client) *StorageServiceJoinRingPostParams { + + return &StorageServiceJoinRingPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceJoinRingPostParams contains all the parameters to send to the API endpoint +for the storage service join ring post operation typically these are written to a http.Request +*/ +type StorageServiceJoinRingPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) WithTimeout(timeout time.Duration) *StorageServiceJoinRingPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) WithContext(ctx context.Context) *StorageServiceJoinRingPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) WithHTTPClient(client *http.Client) *StorageServiceJoinRingPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service join ring post params +func (o *StorageServiceJoinRingPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceJoinRingPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_responses.go new file mode 100644 index 00000000000..14ab95424fe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_join_ring_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceJoinRingPostReader is a Reader for the StorageServiceJoinRingPost structure. +type StorageServiceJoinRingPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceJoinRingPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceJoinRingPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceJoinRingPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceJoinRingPostOK creates a StorageServiceJoinRingPostOK with default headers values +func NewStorageServiceJoinRingPostOK() *StorageServiceJoinRingPostOK { + return &StorageServiceJoinRingPostOK{} +} + +/*StorageServiceJoinRingPostOK handles this case with default header values. + +StorageServiceJoinRingPostOK storage service join ring post o k +*/ +type StorageServiceJoinRingPostOK struct { +} + +func (o *StorageServiceJoinRingPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceJoinRingPostDefault creates a StorageServiceJoinRingPostDefault with default headers values +func NewStorageServiceJoinRingPostDefault(code int) *StorageServiceJoinRingPostDefault { + return &StorageServiceJoinRingPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceJoinRingPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceJoinRingPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service join ring post default response +func (o *StorageServiceJoinRingPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceJoinRingPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceJoinRingPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceJoinRingPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..a02fdffef58 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspaceCleanupByKeyspacePostParams creates a new StorageServiceKeyspaceCleanupByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceKeyspaceCleanupByKeyspacePostParams() *StorageServiceKeyspaceCleanupByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCleanupByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithTimeout creates a new StorageServiceKeyspaceCleanupByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCleanupByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithContext creates a new StorageServiceKeyspaceCleanupByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCleanupByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithHTTPClient creates a new StorageServiceKeyspaceCleanupByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspaceCleanupByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCleanupByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspaceCleanupByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service keyspace cleanup by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceKeyspaceCleanupByKeyspacePostParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*Keyspace + The keyspace to query about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WithCf(cf *string) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceKeyspaceCleanupByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service keyspace cleanup by keyspace post params +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspaceCleanupByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_responses.go new file mode 100644 index 00000000000..a3dfa0365c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_cleanup_by_keyspace_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspaceCleanupByKeyspacePostReader is a Reader for the StorageServiceKeyspaceCleanupByKeyspacePost structure. +type StorageServiceKeyspaceCleanupByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspaceCleanupByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspaceCleanupByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspaceCleanupByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspaceCleanupByKeyspacePostOK creates a StorageServiceKeyspaceCleanupByKeyspacePostOK with default headers values +func NewStorageServiceKeyspaceCleanupByKeyspacePostOK() *StorageServiceKeyspaceCleanupByKeyspacePostOK { + return &StorageServiceKeyspaceCleanupByKeyspacePostOK{} +} + +/*StorageServiceKeyspaceCleanupByKeyspacePostOK handles this case with default header values. + +StorageServiceKeyspaceCleanupByKeyspacePostOK storage service keyspace cleanup by keyspace post o k +*/ +type StorageServiceKeyspaceCleanupByKeyspacePostOK struct { + Payload int32 +} + +func (o *StorageServiceKeyspaceCleanupByKeyspacePostOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceKeyspaceCleanupByKeyspacePostOK) 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 +} + +// NewStorageServiceKeyspaceCleanupByKeyspacePostDefault creates a StorageServiceKeyspaceCleanupByKeyspacePostDefault with default headers values +func NewStorageServiceKeyspaceCleanupByKeyspacePostDefault(code int) *StorageServiceKeyspaceCleanupByKeyspacePostDefault { + return &StorageServiceKeyspaceCleanupByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspaceCleanupByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspaceCleanupByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspace cleanup by keyspace post default response +func (o *StorageServiceKeyspaceCleanupByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspaceCleanupByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspaceCleanupByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspaceCleanupByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..e30ca6268e5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspaceCompactionByKeyspacePostParams creates a new StorageServiceKeyspaceCompactionByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceKeyspaceCompactionByKeyspacePostParams() *StorageServiceKeyspaceCompactionByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCompactionByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithTimeout creates a new StorageServiceKeyspaceCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCompactionByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithContext creates a new StorageServiceKeyspaceCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCompactionByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithHTTPClient creates a new StorageServiceKeyspaceCompactionByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspaceCompactionByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + var () + return &StorageServiceKeyspaceCompactionByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspaceCompactionByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service keyspace compaction by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceKeyspaceCompactionByKeyspacePostParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*Keyspace + The keyspace to query about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WithCf(cf *string) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceKeyspaceCompactionByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service keyspace compaction by keyspace post params +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspaceCompactionByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_responses.go new file mode 100644 index 00000000000..5c9720810d3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_compaction_by_keyspace_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspaceCompactionByKeyspacePostReader is a Reader for the StorageServiceKeyspaceCompactionByKeyspacePost structure. +type StorageServiceKeyspaceCompactionByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspaceCompactionByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspaceCompactionByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspaceCompactionByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspaceCompactionByKeyspacePostOK creates a StorageServiceKeyspaceCompactionByKeyspacePostOK with default headers values +func NewStorageServiceKeyspaceCompactionByKeyspacePostOK() *StorageServiceKeyspaceCompactionByKeyspacePostOK { + return &StorageServiceKeyspaceCompactionByKeyspacePostOK{} +} + +/*StorageServiceKeyspaceCompactionByKeyspacePostOK handles this case with default header values. + +StorageServiceKeyspaceCompactionByKeyspacePostOK storage service keyspace compaction by keyspace post o k +*/ +type StorageServiceKeyspaceCompactionByKeyspacePostOK struct { +} + +func (o *StorageServiceKeyspaceCompactionByKeyspacePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceKeyspaceCompactionByKeyspacePostDefault creates a StorageServiceKeyspaceCompactionByKeyspacePostDefault with default headers values +func NewStorageServiceKeyspaceCompactionByKeyspacePostDefault(code int) *StorageServiceKeyspaceCompactionByKeyspacePostDefault { + return &StorageServiceKeyspaceCompactionByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspaceCompactionByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspaceCompactionByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspace compaction by keyspace post default response +func (o *StorageServiceKeyspaceCompactionByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspaceCompactionByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspaceCompactionByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspaceCompactionByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..d5d8a6dbff0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspaceFlushByKeyspacePostParams creates a new StorageServiceKeyspaceFlushByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceKeyspaceFlushByKeyspacePostParams() *StorageServiceKeyspaceFlushByKeyspacePostParams { + var () + return &StorageServiceKeyspaceFlushByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithTimeout creates a new StorageServiceKeyspaceFlushByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspaceFlushByKeyspacePostParams { + var () + return &StorageServiceKeyspaceFlushByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithContext creates a new StorageServiceKeyspaceFlushByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceKeyspaceFlushByKeyspacePostParams { + var () + return &StorageServiceKeyspaceFlushByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithHTTPClient creates a new StorageServiceKeyspaceFlushByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspaceFlushByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspaceFlushByKeyspacePostParams { + var () + return &StorageServiceKeyspaceFlushByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspaceFlushByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service keyspace flush by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceKeyspaceFlushByKeyspacePostParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*Keyspace + The keyspace to flush + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspaceFlushByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceKeyspaceFlushByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspaceFlushByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WithCf(cf *string) *StorageServiceKeyspaceFlushByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceKeyspaceFlushByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service keyspace flush by keyspace post params +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspaceFlushByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_responses.go new file mode 100644 index 00000000000..2da0f34ac04 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_flush_by_keyspace_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspaceFlushByKeyspacePostReader is a Reader for the StorageServiceKeyspaceFlushByKeyspacePost structure. +type StorageServiceKeyspaceFlushByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspaceFlushByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspaceFlushByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspaceFlushByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspaceFlushByKeyspacePostOK creates a StorageServiceKeyspaceFlushByKeyspacePostOK with default headers values +func NewStorageServiceKeyspaceFlushByKeyspacePostOK() *StorageServiceKeyspaceFlushByKeyspacePostOK { + return &StorageServiceKeyspaceFlushByKeyspacePostOK{} +} + +/*StorageServiceKeyspaceFlushByKeyspacePostOK handles this case with default header values. + +StorageServiceKeyspaceFlushByKeyspacePostOK storage service keyspace flush by keyspace post o k +*/ +type StorageServiceKeyspaceFlushByKeyspacePostOK struct { +} + +func (o *StorageServiceKeyspaceFlushByKeyspacePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceKeyspaceFlushByKeyspacePostDefault creates a StorageServiceKeyspaceFlushByKeyspacePostDefault with default headers values +func NewStorageServiceKeyspaceFlushByKeyspacePostDefault(code int) *StorageServiceKeyspaceFlushByKeyspacePostDefault { + return &StorageServiceKeyspaceFlushByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspaceFlushByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspaceFlushByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspace flush by keyspace post default response +func (o *StorageServiceKeyspaceFlushByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspaceFlushByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspaceFlushByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspaceFlushByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..b945c9fcd4a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_parameters.go @@ -0,0 +1,233 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspaceScrubByKeyspaceGetParams creates a new StorageServiceKeyspaceScrubByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceKeyspaceScrubByKeyspaceGetParams() *StorageServiceKeyspaceScrubByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceScrubByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithTimeout creates a new StorageServiceKeyspaceScrubByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceScrubByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithContext creates a new StorageServiceKeyspaceScrubByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceScrubByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceKeyspaceScrubByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspaceScrubByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceScrubByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspaceScrubByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service keyspace scrub by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceKeyspaceScrubByKeyspaceGetParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*DisableSnapshot + When set to true, disable snapshot + + */ + DisableSnapshot *bool + /*Keyspace + The keyspace to query about + + */ + Keyspace string + /*SkipCorrupted + When set to true, skip corrupted + + */ + SkipCorrupted *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithCf(cf *string) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithDisableSnapshot adds the disableSnapshot to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithDisableSnapshot(disableSnapshot *bool) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetDisableSnapshot(disableSnapshot) + return o +} + +// SetDisableSnapshot adds the disableSnapshot to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetDisableSnapshot(disableSnapshot *bool) { + o.DisableSnapshot = disableSnapshot +} + +// WithKeyspace adds the keyspace to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WithSkipCorrupted adds the skipCorrupted to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WithSkipCorrupted(skipCorrupted *bool) *StorageServiceKeyspaceScrubByKeyspaceGetParams { + o.SetSkipCorrupted(skipCorrupted) + return o +} + +// SetSkipCorrupted adds the skipCorrupted to the storage service keyspace scrub by keyspace get params +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) SetSkipCorrupted(skipCorrupted *bool) { + o.SkipCorrupted = skipCorrupted +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspaceScrubByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + if o.DisableSnapshot != nil { + + // query param disable_snapshot + var qrDisableSnapshot bool + if o.DisableSnapshot != nil { + qrDisableSnapshot = *o.DisableSnapshot + } + qDisableSnapshot := swag.FormatBool(qrDisableSnapshot) + if qDisableSnapshot != "" { + if err := r.SetQueryParam("disable_snapshot", qDisableSnapshot); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if o.SkipCorrupted != nil { + + // query param skip_corrupted + var qrSkipCorrupted bool + if o.SkipCorrupted != nil { + qrSkipCorrupted = *o.SkipCorrupted + } + qSkipCorrupted := swag.FormatBool(qrSkipCorrupted) + if qSkipCorrupted != "" { + if err := r.SetQueryParam("skip_corrupted", qSkipCorrupted); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_responses.go new file mode 100644 index 00000000000..28f89b49aa5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_scrub_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspaceScrubByKeyspaceGetReader is a Reader for the StorageServiceKeyspaceScrubByKeyspaceGet structure. +type StorageServiceKeyspaceScrubByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspaceScrubByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspaceScrubByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspaceScrubByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspaceScrubByKeyspaceGetOK creates a StorageServiceKeyspaceScrubByKeyspaceGetOK with default headers values +func NewStorageServiceKeyspaceScrubByKeyspaceGetOK() *StorageServiceKeyspaceScrubByKeyspaceGetOK { + return &StorageServiceKeyspaceScrubByKeyspaceGetOK{} +} + +/*StorageServiceKeyspaceScrubByKeyspaceGetOK handles this case with default header values. + +StorageServiceKeyspaceScrubByKeyspaceGetOK storage service keyspace scrub by keyspace get o k +*/ +type StorageServiceKeyspaceScrubByKeyspaceGetOK struct { + Payload int32 +} + +func (o *StorageServiceKeyspaceScrubByKeyspaceGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceKeyspaceScrubByKeyspaceGetOK) 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 +} + +// NewStorageServiceKeyspaceScrubByKeyspaceGetDefault creates a StorageServiceKeyspaceScrubByKeyspaceGetDefault with default headers values +func NewStorageServiceKeyspaceScrubByKeyspaceGetDefault(code int) *StorageServiceKeyspaceScrubByKeyspaceGetDefault { + return &StorageServiceKeyspaceScrubByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspaceScrubByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspaceScrubByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspace scrub by keyspace get default response +func (o *StorageServiceKeyspaceScrubByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspaceScrubByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspaceScrubByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspaceScrubByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..3838db0e6a5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_parameters.go @@ -0,0 +1,201 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams creates a new StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams() *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithTimeout creates a new StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithContext creates a new StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + var () + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service keyspace upgrade sstables by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams struct { + + /*Cf + Comma seperated column family names + + */ + Cf *string + /*ExcludeCurrentVersion + When set to true exclude current version + + */ + ExcludeCurrentVersion *bool + /*Keyspace + The keyspace + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithCf(cf *string) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithExcludeCurrentVersion adds the excludeCurrentVersion to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithExcludeCurrentVersion(excludeCurrentVersion *bool) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetExcludeCurrentVersion(excludeCurrentVersion) + return o +} + +// SetExcludeCurrentVersion adds the excludeCurrentVersion to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetExcludeCurrentVersion(excludeCurrentVersion *bool) { + o.ExcludeCurrentVersion = excludeCurrentVersion +} + +// WithKeyspace adds the keyspace to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service keyspace upgrade sstables by keyspace get params +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + if o.ExcludeCurrentVersion != nil { + + // query param exclude_current_version + var qrExcludeCurrentVersion bool + if o.ExcludeCurrentVersion != nil { + qrExcludeCurrentVersion = *o.ExcludeCurrentVersion + } + qExcludeCurrentVersion := swag.FormatBool(qrExcludeCurrentVersion) + if qExcludeCurrentVersion != "" { + if err := r.SetQueryParam("exclude_current_version", qExcludeCurrentVersion); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_responses.go new file mode 100644 index 00000000000..6dc9a61666b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspace_upgrade_sstables_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetReader is a Reader for the StorageServiceKeyspaceUpgradeSstablesByKeyspaceGet structure. +type StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK creates a StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK with default headers values +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK() *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK { + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK{} +} + +/*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK handles this case with default header values. + +StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK storage service keyspace upgrade sstables by keyspace get o k +*/ +type StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK struct { + Payload int32 +} + +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetOK) 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 +} + +// NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault creates a StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault with default headers values +func NewStorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault(code int) *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault { + return &StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspace upgrade sstables by keyspace get default response +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspaceUpgradeSstablesByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_parameters.go new file mode 100644 index 00000000000..5c73947cb83 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceKeyspacesGetParams creates a new StorageServiceKeyspacesGetParams object +// with the default values initialized. +func NewStorageServiceKeyspacesGetParams() *StorageServiceKeyspacesGetParams { + var () + return &StorageServiceKeyspacesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceKeyspacesGetParamsWithTimeout creates a new StorageServiceKeyspacesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceKeyspacesGetParamsWithTimeout(timeout time.Duration) *StorageServiceKeyspacesGetParams { + var () + return &StorageServiceKeyspacesGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceKeyspacesGetParamsWithContext creates a new StorageServiceKeyspacesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceKeyspacesGetParamsWithContext(ctx context.Context) *StorageServiceKeyspacesGetParams { + var () + return &StorageServiceKeyspacesGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceKeyspacesGetParamsWithHTTPClient creates a new StorageServiceKeyspacesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceKeyspacesGetParamsWithHTTPClient(client *http.Client) *StorageServiceKeyspacesGetParams { + var () + return &StorageServiceKeyspacesGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceKeyspacesGetParams contains all the parameters to send to the API endpoint +for the storage service keyspaces get operation typically these are written to a http.Request +*/ +type StorageServiceKeyspacesGetParams struct { + + /*Type + Which keyspaces to return + + */ + Type *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) WithTimeout(timeout time.Duration) *StorageServiceKeyspacesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) WithContext(ctx context.Context) *StorageServiceKeyspacesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) WithHTTPClient(client *http.Client) *StorageServiceKeyspacesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithType adds the typeVar to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) WithType(typeVar *string) *StorageServiceKeyspacesGetParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the storage service keyspaces get params +func (o *StorageServiceKeyspacesGetParams) SetType(typeVar *string) { + o.Type = typeVar +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceKeyspacesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_responses.go new file mode 100644 index 00000000000..f9157765fca --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_keyspaces_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceKeyspacesGetReader is a Reader for the StorageServiceKeyspacesGet structure. +type StorageServiceKeyspacesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceKeyspacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceKeyspacesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceKeyspacesGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceKeyspacesGetOK creates a StorageServiceKeyspacesGetOK with default headers values +func NewStorageServiceKeyspacesGetOK() *StorageServiceKeyspacesGetOK { + return &StorageServiceKeyspacesGetOK{} +} + +/*StorageServiceKeyspacesGetOK handles this case with default header values. + +StorageServiceKeyspacesGetOK storage service keyspaces get o k +*/ +type StorageServiceKeyspacesGetOK struct { + Payload []string +} + +func (o *StorageServiceKeyspacesGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceKeyspacesGetOK) 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 +} + +// NewStorageServiceKeyspacesGetDefault creates a StorageServiceKeyspacesGetDefault with default headers values +func NewStorageServiceKeyspacesGetDefault(code int) *StorageServiceKeyspacesGetDefault { + return &StorageServiceKeyspacesGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceKeyspacesGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceKeyspacesGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service keyspaces get default response +func (o *StorageServiceKeyspacesGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceKeyspacesGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceKeyspacesGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceKeyspacesGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_parameters.go new file mode 100644 index 00000000000..2f1dedaaa98 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceLoadGetParams creates a new StorageServiceLoadGetParams object +// with the default values initialized. +func NewStorageServiceLoadGetParams() *StorageServiceLoadGetParams { + + return &StorageServiceLoadGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceLoadGetParamsWithTimeout creates a new StorageServiceLoadGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceLoadGetParamsWithTimeout(timeout time.Duration) *StorageServiceLoadGetParams { + + return &StorageServiceLoadGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceLoadGetParamsWithContext creates a new StorageServiceLoadGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceLoadGetParamsWithContext(ctx context.Context) *StorageServiceLoadGetParams { + + return &StorageServiceLoadGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceLoadGetParamsWithHTTPClient creates a new StorageServiceLoadGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceLoadGetParamsWithHTTPClient(client *http.Client) *StorageServiceLoadGetParams { + + return &StorageServiceLoadGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceLoadGetParams contains all the parameters to send to the API endpoint +for the storage service load get operation typically these are written to a http.Request +*/ +type StorageServiceLoadGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service load get params +func (o *StorageServiceLoadGetParams) WithTimeout(timeout time.Duration) *StorageServiceLoadGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service load get params +func (o *StorageServiceLoadGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service load get params +func (o *StorageServiceLoadGetParams) WithContext(ctx context.Context) *StorageServiceLoadGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service load get params +func (o *StorageServiceLoadGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service load get params +func (o *StorageServiceLoadGetParams) WithHTTPClient(client *http.Client) *StorageServiceLoadGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service load get params +func (o *StorageServiceLoadGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceLoadGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_responses.go new file mode 100644 index 00000000000..fc6f3ece23c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceLoadGetReader is a Reader for the StorageServiceLoadGet structure. +type StorageServiceLoadGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceLoadGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceLoadGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceLoadGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceLoadGetOK creates a StorageServiceLoadGetOK with default headers values +func NewStorageServiceLoadGetOK() *StorageServiceLoadGetOK { + return &StorageServiceLoadGetOK{} +} + +/*StorageServiceLoadGetOK handles this case with default header values. + +StorageServiceLoadGetOK storage service load get o k +*/ +type StorageServiceLoadGetOK struct { + Payload interface{} +} + +func (o *StorageServiceLoadGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageServiceLoadGetOK) 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 +} + +// NewStorageServiceLoadGetDefault creates a StorageServiceLoadGetDefault with default headers values +func NewStorageServiceLoadGetDefault(code int) *StorageServiceLoadGetDefault { + return &StorageServiceLoadGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceLoadGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceLoadGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service load get default response +func (o *StorageServiceLoadGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceLoadGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceLoadGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceLoadGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_parameters.go new file mode 100644 index 00000000000..11f41986108 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceLoadMapGetParams creates a new StorageServiceLoadMapGetParams object +// with the default values initialized. +func NewStorageServiceLoadMapGetParams() *StorageServiceLoadMapGetParams { + + return &StorageServiceLoadMapGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceLoadMapGetParamsWithTimeout creates a new StorageServiceLoadMapGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceLoadMapGetParamsWithTimeout(timeout time.Duration) *StorageServiceLoadMapGetParams { + + return &StorageServiceLoadMapGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceLoadMapGetParamsWithContext creates a new StorageServiceLoadMapGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceLoadMapGetParamsWithContext(ctx context.Context) *StorageServiceLoadMapGetParams { + + return &StorageServiceLoadMapGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceLoadMapGetParamsWithHTTPClient creates a new StorageServiceLoadMapGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceLoadMapGetParamsWithHTTPClient(client *http.Client) *StorageServiceLoadMapGetParams { + + return &StorageServiceLoadMapGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceLoadMapGetParams contains all the parameters to send to the API endpoint +for the storage service load map get operation typically these are written to a http.Request +*/ +type StorageServiceLoadMapGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) WithTimeout(timeout time.Duration) *StorageServiceLoadMapGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) WithContext(ctx context.Context) *StorageServiceLoadMapGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) WithHTTPClient(client *http.Client) *StorageServiceLoadMapGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service load map get params +func (o *StorageServiceLoadMapGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceLoadMapGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_responses.go new file mode 100644 index 00000000000..53a3b53cc5d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_load_map_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceLoadMapGetReader is a Reader for the StorageServiceLoadMapGet structure. +type StorageServiceLoadMapGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceLoadMapGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceLoadMapGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceLoadMapGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceLoadMapGetOK creates a StorageServiceLoadMapGetOK with default headers values +func NewStorageServiceLoadMapGetOK() *StorageServiceLoadMapGetOK { + return &StorageServiceLoadMapGetOK{} +} + +/*StorageServiceLoadMapGetOK handles this case with default header values. + +StorageServiceLoadMapGetOK storage service load map get o k +*/ +type StorageServiceLoadMapGetOK struct { + Payload []*models.MapStringDouble +} + +func (o *StorageServiceLoadMapGetOK) GetPayload() []*models.MapStringDouble { + return o.Payload +} + +func (o *StorageServiceLoadMapGetOK) 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 +} + +// NewStorageServiceLoadMapGetDefault creates a StorageServiceLoadMapGetDefault with default headers values +func NewStorageServiceLoadMapGetDefault(code int) *StorageServiceLoadMapGetDefault { + return &StorageServiceLoadMapGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceLoadMapGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceLoadMapGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service load map get default response +func (o *StorageServiceLoadMapGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceLoadMapGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceLoadMapGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceLoadMapGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_parameters.go new file mode 100644 index 00000000000..f4da0b6e71e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceLoggingLevelGetParams creates a new StorageServiceLoggingLevelGetParams object +// with the default values initialized. +func NewStorageServiceLoggingLevelGetParams() *StorageServiceLoggingLevelGetParams { + + return &StorageServiceLoggingLevelGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceLoggingLevelGetParamsWithTimeout creates a new StorageServiceLoggingLevelGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceLoggingLevelGetParamsWithTimeout(timeout time.Duration) *StorageServiceLoggingLevelGetParams { + + return &StorageServiceLoggingLevelGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceLoggingLevelGetParamsWithContext creates a new StorageServiceLoggingLevelGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceLoggingLevelGetParamsWithContext(ctx context.Context) *StorageServiceLoggingLevelGetParams { + + return &StorageServiceLoggingLevelGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceLoggingLevelGetParamsWithHTTPClient creates a new StorageServiceLoggingLevelGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceLoggingLevelGetParamsWithHTTPClient(client *http.Client) *StorageServiceLoggingLevelGetParams { + + return &StorageServiceLoggingLevelGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceLoggingLevelGetParams contains all the parameters to send to the API endpoint +for the storage service logging level get operation typically these are written to a http.Request +*/ +type StorageServiceLoggingLevelGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) WithTimeout(timeout time.Duration) *StorageServiceLoggingLevelGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) WithContext(ctx context.Context) *StorageServiceLoggingLevelGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) WithHTTPClient(client *http.Client) *StorageServiceLoggingLevelGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service logging level get params +func (o *StorageServiceLoggingLevelGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceLoggingLevelGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_responses.go new file mode 100644 index 00000000000..e421ee02358 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceLoggingLevelGetReader is a Reader for the StorageServiceLoggingLevelGet structure. +type StorageServiceLoggingLevelGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceLoggingLevelGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceLoggingLevelGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceLoggingLevelGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceLoggingLevelGetOK creates a StorageServiceLoggingLevelGetOK with default headers values +func NewStorageServiceLoggingLevelGetOK() *StorageServiceLoggingLevelGetOK { + return &StorageServiceLoggingLevelGetOK{} +} + +/*StorageServiceLoggingLevelGetOK handles this case with default header values. + +StorageServiceLoggingLevelGetOK storage service logging level get o k +*/ +type StorageServiceLoggingLevelGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceLoggingLevelGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceLoggingLevelGetOK) 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 +} + +// NewStorageServiceLoggingLevelGetDefault creates a StorageServiceLoggingLevelGetDefault with default headers values +func NewStorageServiceLoggingLevelGetDefault(code int) *StorageServiceLoggingLevelGetDefault { + return &StorageServiceLoggingLevelGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceLoggingLevelGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceLoggingLevelGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service logging level get default response +func (o *StorageServiceLoggingLevelGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceLoggingLevelGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceLoggingLevelGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceLoggingLevelGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_parameters.go new file mode 100644 index 00000000000..6772baf7521 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceLoggingLevelPostParams creates a new StorageServiceLoggingLevelPostParams object +// with the default values initialized. +func NewStorageServiceLoggingLevelPostParams() *StorageServiceLoggingLevelPostParams { + var () + return &StorageServiceLoggingLevelPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceLoggingLevelPostParamsWithTimeout creates a new StorageServiceLoggingLevelPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceLoggingLevelPostParamsWithTimeout(timeout time.Duration) *StorageServiceLoggingLevelPostParams { + var () + return &StorageServiceLoggingLevelPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceLoggingLevelPostParamsWithContext creates a new StorageServiceLoggingLevelPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceLoggingLevelPostParamsWithContext(ctx context.Context) *StorageServiceLoggingLevelPostParams { + var () + return &StorageServiceLoggingLevelPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceLoggingLevelPostParamsWithHTTPClient creates a new StorageServiceLoggingLevelPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceLoggingLevelPostParamsWithHTTPClient(client *http.Client) *StorageServiceLoggingLevelPostParams { + var () + return &StorageServiceLoggingLevelPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceLoggingLevelPostParams contains all the parameters to send to the API endpoint +for the storage service logging level post operation typically these are written to a http.Request +*/ +type StorageServiceLoggingLevelPostParams struct { + + /*ClassQualifier + The logger's classQualifer + + */ + ClassQualifier string + /*Level + The log level + + */ + Level string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) WithTimeout(timeout time.Duration) *StorageServiceLoggingLevelPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) WithContext(ctx context.Context) *StorageServiceLoggingLevelPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) WithHTTPClient(client *http.Client) *StorageServiceLoggingLevelPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClassQualifier adds the classQualifier to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) WithClassQualifier(classQualifier string) *StorageServiceLoggingLevelPostParams { + o.SetClassQualifier(classQualifier) + return o +} + +// SetClassQualifier adds the classQualifier to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) SetClassQualifier(classQualifier string) { + o.ClassQualifier = classQualifier +} + +// WithLevel adds the level to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) WithLevel(level string) *StorageServiceLoggingLevelPostParams { + o.SetLevel(level) + return o +} + +// SetLevel adds the level to the storage service logging level post params +func (o *StorageServiceLoggingLevelPostParams) SetLevel(level string) { + o.Level = level +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceLoggingLevelPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param class_qualifier + qrClassQualifier := o.ClassQualifier + qClassQualifier := qrClassQualifier + if qClassQualifier != "" { + if err := r.SetQueryParam("class_qualifier", qClassQualifier); err != nil { + return err + } + } + + // query param level + qrLevel := o.Level + qLevel := qrLevel + if qLevel != "" { + if err := r.SetQueryParam("level", qLevel); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_responses.go new file mode 100644 index 00000000000..725ffdfb3a2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_logging_level_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceLoggingLevelPostReader is a Reader for the StorageServiceLoggingLevelPost structure. +type StorageServiceLoggingLevelPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceLoggingLevelPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceLoggingLevelPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceLoggingLevelPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceLoggingLevelPostOK creates a StorageServiceLoggingLevelPostOK with default headers values +func NewStorageServiceLoggingLevelPostOK() *StorageServiceLoggingLevelPostOK { + return &StorageServiceLoggingLevelPostOK{} +} + +/*StorageServiceLoggingLevelPostOK handles this case with default header values. + +StorageServiceLoggingLevelPostOK storage service logging level post o k +*/ +type StorageServiceLoggingLevelPostOK struct { +} + +func (o *StorageServiceLoggingLevelPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceLoggingLevelPostDefault creates a StorageServiceLoggingLevelPostDefault with default headers values +func NewStorageServiceLoggingLevelPostDefault(code int) *StorageServiceLoggingLevelPostDefault { + return &StorageServiceLoggingLevelPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceLoggingLevelPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceLoggingLevelPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service logging level post default response +func (o *StorageServiceLoggingLevelPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceLoggingLevelPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceLoggingLevelPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceLoggingLevelPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_parameters.go new file mode 100644 index 00000000000..49ae21a953a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceMetricsExceptionsGetParams creates a new StorageServiceMetricsExceptionsGetParams object +// with the default values initialized. +func NewStorageServiceMetricsExceptionsGetParams() *StorageServiceMetricsExceptionsGetParams { + + return &StorageServiceMetricsExceptionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceMetricsExceptionsGetParamsWithTimeout creates a new StorageServiceMetricsExceptionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceMetricsExceptionsGetParamsWithTimeout(timeout time.Duration) *StorageServiceMetricsExceptionsGetParams { + + return &StorageServiceMetricsExceptionsGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceMetricsExceptionsGetParamsWithContext creates a new StorageServiceMetricsExceptionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceMetricsExceptionsGetParamsWithContext(ctx context.Context) *StorageServiceMetricsExceptionsGetParams { + + return &StorageServiceMetricsExceptionsGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceMetricsExceptionsGetParamsWithHTTPClient creates a new StorageServiceMetricsExceptionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceMetricsExceptionsGetParamsWithHTTPClient(client *http.Client) *StorageServiceMetricsExceptionsGetParams { + + return &StorageServiceMetricsExceptionsGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceMetricsExceptionsGetParams contains all the parameters to send to the API endpoint +for the storage service metrics exceptions get operation typically these are written to a http.Request +*/ +type StorageServiceMetricsExceptionsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) WithTimeout(timeout time.Duration) *StorageServiceMetricsExceptionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) WithContext(ctx context.Context) *StorageServiceMetricsExceptionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) WithHTTPClient(client *http.Client) *StorageServiceMetricsExceptionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service metrics exceptions get params +func (o *StorageServiceMetricsExceptionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceMetricsExceptionsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_responses.go new file mode 100644 index 00000000000..06fd6c6e8ab --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_exceptions_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceMetricsExceptionsGetReader is a Reader for the StorageServiceMetricsExceptionsGet structure. +type StorageServiceMetricsExceptionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceMetricsExceptionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceMetricsExceptionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceMetricsExceptionsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceMetricsExceptionsGetOK creates a StorageServiceMetricsExceptionsGetOK with default headers values +func NewStorageServiceMetricsExceptionsGetOK() *StorageServiceMetricsExceptionsGetOK { + return &StorageServiceMetricsExceptionsGetOK{} +} + +/*StorageServiceMetricsExceptionsGetOK handles this case with default header values. + +StorageServiceMetricsExceptionsGetOK storage service metrics exceptions get o k +*/ +type StorageServiceMetricsExceptionsGetOK struct { + Payload int32 +} + +func (o *StorageServiceMetricsExceptionsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceMetricsExceptionsGetOK) 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 +} + +// NewStorageServiceMetricsExceptionsGetDefault creates a StorageServiceMetricsExceptionsGetDefault with default headers values +func NewStorageServiceMetricsExceptionsGetDefault(code int) *StorageServiceMetricsExceptionsGetDefault { + return &StorageServiceMetricsExceptionsGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceMetricsExceptionsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceMetricsExceptionsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service metrics exceptions get default response +func (o *StorageServiceMetricsExceptionsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceMetricsExceptionsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceMetricsExceptionsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceMetricsExceptionsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_parameters.go new file mode 100644 index 00000000000..d8b479b71ee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceMetricsHintsInProgressGetParams creates a new StorageServiceMetricsHintsInProgressGetParams object +// with the default values initialized. +func NewStorageServiceMetricsHintsInProgressGetParams() *StorageServiceMetricsHintsInProgressGetParams { + + return &StorageServiceMetricsHintsInProgressGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceMetricsHintsInProgressGetParamsWithTimeout creates a new StorageServiceMetricsHintsInProgressGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceMetricsHintsInProgressGetParamsWithTimeout(timeout time.Duration) *StorageServiceMetricsHintsInProgressGetParams { + + return &StorageServiceMetricsHintsInProgressGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceMetricsHintsInProgressGetParamsWithContext creates a new StorageServiceMetricsHintsInProgressGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceMetricsHintsInProgressGetParamsWithContext(ctx context.Context) *StorageServiceMetricsHintsInProgressGetParams { + + return &StorageServiceMetricsHintsInProgressGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceMetricsHintsInProgressGetParamsWithHTTPClient creates a new StorageServiceMetricsHintsInProgressGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceMetricsHintsInProgressGetParamsWithHTTPClient(client *http.Client) *StorageServiceMetricsHintsInProgressGetParams { + + return &StorageServiceMetricsHintsInProgressGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceMetricsHintsInProgressGetParams contains all the parameters to send to the API endpoint +for the storage service metrics hints in progress get operation typically these are written to a http.Request +*/ +type StorageServiceMetricsHintsInProgressGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) WithTimeout(timeout time.Duration) *StorageServiceMetricsHintsInProgressGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) WithContext(ctx context.Context) *StorageServiceMetricsHintsInProgressGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) WithHTTPClient(client *http.Client) *StorageServiceMetricsHintsInProgressGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service metrics hints in progress get params +func (o *StorageServiceMetricsHintsInProgressGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceMetricsHintsInProgressGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_responses.go new file mode 100644 index 00000000000..9e099099a81 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_hints_in_progress_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceMetricsHintsInProgressGetReader is a Reader for the StorageServiceMetricsHintsInProgressGet structure. +type StorageServiceMetricsHintsInProgressGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceMetricsHintsInProgressGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceMetricsHintsInProgressGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceMetricsHintsInProgressGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceMetricsHintsInProgressGetOK creates a StorageServiceMetricsHintsInProgressGetOK with default headers values +func NewStorageServiceMetricsHintsInProgressGetOK() *StorageServiceMetricsHintsInProgressGetOK { + return &StorageServiceMetricsHintsInProgressGetOK{} +} + +/*StorageServiceMetricsHintsInProgressGetOK handles this case with default header values. + +StorageServiceMetricsHintsInProgressGetOK storage service metrics hints in progress get o k +*/ +type StorageServiceMetricsHintsInProgressGetOK struct { + Payload int32 +} + +func (o *StorageServiceMetricsHintsInProgressGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceMetricsHintsInProgressGetOK) 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 +} + +// NewStorageServiceMetricsHintsInProgressGetDefault creates a StorageServiceMetricsHintsInProgressGetDefault with default headers values +func NewStorageServiceMetricsHintsInProgressGetDefault(code int) *StorageServiceMetricsHintsInProgressGetDefault { + return &StorageServiceMetricsHintsInProgressGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceMetricsHintsInProgressGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceMetricsHintsInProgressGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service metrics hints in progress get default response +func (o *StorageServiceMetricsHintsInProgressGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceMetricsHintsInProgressGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceMetricsHintsInProgressGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceMetricsHintsInProgressGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_parameters.go new file mode 100644 index 00000000000..1978593d55f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceMetricsLoadGetParams creates a new StorageServiceMetricsLoadGetParams object +// with the default values initialized. +func NewStorageServiceMetricsLoadGetParams() *StorageServiceMetricsLoadGetParams { + + return &StorageServiceMetricsLoadGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceMetricsLoadGetParamsWithTimeout creates a new StorageServiceMetricsLoadGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceMetricsLoadGetParamsWithTimeout(timeout time.Duration) *StorageServiceMetricsLoadGetParams { + + return &StorageServiceMetricsLoadGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceMetricsLoadGetParamsWithContext creates a new StorageServiceMetricsLoadGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceMetricsLoadGetParamsWithContext(ctx context.Context) *StorageServiceMetricsLoadGetParams { + + return &StorageServiceMetricsLoadGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceMetricsLoadGetParamsWithHTTPClient creates a new StorageServiceMetricsLoadGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceMetricsLoadGetParamsWithHTTPClient(client *http.Client) *StorageServiceMetricsLoadGetParams { + + return &StorageServiceMetricsLoadGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceMetricsLoadGetParams contains all the parameters to send to the API endpoint +for the storage service metrics load get operation typically these are written to a http.Request +*/ +type StorageServiceMetricsLoadGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) WithTimeout(timeout time.Duration) *StorageServiceMetricsLoadGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) WithContext(ctx context.Context) *StorageServiceMetricsLoadGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) WithHTTPClient(client *http.Client) *StorageServiceMetricsLoadGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service metrics load get params +func (o *StorageServiceMetricsLoadGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceMetricsLoadGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_responses.go new file mode 100644 index 00000000000..5855fe7aa33 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_load_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceMetricsLoadGetReader is a Reader for the StorageServiceMetricsLoadGet structure. +type StorageServiceMetricsLoadGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceMetricsLoadGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceMetricsLoadGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceMetricsLoadGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceMetricsLoadGetOK creates a StorageServiceMetricsLoadGetOK with default headers values +func NewStorageServiceMetricsLoadGetOK() *StorageServiceMetricsLoadGetOK { + return &StorageServiceMetricsLoadGetOK{} +} + +/*StorageServiceMetricsLoadGetOK handles this case with default header values. + +StorageServiceMetricsLoadGetOK storage service metrics load get o k +*/ +type StorageServiceMetricsLoadGetOK struct { + Payload int32 +} + +func (o *StorageServiceMetricsLoadGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceMetricsLoadGetOK) 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 +} + +// NewStorageServiceMetricsLoadGetDefault creates a StorageServiceMetricsLoadGetDefault with default headers values +func NewStorageServiceMetricsLoadGetDefault(code int) *StorageServiceMetricsLoadGetDefault { + return &StorageServiceMetricsLoadGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceMetricsLoadGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceMetricsLoadGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service metrics load get default response +func (o *StorageServiceMetricsLoadGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceMetricsLoadGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceMetricsLoadGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceMetricsLoadGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_parameters.go new file mode 100644 index 00000000000..7034d163872 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceMetricsTotalHintsGetParams creates a new StorageServiceMetricsTotalHintsGetParams object +// with the default values initialized. +func NewStorageServiceMetricsTotalHintsGetParams() *StorageServiceMetricsTotalHintsGetParams { + + return &StorageServiceMetricsTotalHintsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceMetricsTotalHintsGetParamsWithTimeout creates a new StorageServiceMetricsTotalHintsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceMetricsTotalHintsGetParamsWithTimeout(timeout time.Duration) *StorageServiceMetricsTotalHintsGetParams { + + return &StorageServiceMetricsTotalHintsGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceMetricsTotalHintsGetParamsWithContext creates a new StorageServiceMetricsTotalHintsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceMetricsTotalHintsGetParamsWithContext(ctx context.Context) *StorageServiceMetricsTotalHintsGetParams { + + return &StorageServiceMetricsTotalHintsGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceMetricsTotalHintsGetParamsWithHTTPClient creates a new StorageServiceMetricsTotalHintsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceMetricsTotalHintsGetParamsWithHTTPClient(client *http.Client) *StorageServiceMetricsTotalHintsGetParams { + + return &StorageServiceMetricsTotalHintsGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceMetricsTotalHintsGetParams contains all the parameters to send to the API endpoint +for the storage service metrics total hints get operation typically these are written to a http.Request +*/ +type StorageServiceMetricsTotalHintsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) WithTimeout(timeout time.Duration) *StorageServiceMetricsTotalHintsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) WithContext(ctx context.Context) *StorageServiceMetricsTotalHintsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) WithHTTPClient(client *http.Client) *StorageServiceMetricsTotalHintsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service metrics total hints get params +func (o *StorageServiceMetricsTotalHintsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceMetricsTotalHintsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_responses.go new file mode 100644 index 00000000000..e5a43aa8e2d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_metrics_total_hints_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceMetricsTotalHintsGetReader is a Reader for the StorageServiceMetricsTotalHintsGet structure. +type StorageServiceMetricsTotalHintsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceMetricsTotalHintsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceMetricsTotalHintsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceMetricsTotalHintsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceMetricsTotalHintsGetOK creates a StorageServiceMetricsTotalHintsGetOK with default headers values +func NewStorageServiceMetricsTotalHintsGetOK() *StorageServiceMetricsTotalHintsGetOK { + return &StorageServiceMetricsTotalHintsGetOK{} +} + +/*StorageServiceMetricsTotalHintsGetOK handles this case with default header values. + +StorageServiceMetricsTotalHintsGetOK storage service metrics total hints get o k +*/ +type StorageServiceMetricsTotalHintsGetOK struct { + Payload int32 +} + +func (o *StorageServiceMetricsTotalHintsGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceMetricsTotalHintsGetOK) 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 +} + +// NewStorageServiceMetricsTotalHintsGetDefault creates a StorageServiceMetricsTotalHintsGetDefault with default headers values +func NewStorageServiceMetricsTotalHintsGetDefault(code int) *StorageServiceMetricsTotalHintsGetDefault { + return &StorageServiceMetricsTotalHintsGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceMetricsTotalHintsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceMetricsTotalHintsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service metrics total hints get default response +func (o *StorageServiceMetricsTotalHintsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceMetricsTotalHintsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceMetricsTotalHintsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceMetricsTotalHintsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_parameters.go new file mode 100644 index 00000000000..17a13885592 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceMovePostParams creates a new StorageServiceMovePostParams object +// with the default values initialized. +func NewStorageServiceMovePostParams() *StorageServiceMovePostParams { + var () + return &StorageServiceMovePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceMovePostParamsWithTimeout creates a new StorageServiceMovePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceMovePostParamsWithTimeout(timeout time.Duration) *StorageServiceMovePostParams { + var () + return &StorageServiceMovePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceMovePostParamsWithContext creates a new StorageServiceMovePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceMovePostParamsWithContext(ctx context.Context) *StorageServiceMovePostParams { + var () + return &StorageServiceMovePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceMovePostParamsWithHTTPClient creates a new StorageServiceMovePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceMovePostParamsWithHTTPClient(client *http.Client) *StorageServiceMovePostParams { + var () + return &StorageServiceMovePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceMovePostParams contains all the parameters to send to the API endpoint +for the storage service move post operation typically these are written to a http.Request +*/ +type StorageServiceMovePostParams struct { + + /*NewToken + token to move this node to + + */ + NewToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service move post params +func (o *StorageServiceMovePostParams) WithTimeout(timeout time.Duration) *StorageServiceMovePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service move post params +func (o *StorageServiceMovePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service move post params +func (o *StorageServiceMovePostParams) WithContext(ctx context.Context) *StorageServiceMovePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service move post params +func (o *StorageServiceMovePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service move post params +func (o *StorageServiceMovePostParams) WithHTTPClient(client *http.Client) *StorageServiceMovePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service move post params +func (o *StorageServiceMovePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNewToken adds the newToken to the storage service move post params +func (o *StorageServiceMovePostParams) WithNewToken(newToken string) *StorageServiceMovePostParams { + o.SetNewToken(newToken) + return o +} + +// SetNewToken adds the newToken to the storage service move post params +func (o *StorageServiceMovePostParams) SetNewToken(newToken string) { + o.NewToken = newToken +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceMovePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param new_token + qrNewToken := o.NewToken + qNewToken := qrNewToken + if qNewToken != "" { + if err := r.SetQueryParam("new_token", qNewToken); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_responses.go new file mode 100644 index 00000000000..ef90063894c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_move_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceMovePostReader is a Reader for the StorageServiceMovePost structure. +type StorageServiceMovePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceMovePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceMovePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceMovePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceMovePostOK creates a StorageServiceMovePostOK with default headers values +func NewStorageServiceMovePostOK() *StorageServiceMovePostOK { + return &StorageServiceMovePostOK{} +} + +/*StorageServiceMovePostOK handles this case with default header values. + +StorageServiceMovePostOK storage service move post o k +*/ +type StorageServiceMovePostOK struct { +} + +func (o *StorageServiceMovePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceMovePostDefault creates a StorageServiceMovePostDefault with default headers values +func NewStorageServiceMovePostDefault(code int) *StorageServiceMovePostDefault { + return &StorageServiceMovePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceMovePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceMovePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service move post default response +func (o *StorageServiceMovePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceMovePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceMovePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceMovePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_parameters.go new file mode 100644 index 00000000000..fc986f8cef2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNativeTransportDeleteParams creates a new StorageServiceNativeTransportDeleteParams object +// with the default values initialized. +func NewStorageServiceNativeTransportDeleteParams() *StorageServiceNativeTransportDeleteParams { + + return &StorageServiceNativeTransportDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNativeTransportDeleteParamsWithTimeout creates a new StorageServiceNativeTransportDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNativeTransportDeleteParamsWithTimeout(timeout time.Duration) *StorageServiceNativeTransportDeleteParams { + + return &StorageServiceNativeTransportDeleteParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNativeTransportDeleteParamsWithContext creates a new StorageServiceNativeTransportDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNativeTransportDeleteParamsWithContext(ctx context.Context) *StorageServiceNativeTransportDeleteParams { + + return &StorageServiceNativeTransportDeleteParams{ + + Context: ctx, + } +} + +// NewStorageServiceNativeTransportDeleteParamsWithHTTPClient creates a new StorageServiceNativeTransportDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNativeTransportDeleteParamsWithHTTPClient(client *http.Client) *StorageServiceNativeTransportDeleteParams { + + return &StorageServiceNativeTransportDeleteParams{ + HTTPClient: client, + } +} + +/*StorageServiceNativeTransportDeleteParams contains all the parameters to send to the API endpoint +for the storage service native transport delete operation typically these are written to a http.Request +*/ +type StorageServiceNativeTransportDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) WithTimeout(timeout time.Duration) *StorageServiceNativeTransportDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) WithContext(ctx context.Context) *StorageServiceNativeTransportDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) WithHTTPClient(client *http.Client) *StorageServiceNativeTransportDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service native transport delete params +func (o *StorageServiceNativeTransportDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNativeTransportDeleteParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_responses.go new file mode 100644 index 00000000000..53170bbdcef --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNativeTransportDeleteReader is a Reader for the StorageServiceNativeTransportDelete structure. +type StorageServiceNativeTransportDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNativeTransportDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNativeTransportDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNativeTransportDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNativeTransportDeleteOK creates a StorageServiceNativeTransportDeleteOK with default headers values +func NewStorageServiceNativeTransportDeleteOK() *StorageServiceNativeTransportDeleteOK { + return &StorageServiceNativeTransportDeleteOK{} +} + +/*StorageServiceNativeTransportDeleteOK handles this case with default header values. + +StorageServiceNativeTransportDeleteOK storage service native transport delete o k +*/ +type StorageServiceNativeTransportDeleteOK struct { +} + +func (o *StorageServiceNativeTransportDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceNativeTransportDeleteDefault creates a StorageServiceNativeTransportDeleteDefault with default headers values +func NewStorageServiceNativeTransportDeleteDefault(code int) *StorageServiceNativeTransportDeleteDefault { + return &StorageServiceNativeTransportDeleteDefault{ + _statusCode: code, + } +} + +/*StorageServiceNativeTransportDeleteDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNativeTransportDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service native transport delete default response +func (o *StorageServiceNativeTransportDeleteDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNativeTransportDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNativeTransportDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNativeTransportDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_parameters.go new file mode 100644 index 00000000000..653e11166c7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNativeTransportGetParams creates a new StorageServiceNativeTransportGetParams object +// with the default values initialized. +func NewStorageServiceNativeTransportGetParams() *StorageServiceNativeTransportGetParams { + + return &StorageServiceNativeTransportGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNativeTransportGetParamsWithTimeout creates a new StorageServiceNativeTransportGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNativeTransportGetParamsWithTimeout(timeout time.Duration) *StorageServiceNativeTransportGetParams { + + return &StorageServiceNativeTransportGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNativeTransportGetParamsWithContext creates a new StorageServiceNativeTransportGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNativeTransportGetParamsWithContext(ctx context.Context) *StorageServiceNativeTransportGetParams { + + return &StorageServiceNativeTransportGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceNativeTransportGetParamsWithHTTPClient creates a new StorageServiceNativeTransportGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNativeTransportGetParamsWithHTTPClient(client *http.Client) *StorageServiceNativeTransportGetParams { + + return &StorageServiceNativeTransportGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceNativeTransportGetParams contains all the parameters to send to the API endpoint +for the storage service native transport get operation typically these are written to a http.Request +*/ +type StorageServiceNativeTransportGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) WithTimeout(timeout time.Duration) *StorageServiceNativeTransportGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) WithContext(ctx context.Context) *StorageServiceNativeTransportGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) WithHTTPClient(client *http.Client) *StorageServiceNativeTransportGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service native transport get params +func (o *StorageServiceNativeTransportGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNativeTransportGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_responses.go new file mode 100644 index 00000000000..dcfc7ed993b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNativeTransportGetReader is a Reader for the StorageServiceNativeTransportGet structure. +type StorageServiceNativeTransportGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNativeTransportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNativeTransportGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNativeTransportGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNativeTransportGetOK creates a StorageServiceNativeTransportGetOK with default headers values +func NewStorageServiceNativeTransportGetOK() *StorageServiceNativeTransportGetOK { + return &StorageServiceNativeTransportGetOK{} +} + +/*StorageServiceNativeTransportGetOK handles this case with default header values. + +StorageServiceNativeTransportGetOK storage service native transport get o k +*/ +type StorageServiceNativeTransportGetOK struct { + Payload bool +} + +func (o *StorageServiceNativeTransportGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceNativeTransportGetOK) 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 +} + +// NewStorageServiceNativeTransportGetDefault creates a StorageServiceNativeTransportGetDefault with default headers values +func NewStorageServiceNativeTransportGetDefault(code int) *StorageServiceNativeTransportGetDefault { + return &StorageServiceNativeTransportGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceNativeTransportGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNativeTransportGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service native transport get default response +func (o *StorageServiceNativeTransportGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNativeTransportGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNativeTransportGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNativeTransportGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_parameters.go new file mode 100644 index 00000000000..83e203b2ccc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNativeTransportPostParams creates a new StorageServiceNativeTransportPostParams object +// with the default values initialized. +func NewStorageServiceNativeTransportPostParams() *StorageServiceNativeTransportPostParams { + + return &StorageServiceNativeTransportPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNativeTransportPostParamsWithTimeout creates a new StorageServiceNativeTransportPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNativeTransportPostParamsWithTimeout(timeout time.Duration) *StorageServiceNativeTransportPostParams { + + return &StorageServiceNativeTransportPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNativeTransportPostParamsWithContext creates a new StorageServiceNativeTransportPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNativeTransportPostParamsWithContext(ctx context.Context) *StorageServiceNativeTransportPostParams { + + return &StorageServiceNativeTransportPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceNativeTransportPostParamsWithHTTPClient creates a new StorageServiceNativeTransportPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNativeTransportPostParamsWithHTTPClient(client *http.Client) *StorageServiceNativeTransportPostParams { + + return &StorageServiceNativeTransportPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceNativeTransportPostParams contains all the parameters to send to the API endpoint +for the storage service native transport post operation typically these are written to a http.Request +*/ +type StorageServiceNativeTransportPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) WithTimeout(timeout time.Duration) *StorageServiceNativeTransportPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) WithContext(ctx context.Context) *StorageServiceNativeTransportPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) WithHTTPClient(client *http.Client) *StorageServiceNativeTransportPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service native transport post params +func (o *StorageServiceNativeTransportPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNativeTransportPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_responses.go new file mode 100644 index 00000000000..06a9cbaf947 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_native_transport_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNativeTransportPostReader is a Reader for the StorageServiceNativeTransportPost structure. +type StorageServiceNativeTransportPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNativeTransportPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNativeTransportPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNativeTransportPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNativeTransportPostOK creates a StorageServiceNativeTransportPostOK with default headers values +func NewStorageServiceNativeTransportPostOK() *StorageServiceNativeTransportPostOK { + return &StorageServiceNativeTransportPostOK{} +} + +/*StorageServiceNativeTransportPostOK handles this case with default header values. + +StorageServiceNativeTransportPostOK storage service native transport post o k +*/ +type StorageServiceNativeTransportPostOK struct { +} + +func (o *StorageServiceNativeTransportPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceNativeTransportPostDefault creates a StorageServiceNativeTransportPostDefault with default headers values +func NewStorageServiceNativeTransportPostDefault(code int) *StorageServiceNativeTransportPostDefault { + return &StorageServiceNativeTransportPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceNativeTransportPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNativeTransportPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service native transport post default response +func (o *StorageServiceNativeTransportPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNativeTransportPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNativeTransportPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNativeTransportPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..0cd4fadbbb1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNaturalEndpointsByKeyspaceGetParams creates a new StorageServiceNaturalEndpointsByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceNaturalEndpointsByKeyspaceGetParams() *StorageServiceNaturalEndpointsByKeyspaceGetParams { + var () + return &StorageServiceNaturalEndpointsByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithTimeout creates a new StorageServiceNaturalEndpointsByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + var () + return &StorageServiceNaturalEndpointsByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithContext creates a new StorageServiceNaturalEndpointsByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + var () + return &StorageServiceNaturalEndpointsByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceNaturalEndpointsByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNaturalEndpointsByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + var () + return &StorageServiceNaturalEndpointsByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceNaturalEndpointsByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service natural endpoints by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceNaturalEndpointsByKeyspaceGetParams struct { + + /*Cf + Column family name + + */ + Cf string + /*Key + key for which we need to find the endpoint return value - the endpoint responsible for this key + + */ + Key string + /*Keyspace + The keyspace to query about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithCf(cf string) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetCf(cf string) { + o.Cf = cf +} + +// WithKey adds the key to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithKey(key string) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetKey(key) + return o +} + +// SetKey adds the key to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetKey(key string) { + o.Key = key +} + +// WithKeyspace adds the keyspace to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceNaturalEndpointsByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service natural endpoints by keyspace get params +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNaturalEndpointsByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cf + qrCf := o.Cf + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + // query param key + qrKey := o.Key + qKey := qrKey + if qKey != "" { + if err := r.SetQueryParam("key", qKey); err != nil { + return err + } + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_responses.go new file mode 100644 index 00000000000..ee6be23b2f7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_natural_endpoints_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNaturalEndpointsByKeyspaceGetReader is a Reader for the StorageServiceNaturalEndpointsByKeyspaceGet structure. +type StorageServiceNaturalEndpointsByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNaturalEndpointsByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNaturalEndpointsByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNaturalEndpointsByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNaturalEndpointsByKeyspaceGetOK creates a StorageServiceNaturalEndpointsByKeyspaceGetOK with default headers values +func NewStorageServiceNaturalEndpointsByKeyspaceGetOK() *StorageServiceNaturalEndpointsByKeyspaceGetOK { + return &StorageServiceNaturalEndpointsByKeyspaceGetOK{} +} + +/*StorageServiceNaturalEndpointsByKeyspaceGetOK handles this case with default header values. + +StorageServiceNaturalEndpointsByKeyspaceGetOK storage service natural endpoints by keyspace get o k +*/ +type StorageServiceNaturalEndpointsByKeyspaceGetOK struct { + Payload []string +} + +func (o *StorageServiceNaturalEndpointsByKeyspaceGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceNaturalEndpointsByKeyspaceGetOK) 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 +} + +// NewStorageServiceNaturalEndpointsByKeyspaceGetDefault creates a StorageServiceNaturalEndpointsByKeyspaceGetDefault with default headers values +func NewStorageServiceNaturalEndpointsByKeyspaceGetDefault(code int) *StorageServiceNaturalEndpointsByKeyspaceGetDefault { + return &StorageServiceNaturalEndpointsByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceNaturalEndpointsByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNaturalEndpointsByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service natural endpoints by keyspace get default response +func (o *StorageServiceNaturalEndpointsByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNaturalEndpointsByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNaturalEndpointsByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNaturalEndpointsByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_parameters.go new file mode 100644 index 00000000000..e5aaa6396cf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNodesJoiningGetParams creates a new StorageServiceNodesJoiningGetParams object +// with the default values initialized. +func NewStorageServiceNodesJoiningGetParams() *StorageServiceNodesJoiningGetParams { + + return &StorageServiceNodesJoiningGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNodesJoiningGetParamsWithTimeout creates a new StorageServiceNodesJoiningGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNodesJoiningGetParamsWithTimeout(timeout time.Duration) *StorageServiceNodesJoiningGetParams { + + return &StorageServiceNodesJoiningGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNodesJoiningGetParamsWithContext creates a new StorageServiceNodesJoiningGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNodesJoiningGetParamsWithContext(ctx context.Context) *StorageServiceNodesJoiningGetParams { + + return &StorageServiceNodesJoiningGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceNodesJoiningGetParamsWithHTTPClient creates a new StorageServiceNodesJoiningGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNodesJoiningGetParamsWithHTTPClient(client *http.Client) *StorageServiceNodesJoiningGetParams { + + return &StorageServiceNodesJoiningGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceNodesJoiningGetParams contains all the parameters to send to the API endpoint +for the storage service nodes joining get operation typically these are written to a http.Request +*/ +type StorageServiceNodesJoiningGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) WithTimeout(timeout time.Duration) *StorageServiceNodesJoiningGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) WithContext(ctx context.Context) *StorageServiceNodesJoiningGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) WithHTTPClient(client *http.Client) *StorageServiceNodesJoiningGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service nodes joining get params +func (o *StorageServiceNodesJoiningGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNodesJoiningGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_responses.go new file mode 100644 index 00000000000..7844ecf4a29 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_joining_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNodesJoiningGetReader is a Reader for the StorageServiceNodesJoiningGet structure. +type StorageServiceNodesJoiningGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNodesJoiningGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNodesJoiningGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNodesJoiningGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNodesJoiningGetOK creates a StorageServiceNodesJoiningGetOK with default headers values +func NewStorageServiceNodesJoiningGetOK() *StorageServiceNodesJoiningGetOK { + return &StorageServiceNodesJoiningGetOK{} +} + +/*StorageServiceNodesJoiningGetOK handles this case with default header values. + +StorageServiceNodesJoiningGetOK storage service nodes joining get o k +*/ +type StorageServiceNodesJoiningGetOK struct { + Payload []string +} + +func (o *StorageServiceNodesJoiningGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceNodesJoiningGetOK) 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 +} + +// NewStorageServiceNodesJoiningGetDefault creates a StorageServiceNodesJoiningGetDefault with default headers values +func NewStorageServiceNodesJoiningGetDefault(code int) *StorageServiceNodesJoiningGetDefault { + return &StorageServiceNodesJoiningGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceNodesJoiningGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNodesJoiningGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service nodes joining get default response +func (o *StorageServiceNodesJoiningGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNodesJoiningGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNodesJoiningGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNodesJoiningGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_parameters.go new file mode 100644 index 00000000000..5b649231f36 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNodesLeavingGetParams creates a new StorageServiceNodesLeavingGetParams object +// with the default values initialized. +func NewStorageServiceNodesLeavingGetParams() *StorageServiceNodesLeavingGetParams { + + return &StorageServiceNodesLeavingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNodesLeavingGetParamsWithTimeout creates a new StorageServiceNodesLeavingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNodesLeavingGetParamsWithTimeout(timeout time.Duration) *StorageServiceNodesLeavingGetParams { + + return &StorageServiceNodesLeavingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNodesLeavingGetParamsWithContext creates a new StorageServiceNodesLeavingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNodesLeavingGetParamsWithContext(ctx context.Context) *StorageServiceNodesLeavingGetParams { + + return &StorageServiceNodesLeavingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceNodesLeavingGetParamsWithHTTPClient creates a new StorageServiceNodesLeavingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNodesLeavingGetParamsWithHTTPClient(client *http.Client) *StorageServiceNodesLeavingGetParams { + + return &StorageServiceNodesLeavingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceNodesLeavingGetParams contains all the parameters to send to the API endpoint +for the storage service nodes leaving get operation typically these are written to a http.Request +*/ +type StorageServiceNodesLeavingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) WithTimeout(timeout time.Duration) *StorageServiceNodesLeavingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) WithContext(ctx context.Context) *StorageServiceNodesLeavingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) WithHTTPClient(client *http.Client) *StorageServiceNodesLeavingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service nodes leaving get params +func (o *StorageServiceNodesLeavingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNodesLeavingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_responses.go new file mode 100644 index 00000000000..1a23da26acd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_leaving_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNodesLeavingGetReader is a Reader for the StorageServiceNodesLeavingGet structure. +type StorageServiceNodesLeavingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNodesLeavingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNodesLeavingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNodesLeavingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNodesLeavingGetOK creates a StorageServiceNodesLeavingGetOK with default headers values +func NewStorageServiceNodesLeavingGetOK() *StorageServiceNodesLeavingGetOK { + return &StorageServiceNodesLeavingGetOK{} +} + +/*StorageServiceNodesLeavingGetOK handles this case with default header values. + +StorageServiceNodesLeavingGetOK storage service nodes leaving get o k +*/ +type StorageServiceNodesLeavingGetOK struct { + Payload []string +} + +func (o *StorageServiceNodesLeavingGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceNodesLeavingGetOK) 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 +} + +// NewStorageServiceNodesLeavingGetDefault creates a StorageServiceNodesLeavingGetDefault with default headers values +func NewStorageServiceNodesLeavingGetDefault(code int) *StorageServiceNodesLeavingGetDefault { + return &StorageServiceNodesLeavingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceNodesLeavingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNodesLeavingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service nodes leaving get default response +func (o *StorageServiceNodesLeavingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNodesLeavingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNodesLeavingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNodesLeavingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_parameters.go new file mode 100644 index 00000000000..3bfff5d9891 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceNodesMovingGetParams creates a new StorageServiceNodesMovingGetParams object +// with the default values initialized. +func NewStorageServiceNodesMovingGetParams() *StorageServiceNodesMovingGetParams { + + return &StorageServiceNodesMovingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceNodesMovingGetParamsWithTimeout creates a new StorageServiceNodesMovingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceNodesMovingGetParamsWithTimeout(timeout time.Duration) *StorageServiceNodesMovingGetParams { + + return &StorageServiceNodesMovingGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceNodesMovingGetParamsWithContext creates a new StorageServiceNodesMovingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceNodesMovingGetParamsWithContext(ctx context.Context) *StorageServiceNodesMovingGetParams { + + return &StorageServiceNodesMovingGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceNodesMovingGetParamsWithHTTPClient creates a new StorageServiceNodesMovingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceNodesMovingGetParamsWithHTTPClient(client *http.Client) *StorageServiceNodesMovingGetParams { + + return &StorageServiceNodesMovingGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceNodesMovingGetParams contains all the parameters to send to the API endpoint +for the storage service nodes moving get operation typically these are written to a http.Request +*/ +type StorageServiceNodesMovingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) WithTimeout(timeout time.Duration) *StorageServiceNodesMovingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) WithContext(ctx context.Context) *StorageServiceNodesMovingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) WithHTTPClient(client *http.Client) *StorageServiceNodesMovingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service nodes moving get params +func (o *StorageServiceNodesMovingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceNodesMovingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_responses.go new file mode 100644 index 00000000000..d896bb42739 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_nodes_moving_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceNodesMovingGetReader is a Reader for the StorageServiceNodesMovingGet structure. +type StorageServiceNodesMovingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceNodesMovingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceNodesMovingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceNodesMovingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceNodesMovingGetOK creates a StorageServiceNodesMovingGetOK with default headers values +func NewStorageServiceNodesMovingGetOK() *StorageServiceNodesMovingGetOK { + return &StorageServiceNodesMovingGetOK{} +} + +/*StorageServiceNodesMovingGetOK handles this case with default header values. + +StorageServiceNodesMovingGetOK storage service nodes moving get o k +*/ +type StorageServiceNodesMovingGetOK struct { + Payload []string +} + +func (o *StorageServiceNodesMovingGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceNodesMovingGetOK) 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 +} + +// NewStorageServiceNodesMovingGetDefault creates a StorageServiceNodesMovingGetDefault with default headers values +func NewStorageServiceNodesMovingGetDefault(code int) *StorageServiceNodesMovingGetDefault { + return &StorageServiceNodesMovingGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceNodesMovingGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceNodesMovingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service nodes moving get default response +func (o *StorageServiceNodesMovingGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceNodesMovingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceNodesMovingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceNodesMovingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_parameters.go new file mode 100644 index 00000000000..635fad31dd7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceOperationModeGetParams creates a new StorageServiceOperationModeGetParams object +// with the default values initialized. +func NewStorageServiceOperationModeGetParams() *StorageServiceOperationModeGetParams { + + return &StorageServiceOperationModeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceOperationModeGetParamsWithTimeout creates a new StorageServiceOperationModeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceOperationModeGetParamsWithTimeout(timeout time.Duration) *StorageServiceOperationModeGetParams { + + return &StorageServiceOperationModeGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceOperationModeGetParamsWithContext creates a new StorageServiceOperationModeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceOperationModeGetParamsWithContext(ctx context.Context) *StorageServiceOperationModeGetParams { + + return &StorageServiceOperationModeGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceOperationModeGetParamsWithHTTPClient creates a new StorageServiceOperationModeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceOperationModeGetParamsWithHTTPClient(client *http.Client) *StorageServiceOperationModeGetParams { + + return &StorageServiceOperationModeGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceOperationModeGetParams contains all the parameters to send to the API endpoint +for the storage service operation mode get operation typically these are written to a http.Request +*/ +type StorageServiceOperationModeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) WithTimeout(timeout time.Duration) *StorageServiceOperationModeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) WithContext(ctx context.Context) *StorageServiceOperationModeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) WithHTTPClient(client *http.Client) *StorageServiceOperationModeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service operation mode get params +func (o *StorageServiceOperationModeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceOperationModeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_responses.go new file mode 100644 index 00000000000..df5e743ab1a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_operation_mode_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceOperationModeGetReader is a Reader for the StorageServiceOperationModeGet structure. +type StorageServiceOperationModeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceOperationModeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceOperationModeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceOperationModeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceOperationModeGetOK creates a StorageServiceOperationModeGetOK with default headers values +func NewStorageServiceOperationModeGetOK() *StorageServiceOperationModeGetOK { + return &StorageServiceOperationModeGetOK{} +} + +/*StorageServiceOperationModeGetOK handles this case with default header values. + +StorageServiceOperationModeGetOK storage service operation mode get o k +*/ +type StorageServiceOperationModeGetOK struct { + Payload string +} + +func (o *StorageServiceOperationModeGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceOperationModeGetOK) 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 +} + +// NewStorageServiceOperationModeGetDefault creates a StorageServiceOperationModeGetDefault with default headers values +func NewStorageServiceOperationModeGetDefault(code int) *StorageServiceOperationModeGetDefault { + return &StorageServiceOperationModeGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceOperationModeGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceOperationModeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service operation mode get default response +func (o *StorageServiceOperationModeGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceOperationModeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceOperationModeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceOperationModeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..c00c30cb5d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceOwnershipByKeyspaceGetParams creates a new StorageServiceOwnershipByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceOwnershipByKeyspaceGetParams() *StorageServiceOwnershipByKeyspaceGetParams { + var () + return &StorageServiceOwnershipByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceOwnershipByKeyspaceGetParamsWithTimeout creates a new StorageServiceOwnershipByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceOwnershipByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceOwnershipByKeyspaceGetParams { + var () + return &StorageServiceOwnershipByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceOwnershipByKeyspaceGetParamsWithContext creates a new StorageServiceOwnershipByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceOwnershipByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceOwnershipByKeyspaceGetParams { + var () + return &StorageServiceOwnershipByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceOwnershipByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceOwnershipByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceOwnershipByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceOwnershipByKeyspaceGetParams { + var () + return &StorageServiceOwnershipByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceOwnershipByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service ownership by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceOwnershipByKeyspaceGetParams struct { + + /*Keyspace + The keyspace to fetch information about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceOwnershipByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceOwnershipByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceOwnershipByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKeyspace adds the keyspace to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceOwnershipByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service ownership by keyspace get params +func (o *StorageServiceOwnershipByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceOwnershipByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_responses.go new file mode 100644 index 00000000000..f1192a05c72 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceOwnershipByKeyspaceGetReader is a Reader for the StorageServiceOwnershipByKeyspaceGet structure. +type StorageServiceOwnershipByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceOwnershipByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceOwnershipByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceOwnershipByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceOwnershipByKeyspaceGetOK creates a StorageServiceOwnershipByKeyspaceGetOK with default headers values +func NewStorageServiceOwnershipByKeyspaceGetOK() *StorageServiceOwnershipByKeyspaceGetOK { + return &StorageServiceOwnershipByKeyspaceGetOK{} +} + +/*StorageServiceOwnershipByKeyspaceGetOK handles this case with default header values. + +StorageServiceOwnershipByKeyspaceGetOK storage service ownership by keyspace get o k +*/ +type StorageServiceOwnershipByKeyspaceGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceOwnershipByKeyspaceGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceOwnershipByKeyspaceGetOK) 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 +} + +// NewStorageServiceOwnershipByKeyspaceGetDefault creates a StorageServiceOwnershipByKeyspaceGetDefault with default headers values +func NewStorageServiceOwnershipByKeyspaceGetDefault(code int) *StorageServiceOwnershipByKeyspaceGetDefault { + return &StorageServiceOwnershipByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceOwnershipByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceOwnershipByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service ownership by keyspace get default response +func (o *StorageServiceOwnershipByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceOwnershipByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceOwnershipByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceOwnershipByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_parameters.go new file mode 100644 index 00000000000..2fb5631e9a7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceOwnershipGetParams creates a new StorageServiceOwnershipGetParams object +// with the default values initialized. +func NewStorageServiceOwnershipGetParams() *StorageServiceOwnershipGetParams { + + return &StorageServiceOwnershipGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceOwnershipGetParamsWithTimeout creates a new StorageServiceOwnershipGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceOwnershipGetParamsWithTimeout(timeout time.Duration) *StorageServiceOwnershipGetParams { + + return &StorageServiceOwnershipGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceOwnershipGetParamsWithContext creates a new StorageServiceOwnershipGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceOwnershipGetParamsWithContext(ctx context.Context) *StorageServiceOwnershipGetParams { + + return &StorageServiceOwnershipGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceOwnershipGetParamsWithHTTPClient creates a new StorageServiceOwnershipGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceOwnershipGetParamsWithHTTPClient(client *http.Client) *StorageServiceOwnershipGetParams { + + return &StorageServiceOwnershipGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceOwnershipGetParams contains all the parameters to send to the API endpoint +for the storage service ownership get operation typically these are written to a http.Request +*/ +type StorageServiceOwnershipGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) WithTimeout(timeout time.Duration) *StorageServiceOwnershipGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) WithContext(ctx context.Context) *StorageServiceOwnershipGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) WithHTTPClient(client *http.Client) *StorageServiceOwnershipGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service ownership get params +func (o *StorageServiceOwnershipGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceOwnershipGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_responses.go new file mode 100644 index 00000000000..2f8faeb9412 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_ownership_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceOwnershipGetReader is a Reader for the StorageServiceOwnershipGet structure. +type StorageServiceOwnershipGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceOwnershipGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceOwnershipGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceOwnershipGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceOwnershipGetOK creates a StorageServiceOwnershipGetOK with default headers values +func NewStorageServiceOwnershipGetOK() *StorageServiceOwnershipGetOK { + return &StorageServiceOwnershipGetOK{} +} + +/*StorageServiceOwnershipGetOK handles this case with default header values. + +StorageServiceOwnershipGetOK storage service ownership get o k +*/ +type StorageServiceOwnershipGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceOwnershipGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceOwnershipGetOK) 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 +} + +// NewStorageServiceOwnershipGetDefault creates a StorageServiceOwnershipGetDefault with default headers values +func NewStorageServiceOwnershipGetDefault(code int) *StorageServiceOwnershipGetDefault { + return &StorageServiceOwnershipGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceOwnershipGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceOwnershipGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service ownership get default response +func (o *StorageServiceOwnershipGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceOwnershipGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceOwnershipGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceOwnershipGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_parameters.go new file mode 100644 index 00000000000..7e41e42366d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServicePartitionerNameGetParams creates a new StorageServicePartitionerNameGetParams object +// with the default values initialized. +func NewStorageServicePartitionerNameGetParams() *StorageServicePartitionerNameGetParams { + + return &StorageServicePartitionerNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServicePartitionerNameGetParamsWithTimeout creates a new StorageServicePartitionerNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServicePartitionerNameGetParamsWithTimeout(timeout time.Duration) *StorageServicePartitionerNameGetParams { + + return &StorageServicePartitionerNameGetParams{ + + timeout: timeout, + } +} + +// NewStorageServicePartitionerNameGetParamsWithContext creates a new StorageServicePartitionerNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServicePartitionerNameGetParamsWithContext(ctx context.Context) *StorageServicePartitionerNameGetParams { + + return &StorageServicePartitionerNameGetParams{ + + Context: ctx, + } +} + +// NewStorageServicePartitionerNameGetParamsWithHTTPClient creates a new StorageServicePartitionerNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServicePartitionerNameGetParamsWithHTTPClient(client *http.Client) *StorageServicePartitionerNameGetParams { + + return &StorageServicePartitionerNameGetParams{ + HTTPClient: client, + } +} + +/*StorageServicePartitionerNameGetParams contains all the parameters to send to the API endpoint +for the storage service partitioner name get operation typically these are written to a http.Request +*/ +type StorageServicePartitionerNameGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) WithTimeout(timeout time.Duration) *StorageServicePartitionerNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) WithContext(ctx context.Context) *StorageServicePartitionerNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) WithHTTPClient(client *http.Client) *StorageServicePartitionerNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service partitioner name get params +func (o *StorageServicePartitionerNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServicePartitionerNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_responses.go new file mode 100644 index 00000000000..9fd879d6515 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_partitioner_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServicePartitionerNameGetReader is a Reader for the StorageServicePartitionerNameGet structure. +type StorageServicePartitionerNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServicePartitionerNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServicePartitionerNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServicePartitionerNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServicePartitionerNameGetOK creates a StorageServicePartitionerNameGetOK with default headers values +func NewStorageServicePartitionerNameGetOK() *StorageServicePartitionerNameGetOK { + return &StorageServicePartitionerNameGetOK{} +} + +/*StorageServicePartitionerNameGetOK handles this case with default header values. + +StorageServicePartitionerNameGetOK storage service partitioner name get o k +*/ +type StorageServicePartitionerNameGetOK struct { + Payload string +} + +func (o *StorageServicePartitionerNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServicePartitionerNameGetOK) 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 +} + +// NewStorageServicePartitionerNameGetDefault creates a StorageServicePartitionerNameGetDefault with default headers values +func NewStorageServicePartitionerNameGetDefault(code int) *StorageServicePartitionerNameGetDefault { + return &StorageServicePartitionerNameGetDefault{ + _statusCode: code, + } +} + +/*StorageServicePartitionerNameGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServicePartitionerNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service partitioner name get default response +func (o *StorageServicePartitionerNameGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServicePartitionerNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServicePartitionerNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServicePartitionerNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..3c1538d1b7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServicePendingRangeByKeyspaceGetParams creates a new StorageServicePendingRangeByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServicePendingRangeByKeyspaceGetParams() *StorageServicePendingRangeByKeyspaceGetParams { + var () + return &StorageServicePendingRangeByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServicePendingRangeByKeyspaceGetParamsWithTimeout creates a new StorageServicePendingRangeByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServicePendingRangeByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServicePendingRangeByKeyspaceGetParams { + var () + return &StorageServicePendingRangeByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServicePendingRangeByKeyspaceGetParamsWithContext creates a new StorageServicePendingRangeByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServicePendingRangeByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServicePendingRangeByKeyspaceGetParams { + var () + return &StorageServicePendingRangeByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServicePendingRangeByKeyspaceGetParamsWithHTTPClient creates a new StorageServicePendingRangeByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServicePendingRangeByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServicePendingRangeByKeyspaceGetParams { + var () + return &StorageServicePendingRangeByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServicePendingRangeByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service pending range by keyspace get operation typically these are written to a http.Request +*/ +type StorageServicePendingRangeByKeyspaceGetParams struct { + + /*Keyspace + The keyspace to query about + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServicePendingRangeByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServicePendingRangeByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServicePendingRangeByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKeyspace adds the keyspace to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServicePendingRangeByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service pending range by keyspace get params +func (o *StorageServicePendingRangeByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServicePendingRangeByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_responses.go new file mode 100644 index 00000000000..c8553679de5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_pending_range_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServicePendingRangeByKeyspaceGetReader is a Reader for the StorageServicePendingRangeByKeyspaceGet structure. +type StorageServicePendingRangeByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServicePendingRangeByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServicePendingRangeByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServicePendingRangeByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServicePendingRangeByKeyspaceGetOK creates a StorageServicePendingRangeByKeyspaceGetOK with default headers values +func NewStorageServicePendingRangeByKeyspaceGetOK() *StorageServicePendingRangeByKeyspaceGetOK { + return &StorageServicePendingRangeByKeyspaceGetOK{} +} + +/*StorageServicePendingRangeByKeyspaceGetOK handles this case with default header values. + +StorageServicePendingRangeByKeyspaceGetOK storage service pending range by keyspace get o k +*/ +type StorageServicePendingRangeByKeyspaceGetOK struct { + Payload []*models.MaplistMapper +} + +func (o *StorageServicePendingRangeByKeyspaceGetOK) GetPayload() []*models.MaplistMapper { + return o.Payload +} + +func (o *StorageServicePendingRangeByKeyspaceGetOK) 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 +} + +// NewStorageServicePendingRangeByKeyspaceGetDefault creates a StorageServicePendingRangeByKeyspaceGetDefault with default headers values +func NewStorageServicePendingRangeByKeyspaceGetDefault(code int) *StorageServicePendingRangeByKeyspaceGetDefault { + return &StorageServicePendingRangeByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServicePendingRangeByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServicePendingRangeByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service pending range by keyspace get default response +func (o *StorageServicePendingRangeByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServicePendingRangeByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServicePendingRangeByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServicePendingRangeByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..a9e2d862153 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetParams creates a new StorageServiceRangeToEndpointMapByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceRangeToEndpointMapByKeyspaceGetParams() *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + var () + return &StorageServiceRangeToEndpointMapByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithTimeout creates a new StorageServiceRangeToEndpointMapByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + var () + return &StorageServiceRangeToEndpointMapByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithContext creates a new StorageServiceRangeToEndpointMapByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + var () + return &StorageServiceRangeToEndpointMapByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceRangeToEndpointMapByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRangeToEndpointMapByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + var () + return &StorageServiceRangeToEndpointMapByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceRangeToEndpointMapByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service range to endpoint map by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceRangeToEndpointMapByKeyspaceGetParams struct { + + /*Keyspace + The keyspace to query about + + */ + Keyspace string + /*RPC + When set to true, return the rpc address + + */ + RPC *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKeyspace adds the keyspace to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WithRPC adds the rpc to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WithRPC(rpc *bool) *StorageServiceRangeToEndpointMapByKeyspaceGetParams { + o.SetRPC(rpc) + return o +} + +// SetRPC adds the rpc to the storage service range to endpoint map by keyspace get params +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) SetRPC(rpc *bool) { + o.RPC = rpc +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if o.RPC != nil { + + // query param rpc + var qrRPC bool + if o.RPC != nil { + qrRPC = *o.RPC + } + qRPC := swag.FormatBool(qrRPC) + if qRPC != "" { + if err := r.SetQueryParam("rpc", qRPC); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_responses.go new file mode 100644 index 00000000000..ff1fd22decc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_range_to_endpoint_map_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRangeToEndpointMapByKeyspaceGetReader is a Reader for the StorageServiceRangeToEndpointMapByKeyspaceGet structure. +type StorageServiceRangeToEndpointMapByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRangeToEndpointMapByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRangeToEndpointMapByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetOK creates a StorageServiceRangeToEndpointMapByKeyspaceGetOK with default headers values +func NewStorageServiceRangeToEndpointMapByKeyspaceGetOK() *StorageServiceRangeToEndpointMapByKeyspaceGetOK { + return &StorageServiceRangeToEndpointMapByKeyspaceGetOK{} +} + +/*StorageServiceRangeToEndpointMapByKeyspaceGetOK handles this case with default header values. + +StorageServiceRangeToEndpointMapByKeyspaceGetOK storage service range to endpoint map by keyspace get o k +*/ +type StorageServiceRangeToEndpointMapByKeyspaceGetOK struct { + Payload []*models.MaplistMapper +} + +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetOK) GetPayload() []*models.MaplistMapper { + return o.Payload +} + +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetOK) 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 +} + +// NewStorageServiceRangeToEndpointMapByKeyspaceGetDefault creates a StorageServiceRangeToEndpointMapByKeyspaceGetDefault with default headers values +func NewStorageServiceRangeToEndpointMapByKeyspaceGetDefault(code int) *StorageServiceRangeToEndpointMapByKeyspaceGetDefault { + return &StorageServiceRangeToEndpointMapByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceRangeToEndpointMapByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRangeToEndpointMapByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service range to endpoint map by keyspace get default response +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRangeToEndpointMapByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_parameters.go new file mode 100644 index 00000000000..ef1b6257526 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRebuildPostParams creates a new StorageServiceRebuildPostParams object +// with the default values initialized. +func NewStorageServiceRebuildPostParams() *StorageServiceRebuildPostParams { + var () + return &StorageServiceRebuildPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRebuildPostParamsWithTimeout creates a new StorageServiceRebuildPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRebuildPostParamsWithTimeout(timeout time.Duration) *StorageServiceRebuildPostParams { + var () + return &StorageServiceRebuildPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRebuildPostParamsWithContext creates a new StorageServiceRebuildPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRebuildPostParamsWithContext(ctx context.Context) *StorageServiceRebuildPostParams { + var () + return &StorageServiceRebuildPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRebuildPostParamsWithHTTPClient creates a new StorageServiceRebuildPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRebuildPostParamsWithHTTPClient(client *http.Client) *StorageServiceRebuildPostParams { + var () + return &StorageServiceRebuildPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRebuildPostParams contains all the parameters to send to the API endpoint +for the storage service rebuild post operation typically these are written to a http.Request +*/ +type StorageServiceRebuildPostParams struct { + + /*SourceDc + Name of DC from which to select sources for streaming or none to pick any node + + */ + SourceDc *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) WithTimeout(timeout time.Duration) *StorageServiceRebuildPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) WithContext(ctx context.Context) *StorageServiceRebuildPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) WithHTTPClient(client *http.Client) *StorageServiceRebuildPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSourceDc adds the sourceDc to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) WithSourceDc(sourceDc *string) *StorageServiceRebuildPostParams { + o.SetSourceDc(sourceDc) + return o +} + +// SetSourceDc adds the sourceDc to the storage service rebuild post params +func (o *StorageServiceRebuildPostParams) SetSourceDc(sourceDc *string) { + o.SourceDc = sourceDc +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRebuildPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SourceDc != nil { + + // query param source_dc + var qrSourceDc string + if o.SourceDc != nil { + qrSourceDc = *o.SourceDc + } + qSourceDc := qrSourceDc + if qSourceDc != "" { + if err := r.SetQueryParam("source_dc", qSourceDc); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_responses.go new file mode 100644 index 00000000000..a20e859c73c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rebuild_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRebuildPostReader is a Reader for the StorageServiceRebuildPost structure. +type StorageServiceRebuildPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRebuildPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRebuildPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRebuildPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRebuildPostOK creates a StorageServiceRebuildPostOK with default headers values +func NewStorageServiceRebuildPostOK() *StorageServiceRebuildPostOK { + return &StorageServiceRebuildPostOK{} +} + +/*StorageServiceRebuildPostOK handles this case with default header values. + +StorageServiceRebuildPostOK storage service rebuild post o k +*/ +type StorageServiceRebuildPostOK struct { +} + +func (o *StorageServiceRebuildPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRebuildPostDefault creates a StorageServiceRebuildPostDefault with default headers values +func NewStorageServiceRebuildPostDefault(code int) *StorageServiceRebuildPostDefault { + return &StorageServiceRebuildPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRebuildPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRebuildPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service rebuild post default response +func (o *StorageServiceRebuildPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRebuildPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRebuildPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRebuildPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_parameters.go new file mode 100644 index 00000000000..ede0539ec5c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceReleaseVersionGetParams creates a new StorageServiceReleaseVersionGetParams object +// with the default values initialized. +func NewStorageServiceReleaseVersionGetParams() *StorageServiceReleaseVersionGetParams { + + return &StorageServiceReleaseVersionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceReleaseVersionGetParamsWithTimeout creates a new StorageServiceReleaseVersionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceReleaseVersionGetParamsWithTimeout(timeout time.Duration) *StorageServiceReleaseVersionGetParams { + + return &StorageServiceReleaseVersionGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceReleaseVersionGetParamsWithContext creates a new StorageServiceReleaseVersionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceReleaseVersionGetParamsWithContext(ctx context.Context) *StorageServiceReleaseVersionGetParams { + + return &StorageServiceReleaseVersionGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceReleaseVersionGetParamsWithHTTPClient creates a new StorageServiceReleaseVersionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceReleaseVersionGetParamsWithHTTPClient(client *http.Client) *StorageServiceReleaseVersionGetParams { + + return &StorageServiceReleaseVersionGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceReleaseVersionGetParams contains all the parameters to send to the API endpoint +for the storage service release version get operation typically these are written to a http.Request +*/ +type StorageServiceReleaseVersionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) WithTimeout(timeout time.Duration) *StorageServiceReleaseVersionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) WithContext(ctx context.Context) *StorageServiceReleaseVersionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) WithHTTPClient(client *http.Client) *StorageServiceReleaseVersionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service release version get params +func (o *StorageServiceReleaseVersionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceReleaseVersionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_responses.go new file mode 100644 index 00000000000..3b5cf1b1571 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_release_version_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceReleaseVersionGetReader is a Reader for the StorageServiceReleaseVersionGet structure. +type StorageServiceReleaseVersionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceReleaseVersionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceReleaseVersionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceReleaseVersionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceReleaseVersionGetOK creates a StorageServiceReleaseVersionGetOK with default headers values +func NewStorageServiceReleaseVersionGetOK() *StorageServiceReleaseVersionGetOK { + return &StorageServiceReleaseVersionGetOK{} +} + +/*StorageServiceReleaseVersionGetOK handles this case with default header values. + +StorageServiceReleaseVersionGetOK storage service release version get o k +*/ +type StorageServiceReleaseVersionGetOK struct { + Payload string +} + +func (o *StorageServiceReleaseVersionGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceReleaseVersionGetOK) 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 +} + +// NewStorageServiceReleaseVersionGetDefault creates a StorageServiceReleaseVersionGetDefault with default headers values +func NewStorageServiceReleaseVersionGetDefault(code int) *StorageServiceReleaseVersionGetDefault { + return &StorageServiceReleaseVersionGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceReleaseVersionGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceReleaseVersionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service release version get default response +func (o *StorageServiceReleaseVersionGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceReleaseVersionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceReleaseVersionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceReleaseVersionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_parameters.go new file mode 100644 index 00000000000..5eeaffe58f7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRelocalSchemaPostParams creates a new StorageServiceRelocalSchemaPostParams object +// with the default values initialized. +func NewStorageServiceRelocalSchemaPostParams() *StorageServiceRelocalSchemaPostParams { + + return &StorageServiceRelocalSchemaPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRelocalSchemaPostParamsWithTimeout creates a new StorageServiceRelocalSchemaPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRelocalSchemaPostParamsWithTimeout(timeout time.Duration) *StorageServiceRelocalSchemaPostParams { + + return &StorageServiceRelocalSchemaPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRelocalSchemaPostParamsWithContext creates a new StorageServiceRelocalSchemaPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRelocalSchemaPostParamsWithContext(ctx context.Context) *StorageServiceRelocalSchemaPostParams { + + return &StorageServiceRelocalSchemaPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRelocalSchemaPostParamsWithHTTPClient creates a new StorageServiceRelocalSchemaPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRelocalSchemaPostParamsWithHTTPClient(client *http.Client) *StorageServiceRelocalSchemaPostParams { + + return &StorageServiceRelocalSchemaPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRelocalSchemaPostParams contains all the parameters to send to the API endpoint +for the storage service relocal schema post operation typically these are written to a http.Request +*/ +type StorageServiceRelocalSchemaPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) WithTimeout(timeout time.Duration) *StorageServiceRelocalSchemaPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) WithContext(ctx context.Context) *StorageServiceRelocalSchemaPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) WithHTTPClient(client *http.Client) *StorageServiceRelocalSchemaPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service relocal schema post params +func (o *StorageServiceRelocalSchemaPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRelocalSchemaPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_responses.go new file mode 100644 index 00000000000..ece0f873406 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_relocal_schema_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRelocalSchemaPostReader is a Reader for the StorageServiceRelocalSchemaPost structure. +type StorageServiceRelocalSchemaPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRelocalSchemaPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRelocalSchemaPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRelocalSchemaPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRelocalSchemaPostOK creates a StorageServiceRelocalSchemaPostOK with default headers values +func NewStorageServiceRelocalSchemaPostOK() *StorageServiceRelocalSchemaPostOK { + return &StorageServiceRelocalSchemaPostOK{} +} + +/*StorageServiceRelocalSchemaPostOK handles this case with default header values. + +StorageServiceRelocalSchemaPostOK storage service relocal schema post o k +*/ +type StorageServiceRelocalSchemaPostOK struct { +} + +func (o *StorageServiceRelocalSchemaPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRelocalSchemaPostDefault creates a StorageServiceRelocalSchemaPostDefault with default headers values +func NewStorageServiceRelocalSchemaPostDefault(code int) *StorageServiceRelocalSchemaPostDefault { + return &StorageServiceRelocalSchemaPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRelocalSchemaPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRelocalSchemaPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service relocal schema post default response +func (o *StorageServiceRelocalSchemaPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRelocalSchemaPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRelocalSchemaPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRelocalSchemaPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_parameters.go new file mode 100644 index 00000000000..f3697b042d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRemovalStatusGetParams creates a new StorageServiceRemovalStatusGetParams object +// with the default values initialized. +func NewStorageServiceRemovalStatusGetParams() *StorageServiceRemovalStatusGetParams { + + return &StorageServiceRemovalStatusGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRemovalStatusGetParamsWithTimeout creates a new StorageServiceRemovalStatusGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRemovalStatusGetParamsWithTimeout(timeout time.Duration) *StorageServiceRemovalStatusGetParams { + + return &StorageServiceRemovalStatusGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRemovalStatusGetParamsWithContext creates a new StorageServiceRemovalStatusGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRemovalStatusGetParamsWithContext(ctx context.Context) *StorageServiceRemovalStatusGetParams { + + return &StorageServiceRemovalStatusGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceRemovalStatusGetParamsWithHTTPClient creates a new StorageServiceRemovalStatusGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRemovalStatusGetParamsWithHTTPClient(client *http.Client) *StorageServiceRemovalStatusGetParams { + + return &StorageServiceRemovalStatusGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceRemovalStatusGetParams contains all the parameters to send to the API endpoint +for the storage service removal status get operation typically these are written to a http.Request +*/ +type StorageServiceRemovalStatusGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) WithTimeout(timeout time.Duration) *StorageServiceRemovalStatusGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) WithContext(ctx context.Context) *StorageServiceRemovalStatusGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) WithHTTPClient(client *http.Client) *StorageServiceRemovalStatusGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service removal status get params +func (o *StorageServiceRemovalStatusGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRemovalStatusGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_responses.go new file mode 100644 index 00000000000..329f9c0cb20 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_removal_status_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRemovalStatusGetReader is a Reader for the StorageServiceRemovalStatusGet structure. +type StorageServiceRemovalStatusGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRemovalStatusGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRemovalStatusGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRemovalStatusGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRemovalStatusGetOK creates a StorageServiceRemovalStatusGetOK with default headers values +func NewStorageServiceRemovalStatusGetOK() *StorageServiceRemovalStatusGetOK { + return &StorageServiceRemovalStatusGetOK{} +} + +/*StorageServiceRemovalStatusGetOK handles this case with default header values. + +StorageServiceRemovalStatusGetOK storage service removal status get o k +*/ +type StorageServiceRemovalStatusGetOK struct { + Payload string +} + +func (o *StorageServiceRemovalStatusGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceRemovalStatusGetOK) 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 +} + +// NewStorageServiceRemovalStatusGetDefault creates a StorageServiceRemovalStatusGetDefault with default headers values +func NewStorageServiceRemovalStatusGetDefault(code int) *StorageServiceRemovalStatusGetDefault { + return &StorageServiceRemovalStatusGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceRemovalStatusGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRemovalStatusGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service removal status get default response +func (o *StorageServiceRemovalStatusGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRemovalStatusGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRemovalStatusGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRemovalStatusGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_parameters.go new file mode 100644 index 00000000000..45fed5a93ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRemoveNodePostParams creates a new StorageServiceRemoveNodePostParams object +// with the default values initialized. +func NewStorageServiceRemoveNodePostParams() *StorageServiceRemoveNodePostParams { + var () + return &StorageServiceRemoveNodePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRemoveNodePostParamsWithTimeout creates a new StorageServiceRemoveNodePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRemoveNodePostParamsWithTimeout(timeout time.Duration) *StorageServiceRemoveNodePostParams { + var () + return &StorageServiceRemoveNodePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRemoveNodePostParamsWithContext creates a new StorageServiceRemoveNodePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRemoveNodePostParamsWithContext(ctx context.Context) *StorageServiceRemoveNodePostParams { + var () + return &StorageServiceRemoveNodePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRemoveNodePostParamsWithHTTPClient creates a new StorageServiceRemoveNodePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRemoveNodePostParamsWithHTTPClient(client *http.Client) *StorageServiceRemoveNodePostParams { + var () + return &StorageServiceRemoveNodePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRemoveNodePostParams contains all the parameters to send to the API endpoint +for the storage service remove node post operation typically these are written to a http.Request +*/ +type StorageServiceRemoveNodePostParams struct { + + /*HostID + Remove the node with host_id from the cluster + + */ + HostID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) WithTimeout(timeout time.Duration) *StorageServiceRemoveNodePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) WithContext(ctx context.Context) *StorageServiceRemoveNodePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) WithHTTPClient(client *http.Client) *StorageServiceRemoveNodePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithHostID adds the hostID to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) WithHostID(hostID string) *StorageServiceRemoveNodePostParams { + o.SetHostID(hostID) + return o +} + +// SetHostID adds the hostId to the storage service remove node post params +func (o *StorageServiceRemoveNodePostParams) SetHostID(hostID string) { + o.HostID = hostID +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRemoveNodePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param host_id + qrHostID := o.HostID + qHostID := qrHostID + if qHostID != "" { + if err := r.SetQueryParam("host_id", qHostID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_responses.go new file mode 100644 index 00000000000..b850d782adf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_remove_node_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRemoveNodePostReader is a Reader for the StorageServiceRemoveNodePost structure. +type StorageServiceRemoveNodePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRemoveNodePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRemoveNodePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRemoveNodePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRemoveNodePostOK creates a StorageServiceRemoveNodePostOK with default headers values +func NewStorageServiceRemoveNodePostOK() *StorageServiceRemoveNodePostOK { + return &StorageServiceRemoveNodePostOK{} +} + +/*StorageServiceRemoveNodePostOK handles this case with default header values. + +StorageServiceRemoveNodePostOK storage service remove node post o k +*/ +type StorageServiceRemoveNodePostOK struct { +} + +func (o *StorageServiceRemoveNodePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRemoveNodePostDefault creates a StorageServiceRemoveNodePostDefault with default headers values +func NewStorageServiceRemoveNodePostDefault(code int) *StorageServiceRemoveNodePostDefault { + return &StorageServiceRemoveNodePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRemoveNodePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRemoveNodePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service remove node post default response +func (o *StorageServiceRemoveNodePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRemoveNodePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRemoveNodePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRemoveNodePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_parameters.go new file mode 100644 index 00000000000..5b9abc2a2e0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRepairAsyncByKeyspaceGetParams creates a new StorageServiceRepairAsyncByKeyspaceGetParams object +// with the default values initialized. +func NewStorageServiceRepairAsyncByKeyspaceGetParams() *StorageServiceRepairAsyncByKeyspaceGetParams { + var () + return &StorageServiceRepairAsyncByKeyspaceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRepairAsyncByKeyspaceGetParamsWithTimeout creates a new StorageServiceRepairAsyncByKeyspaceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRepairAsyncByKeyspaceGetParamsWithTimeout(timeout time.Duration) *StorageServiceRepairAsyncByKeyspaceGetParams { + var () + return &StorageServiceRepairAsyncByKeyspaceGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRepairAsyncByKeyspaceGetParamsWithContext creates a new StorageServiceRepairAsyncByKeyspaceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRepairAsyncByKeyspaceGetParamsWithContext(ctx context.Context) *StorageServiceRepairAsyncByKeyspaceGetParams { + var () + return &StorageServiceRepairAsyncByKeyspaceGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceRepairAsyncByKeyspaceGetParamsWithHTTPClient creates a new StorageServiceRepairAsyncByKeyspaceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRepairAsyncByKeyspaceGetParamsWithHTTPClient(client *http.Client) *StorageServiceRepairAsyncByKeyspaceGetParams { + var () + return &StorageServiceRepairAsyncByKeyspaceGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceRepairAsyncByKeyspaceGetParams contains all the parameters to send to the API endpoint +for the storage service repair async by keyspace get operation typically these are written to a http.Request +*/ +type StorageServiceRepairAsyncByKeyspaceGetParams struct { + + /*ID + The repair ID to check for status + + */ + ID int32 + /*Keyspace + The keyspace repair is running on + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WithTimeout(timeout time.Duration) *StorageServiceRepairAsyncByKeyspaceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WithContext(ctx context.Context) *StorageServiceRepairAsyncByKeyspaceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WithHTTPClient(client *http.Client) *StorageServiceRepairAsyncByKeyspaceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WithID(id int32) *StorageServiceRepairAsyncByKeyspaceGetParams { + o.SetID(id) + return o +} + +// SetID adds the id to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) SetID(id int32) { + o.ID = id +} + +// WithKeyspace adds the keyspace to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WithKeyspace(keyspace string) *StorageServiceRepairAsyncByKeyspaceGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service repair async by keyspace get params +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRepairAsyncByKeyspaceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param id + qrID := o.ID + qID := swag.FormatInt32(qrID) + if qID != "" { + if err := r.SetQueryParam("id", qID); err != nil { + return err + } + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_responses.go new file mode 100644 index 00000000000..8491fee70b3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRepairAsyncByKeyspaceGetReader is a Reader for the StorageServiceRepairAsyncByKeyspaceGet structure. +type StorageServiceRepairAsyncByKeyspaceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRepairAsyncByKeyspaceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRepairAsyncByKeyspaceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRepairAsyncByKeyspaceGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRepairAsyncByKeyspaceGetOK creates a StorageServiceRepairAsyncByKeyspaceGetOK with default headers values +func NewStorageServiceRepairAsyncByKeyspaceGetOK() *StorageServiceRepairAsyncByKeyspaceGetOK { + return &StorageServiceRepairAsyncByKeyspaceGetOK{} +} + +/*StorageServiceRepairAsyncByKeyspaceGetOK handles this case with default header values. + +StorageServiceRepairAsyncByKeyspaceGetOK storage service repair async by keyspace get o k +*/ +type StorageServiceRepairAsyncByKeyspaceGetOK struct { + Payload models.RepairAsyncStatusResponse +} + +func (o *StorageServiceRepairAsyncByKeyspaceGetOK) GetPayload() models.RepairAsyncStatusResponse { + return o.Payload +} + +func (o *StorageServiceRepairAsyncByKeyspaceGetOK) 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 +} + +// NewStorageServiceRepairAsyncByKeyspaceGetDefault creates a StorageServiceRepairAsyncByKeyspaceGetDefault with default headers values +func NewStorageServiceRepairAsyncByKeyspaceGetDefault(code int) *StorageServiceRepairAsyncByKeyspaceGetDefault { + return &StorageServiceRepairAsyncByKeyspaceGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceRepairAsyncByKeyspaceGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRepairAsyncByKeyspaceGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service repair async by keyspace get default response +func (o *StorageServiceRepairAsyncByKeyspaceGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRepairAsyncByKeyspaceGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRepairAsyncByKeyspaceGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRepairAsyncByKeyspaceGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..029b901f543 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_parameters.go @@ -0,0 +1,488 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRepairAsyncByKeyspacePostParams creates a new StorageServiceRepairAsyncByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceRepairAsyncByKeyspacePostParams() *StorageServiceRepairAsyncByKeyspacePostParams { + var () + return &StorageServiceRepairAsyncByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRepairAsyncByKeyspacePostParamsWithTimeout creates a new StorageServiceRepairAsyncByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRepairAsyncByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceRepairAsyncByKeyspacePostParams { + var () + return &StorageServiceRepairAsyncByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRepairAsyncByKeyspacePostParamsWithContext creates a new StorageServiceRepairAsyncByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRepairAsyncByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceRepairAsyncByKeyspacePostParams { + var () + return &StorageServiceRepairAsyncByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRepairAsyncByKeyspacePostParamsWithHTTPClient creates a new StorageServiceRepairAsyncByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRepairAsyncByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceRepairAsyncByKeyspacePostParams { + var () + return &StorageServiceRepairAsyncByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRepairAsyncByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service repair async by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceRepairAsyncByKeyspacePostParams struct { + + /*ColumnFamilies + Which column families to repair in the given keyspace. Multiple columns families can be named separated by commas. If this option is missing, all column families in the keyspace are repaired. + + */ + ColumnFamilies *string + /*DataCenters + Which data centers are to participate in this repair. Multiple data centers can be listed separated by commas. + + */ + DataCenters *string + /*EndToken + Token on which to end repair + + */ + EndToken *string + /*Hosts + Which hosts are to participate in this repair. Multiple hosts can be listed separated by commas. + + */ + Hosts *string + /*Incremental + If the value is the string 'true' with any capitalization, perform incremental repair. + + */ + Incremental *string + /*JobThreads + An integer specifying the parallelism on each node. + + */ + JobThreads *string + /*Keyspace + The keyspace to repair + + */ + Keyspace string + /*Parallelism + Repair parallelism, can be 0 (sequential), 1 (parallel) or 2 (datacenter-aware). + + */ + Parallelism *string + /*PrimaryRange + If the value is the string 'true' with any capitalization, repair only the first range returned by the partitioner. + + */ + PrimaryRange *string + /*Ranges + An explicit list of ranges to repair, overriding the default choice. Each range is expressed as token1:token2, and multiple ranges can be given as a comma separated list. + + */ + Ranges *string + /*StartToken + Token on which to begin repair + + */ + StartToken *string + /*Trace + If the value is the string 'true' with any capitalization, enable tracing of the repair. + + */ + Trace *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithColumnFamilies adds the columnFamilies to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithColumnFamilies(columnFamilies *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetColumnFamilies(columnFamilies) + return o +} + +// SetColumnFamilies adds the columnFamilies to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetColumnFamilies(columnFamilies *string) { + o.ColumnFamilies = columnFamilies +} + +// WithDataCenters adds the dataCenters to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithDataCenters(dataCenters *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetDataCenters(dataCenters) + return o +} + +// SetDataCenters adds the dataCenters to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetDataCenters(dataCenters *string) { + o.DataCenters = dataCenters +} + +// WithEndToken adds the endToken to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithEndToken(endToken *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetEndToken(endToken) + return o +} + +// SetEndToken adds the endToken to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetEndToken(endToken *string) { + o.EndToken = endToken +} + +// WithHosts adds the hosts to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithHosts(hosts *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetHosts(hosts) + return o +} + +// SetHosts adds the hosts to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetHosts(hosts *string) { + o.Hosts = hosts +} + +// WithIncremental adds the incremental to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithIncremental(incremental *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetIncremental(incremental) + return o +} + +// SetIncremental adds the incremental to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetIncremental(incremental *string) { + o.Incremental = incremental +} + +// WithJobThreads adds the jobThreads to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithJobThreads(jobThreads *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetJobThreads(jobThreads) + return o +} + +// SetJobThreads adds the jobThreads to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetJobThreads(jobThreads *string) { + o.JobThreads = jobThreads +} + +// WithKeyspace adds the keyspace to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WithParallelism adds the parallelism to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithParallelism(parallelism *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetParallelism(parallelism) + return o +} + +// SetParallelism adds the parallelism to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetParallelism(parallelism *string) { + o.Parallelism = parallelism +} + +// WithPrimaryRange adds the primaryRange to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithPrimaryRange(primaryRange *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetPrimaryRange(primaryRange) + return o +} + +// SetPrimaryRange adds the primaryRange to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetPrimaryRange(primaryRange *string) { + o.PrimaryRange = primaryRange +} + +// WithRanges adds the ranges to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithRanges(ranges *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetRanges(ranges) + return o +} + +// SetRanges adds the ranges to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetRanges(ranges *string) { + o.Ranges = ranges +} + +// WithStartToken adds the startToken to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithStartToken(startToken *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetStartToken(startToken) + return o +} + +// SetStartToken adds the startToken to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetStartToken(startToken *string) { + o.StartToken = startToken +} + +// WithTrace adds the trace to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WithTrace(trace *string) *StorageServiceRepairAsyncByKeyspacePostParams { + o.SetTrace(trace) + return o +} + +// SetTrace adds the trace to the storage service repair async by keyspace post params +func (o *StorageServiceRepairAsyncByKeyspacePostParams) SetTrace(trace *string) { + o.Trace = trace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRepairAsyncByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ColumnFamilies != nil { + + // query param columnFamilies + var qrColumnFamilies string + if o.ColumnFamilies != nil { + qrColumnFamilies = *o.ColumnFamilies + } + qColumnFamilies := qrColumnFamilies + if qColumnFamilies != "" { + if err := r.SetQueryParam("columnFamilies", qColumnFamilies); err != nil { + return err + } + } + + } + + if o.DataCenters != nil { + + // query param dataCenters + var qrDataCenters string + if o.DataCenters != nil { + qrDataCenters = *o.DataCenters + } + qDataCenters := qrDataCenters + if qDataCenters != "" { + if err := r.SetQueryParam("dataCenters", qDataCenters); err != nil { + return err + } + } + + } + + if o.EndToken != nil { + + // query param endToken + var qrEndToken string + if o.EndToken != nil { + qrEndToken = *o.EndToken + } + qEndToken := qrEndToken + if qEndToken != "" { + if err := r.SetQueryParam("endToken", qEndToken); err != nil { + return err + } + } + + } + + if o.Hosts != nil { + + // query param hosts + var qrHosts string + if o.Hosts != nil { + qrHosts = *o.Hosts + } + qHosts := qrHosts + if qHosts != "" { + if err := r.SetQueryParam("hosts", qHosts); err != nil { + return err + } + } + + } + + if o.Incremental != nil { + + // query param incremental + var qrIncremental string + if o.Incremental != nil { + qrIncremental = *o.Incremental + } + qIncremental := qrIncremental + if qIncremental != "" { + if err := r.SetQueryParam("incremental", qIncremental); err != nil { + return err + } + } + + } + + if o.JobThreads != nil { + + // query param jobThreads + var qrJobThreads string + if o.JobThreads != nil { + qrJobThreads = *o.JobThreads + } + qJobThreads := qrJobThreads + if qJobThreads != "" { + if err := r.SetQueryParam("jobThreads", qJobThreads); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if o.Parallelism != nil { + + // query param parallelism + var qrParallelism string + if o.Parallelism != nil { + qrParallelism = *o.Parallelism + } + qParallelism := qrParallelism + if qParallelism != "" { + if err := r.SetQueryParam("parallelism", qParallelism); err != nil { + return err + } + } + + } + + if o.PrimaryRange != nil { + + // query param primaryRange + var qrPrimaryRange string + if o.PrimaryRange != nil { + qrPrimaryRange = *o.PrimaryRange + } + qPrimaryRange := qrPrimaryRange + if qPrimaryRange != "" { + if err := r.SetQueryParam("primaryRange", qPrimaryRange); err != nil { + return err + } + } + + } + + if o.Ranges != nil { + + // query param ranges + var qrRanges string + if o.Ranges != nil { + qrRanges = *o.Ranges + } + qRanges := qrRanges + if qRanges != "" { + if err := r.SetQueryParam("ranges", qRanges); err != nil { + return err + } + } + + } + + if o.StartToken != nil { + + // query param startToken + var qrStartToken string + if o.StartToken != nil { + qrStartToken = *o.StartToken + } + qStartToken := qrStartToken + if qStartToken != "" { + if err := r.SetQueryParam("startToken", qStartToken); err != nil { + return err + } + } + + } + + if o.Trace != nil { + + // query param trace + var qrTrace string + if o.Trace != nil { + qrTrace = *o.Trace + } + qTrace := qrTrace + if qTrace != "" { + if err := r.SetQueryParam("trace", qTrace); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_responses.go new file mode 100644 index 00000000000..8b6bd17e593 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_repair_async_by_keyspace_post_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRepairAsyncByKeyspacePostReader is a Reader for the StorageServiceRepairAsyncByKeyspacePost structure. +type StorageServiceRepairAsyncByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRepairAsyncByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRepairAsyncByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRepairAsyncByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRepairAsyncByKeyspacePostOK creates a StorageServiceRepairAsyncByKeyspacePostOK with default headers values +func NewStorageServiceRepairAsyncByKeyspacePostOK() *StorageServiceRepairAsyncByKeyspacePostOK { + return &StorageServiceRepairAsyncByKeyspacePostOK{} +} + +/*StorageServiceRepairAsyncByKeyspacePostOK handles this case with default header values. + +StorageServiceRepairAsyncByKeyspacePostOK storage service repair async by keyspace post o k +*/ +type StorageServiceRepairAsyncByKeyspacePostOK struct { + Payload int32 +} + +func (o *StorageServiceRepairAsyncByKeyspacePostOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceRepairAsyncByKeyspacePostOK) 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 +} + +// NewStorageServiceRepairAsyncByKeyspacePostDefault creates a StorageServiceRepairAsyncByKeyspacePostDefault with default headers values +func NewStorageServiceRepairAsyncByKeyspacePostDefault(code int) *StorageServiceRepairAsyncByKeyspacePostDefault { + return &StorageServiceRepairAsyncByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRepairAsyncByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRepairAsyncByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service repair async by keyspace post default response +func (o *StorageServiceRepairAsyncByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRepairAsyncByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRepairAsyncByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRepairAsyncByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_parameters.go new file mode 100644 index 00000000000..9c0ccdd50fa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRescheduleFailedDeletionsPostParams creates a new StorageServiceRescheduleFailedDeletionsPostParams object +// with the default values initialized. +func NewStorageServiceRescheduleFailedDeletionsPostParams() *StorageServiceRescheduleFailedDeletionsPostParams { + + return &StorageServiceRescheduleFailedDeletionsPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRescheduleFailedDeletionsPostParamsWithTimeout creates a new StorageServiceRescheduleFailedDeletionsPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRescheduleFailedDeletionsPostParamsWithTimeout(timeout time.Duration) *StorageServiceRescheduleFailedDeletionsPostParams { + + return &StorageServiceRescheduleFailedDeletionsPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRescheduleFailedDeletionsPostParamsWithContext creates a new StorageServiceRescheduleFailedDeletionsPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRescheduleFailedDeletionsPostParamsWithContext(ctx context.Context) *StorageServiceRescheduleFailedDeletionsPostParams { + + return &StorageServiceRescheduleFailedDeletionsPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRescheduleFailedDeletionsPostParamsWithHTTPClient creates a new StorageServiceRescheduleFailedDeletionsPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRescheduleFailedDeletionsPostParamsWithHTTPClient(client *http.Client) *StorageServiceRescheduleFailedDeletionsPostParams { + + return &StorageServiceRescheduleFailedDeletionsPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRescheduleFailedDeletionsPostParams contains all the parameters to send to the API endpoint +for the storage service reschedule failed deletions post operation typically these are written to a http.Request +*/ +type StorageServiceRescheduleFailedDeletionsPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) WithTimeout(timeout time.Duration) *StorageServiceRescheduleFailedDeletionsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) WithContext(ctx context.Context) *StorageServiceRescheduleFailedDeletionsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) WithHTTPClient(client *http.Client) *StorageServiceRescheduleFailedDeletionsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service reschedule failed deletions post params +func (o *StorageServiceRescheduleFailedDeletionsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRescheduleFailedDeletionsPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_responses.go new file mode 100644 index 00000000000..e6996843840 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_reschedule_failed_deletions_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRescheduleFailedDeletionsPostReader is a Reader for the StorageServiceRescheduleFailedDeletionsPost structure. +type StorageServiceRescheduleFailedDeletionsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRescheduleFailedDeletionsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRescheduleFailedDeletionsPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRescheduleFailedDeletionsPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRescheduleFailedDeletionsPostOK creates a StorageServiceRescheduleFailedDeletionsPostOK with default headers values +func NewStorageServiceRescheduleFailedDeletionsPostOK() *StorageServiceRescheduleFailedDeletionsPostOK { + return &StorageServiceRescheduleFailedDeletionsPostOK{} +} + +/*StorageServiceRescheduleFailedDeletionsPostOK handles this case with default header values. + +StorageServiceRescheduleFailedDeletionsPostOK storage service reschedule failed deletions post o k +*/ +type StorageServiceRescheduleFailedDeletionsPostOK struct { +} + +func (o *StorageServiceRescheduleFailedDeletionsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRescheduleFailedDeletionsPostDefault creates a StorageServiceRescheduleFailedDeletionsPostDefault with default headers values +func NewStorageServiceRescheduleFailedDeletionsPostDefault(code int) *StorageServiceRescheduleFailedDeletionsPostDefault { + return &StorageServiceRescheduleFailedDeletionsPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRescheduleFailedDeletionsPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRescheduleFailedDeletionsPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service reschedule failed deletions post default response +func (o *StorageServiceRescheduleFailedDeletionsPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRescheduleFailedDeletionsPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRescheduleFailedDeletionsPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRescheduleFailedDeletionsPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_parameters.go new file mode 100644 index 00000000000..1c1f6bd2d82 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRPCServerDeleteParams creates a new StorageServiceRPCServerDeleteParams object +// with the default values initialized. +func NewStorageServiceRPCServerDeleteParams() *StorageServiceRPCServerDeleteParams { + + return &StorageServiceRPCServerDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRPCServerDeleteParamsWithTimeout creates a new StorageServiceRPCServerDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRPCServerDeleteParamsWithTimeout(timeout time.Duration) *StorageServiceRPCServerDeleteParams { + + return &StorageServiceRPCServerDeleteParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRPCServerDeleteParamsWithContext creates a new StorageServiceRPCServerDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRPCServerDeleteParamsWithContext(ctx context.Context) *StorageServiceRPCServerDeleteParams { + + return &StorageServiceRPCServerDeleteParams{ + + Context: ctx, + } +} + +// NewStorageServiceRPCServerDeleteParamsWithHTTPClient creates a new StorageServiceRPCServerDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRPCServerDeleteParamsWithHTTPClient(client *http.Client) *StorageServiceRPCServerDeleteParams { + + return &StorageServiceRPCServerDeleteParams{ + HTTPClient: client, + } +} + +/*StorageServiceRPCServerDeleteParams contains all the parameters to send to the API endpoint +for the storage service Rpc server delete operation typically these are written to a http.Request +*/ +type StorageServiceRPCServerDeleteParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) WithTimeout(timeout time.Duration) *StorageServiceRPCServerDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) WithContext(ctx context.Context) *StorageServiceRPCServerDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) WithHTTPClient(client *http.Client) *StorageServiceRPCServerDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service Rpc server delete params +func (o *StorageServiceRPCServerDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRPCServerDeleteParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_responses.go new file mode 100644 index 00000000000..aa0de69f8d2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRPCServerDeleteReader is a Reader for the StorageServiceRPCServerDelete structure. +type StorageServiceRPCServerDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRPCServerDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRPCServerDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRPCServerDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRPCServerDeleteOK creates a StorageServiceRPCServerDeleteOK with default headers values +func NewStorageServiceRPCServerDeleteOK() *StorageServiceRPCServerDeleteOK { + return &StorageServiceRPCServerDeleteOK{} +} + +/*StorageServiceRPCServerDeleteOK handles this case with default header values. + +StorageServiceRPCServerDeleteOK storage service Rpc server delete o k +*/ +type StorageServiceRPCServerDeleteOK struct { +} + +func (o *StorageServiceRPCServerDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRPCServerDeleteDefault creates a StorageServiceRPCServerDeleteDefault with default headers values +func NewStorageServiceRPCServerDeleteDefault(code int) *StorageServiceRPCServerDeleteDefault { + return &StorageServiceRPCServerDeleteDefault{ + _statusCode: code, + } +} + +/*StorageServiceRPCServerDeleteDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRPCServerDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service Rpc server delete default response +func (o *StorageServiceRPCServerDeleteDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRPCServerDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRPCServerDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRPCServerDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_parameters.go new file mode 100644 index 00000000000..a673881ca91 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRPCServerGetParams creates a new StorageServiceRPCServerGetParams object +// with the default values initialized. +func NewStorageServiceRPCServerGetParams() *StorageServiceRPCServerGetParams { + + return &StorageServiceRPCServerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRPCServerGetParamsWithTimeout creates a new StorageServiceRPCServerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRPCServerGetParamsWithTimeout(timeout time.Duration) *StorageServiceRPCServerGetParams { + + return &StorageServiceRPCServerGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRPCServerGetParamsWithContext creates a new StorageServiceRPCServerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRPCServerGetParamsWithContext(ctx context.Context) *StorageServiceRPCServerGetParams { + + return &StorageServiceRPCServerGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceRPCServerGetParamsWithHTTPClient creates a new StorageServiceRPCServerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRPCServerGetParamsWithHTTPClient(client *http.Client) *StorageServiceRPCServerGetParams { + + return &StorageServiceRPCServerGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceRPCServerGetParams contains all the parameters to send to the API endpoint +for the storage service Rpc server get operation typically these are written to a http.Request +*/ +type StorageServiceRPCServerGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) WithTimeout(timeout time.Duration) *StorageServiceRPCServerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) WithContext(ctx context.Context) *StorageServiceRPCServerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) WithHTTPClient(client *http.Client) *StorageServiceRPCServerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service Rpc server get params +func (o *StorageServiceRPCServerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRPCServerGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_responses.go new file mode 100644 index 00000000000..d3f472ca8bc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRPCServerGetReader is a Reader for the StorageServiceRPCServerGet structure. +type StorageServiceRPCServerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRPCServerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRPCServerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRPCServerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRPCServerGetOK creates a StorageServiceRPCServerGetOK with default headers values +func NewStorageServiceRPCServerGetOK() *StorageServiceRPCServerGetOK { + return &StorageServiceRPCServerGetOK{} +} + +/*StorageServiceRPCServerGetOK handles this case with default header values. + +StorageServiceRPCServerGetOK storage service Rpc server get o k +*/ +type StorageServiceRPCServerGetOK struct { + Payload bool +} + +func (o *StorageServiceRPCServerGetOK) GetPayload() bool { + return o.Payload +} + +func (o *StorageServiceRPCServerGetOK) 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 +} + +// NewStorageServiceRPCServerGetDefault creates a StorageServiceRPCServerGetDefault with default headers values +func NewStorageServiceRPCServerGetDefault(code int) *StorageServiceRPCServerGetDefault { + return &StorageServiceRPCServerGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceRPCServerGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRPCServerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service Rpc server get default response +func (o *StorageServiceRPCServerGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRPCServerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRPCServerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRPCServerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_parameters.go new file mode 100644 index 00000000000..10b5ffe39fc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceRPCServerPostParams creates a new StorageServiceRPCServerPostParams object +// with the default values initialized. +func NewStorageServiceRPCServerPostParams() *StorageServiceRPCServerPostParams { + + return &StorageServiceRPCServerPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceRPCServerPostParamsWithTimeout creates a new StorageServiceRPCServerPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceRPCServerPostParamsWithTimeout(timeout time.Duration) *StorageServiceRPCServerPostParams { + + return &StorageServiceRPCServerPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceRPCServerPostParamsWithContext creates a new StorageServiceRPCServerPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceRPCServerPostParamsWithContext(ctx context.Context) *StorageServiceRPCServerPostParams { + + return &StorageServiceRPCServerPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceRPCServerPostParamsWithHTTPClient creates a new StorageServiceRPCServerPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceRPCServerPostParamsWithHTTPClient(client *http.Client) *StorageServiceRPCServerPostParams { + + return &StorageServiceRPCServerPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceRPCServerPostParams contains all the parameters to send to the API endpoint +for the storage service Rpc server post operation typically these are written to a http.Request +*/ +type StorageServiceRPCServerPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) WithTimeout(timeout time.Duration) *StorageServiceRPCServerPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) WithContext(ctx context.Context) *StorageServiceRPCServerPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) WithHTTPClient(client *http.Client) *StorageServiceRPCServerPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service Rpc server post params +func (o *StorageServiceRPCServerPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceRPCServerPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_responses.go new file mode 100644 index 00000000000..cc1a866e286 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_rpc_server_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceRPCServerPostReader is a Reader for the StorageServiceRPCServerPost structure. +type StorageServiceRPCServerPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceRPCServerPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceRPCServerPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceRPCServerPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceRPCServerPostOK creates a StorageServiceRPCServerPostOK with default headers values +func NewStorageServiceRPCServerPostOK() *StorageServiceRPCServerPostOK { + return &StorageServiceRPCServerPostOK{} +} + +/*StorageServiceRPCServerPostOK handles this case with default header values. + +StorageServiceRPCServerPostOK storage service Rpc server post o k +*/ +type StorageServiceRPCServerPostOK struct { +} + +func (o *StorageServiceRPCServerPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceRPCServerPostDefault creates a StorageServiceRPCServerPostDefault with default headers values +func NewStorageServiceRPCServerPostDefault(code int) *StorageServiceRPCServerPostDefault { + return &StorageServiceRPCServerPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceRPCServerPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceRPCServerPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service Rpc server post default response +func (o *StorageServiceRPCServerPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceRPCServerPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceRPCServerPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceRPCServerPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_parameters.go new file mode 100644 index 00000000000..cd2bee1a227 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSampleKeyRangeGetParams creates a new StorageServiceSampleKeyRangeGetParams object +// with the default values initialized. +func NewStorageServiceSampleKeyRangeGetParams() *StorageServiceSampleKeyRangeGetParams { + + return &StorageServiceSampleKeyRangeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSampleKeyRangeGetParamsWithTimeout creates a new StorageServiceSampleKeyRangeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSampleKeyRangeGetParamsWithTimeout(timeout time.Duration) *StorageServiceSampleKeyRangeGetParams { + + return &StorageServiceSampleKeyRangeGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSampleKeyRangeGetParamsWithContext creates a new StorageServiceSampleKeyRangeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSampleKeyRangeGetParamsWithContext(ctx context.Context) *StorageServiceSampleKeyRangeGetParams { + + return &StorageServiceSampleKeyRangeGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSampleKeyRangeGetParamsWithHTTPClient creates a new StorageServiceSampleKeyRangeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSampleKeyRangeGetParamsWithHTTPClient(client *http.Client) *StorageServiceSampleKeyRangeGetParams { + + return &StorageServiceSampleKeyRangeGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSampleKeyRangeGetParams contains all the parameters to send to the API endpoint +for the storage service sample key range get operation typically these are written to a http.Request +*/ +type StorageServiceSampleKeyRangeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) WithTimeout(timeout time.Duration) *StorageServiceSampleKeyRangeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) WithContext(ctx context.Context) *StorageServiceSampleKeyRangeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) WithHTTPClient(client *http.Client) *StorageServiceSampleKeyRangeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service sample key range get params +func (o *StorageServiceSampleKeyRangeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSampleKeyRangeGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_responses.go new file mode 100644 index 00000000000..f66ba2b519f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sample_key_range_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSampleKeyRangeGetReader is a Reader for the StorageServiceSampleKeyRangeGet structure. +type StorageServiceSampleKeyRangeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSampleKeyRangeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSampleKeyRangeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSampleKeyRangeGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSampleKeyRangeGetOK creates a StorageServiceSampleKeyRangeGetOK with default headers values +func NewStorageServiceSampleKeyRangeGetOK() *StorageServiceSampleKeyRangeGetOK { + return &StorageServiceSampleKeyRangeGetOK{} +} + +/*StorageServiceSampleKeyRangeGetOK handles this case with default header values. + +StorageServiceSampleKeyRangeGetOK storage service sample key range get o k +*/ +type StorageServiceSampleKeyRangeGetOK struct { + Payload []string +} + +func (o *StorageServiceSampleKeyRangeGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceSampleKeyRangeGetOK) 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 +} + +// NewStorageServiceSampleKeyRangeGetDefault creates a StorageServiceSampleKeyRangeGetDefault with default headers values +func NewStorageServiceSampleKeyRangeGetDefault(code int) *StorageServiceSampleKeyRangeGetDefault { + return &StorageServiceSampleKeyRangeGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSampleKeyRangeGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSampleKeyRangeGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service sample key range get default response +func (o *StorageServiceSampleKeyRangeGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSampleKeyRangeGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSampleKeyRangeGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSampleKeyRangeGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_parameters.go new file mode 100644 index 00000000000..91aca3f08b7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSavedCachesLocationGetParams creates a new StorageServiceSavedCachesLocationGetParams object +// with the default values initialized. +func NewStorageServiceSavedCachesLocationGetParams() *StorageServiceSavedCachesLocationGetParams { + + return &StorageServiceSavedCachesLocationGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSavedCachesLocationGetParamsWithTimeout creates a new StorageServiceSavedCachesLocationGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSavedCachesLocationGetParamsWithTimeout(timeout time.Duration) *StorageServiceSavedCachesLocationGetParams { + + return &StorageServiceSavedCachesLocationGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSavedCachesLocationGetParamsWithContext creates a new StorageServiceSavedCachesLocationGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSavedCachesLocationGetParamsWithContext(ctx context.Context) *StorageServiceSavedCachesLocationGetParams { + + return &StorageServiceSavedCachesLocationGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSavedCachesLocationGetParamsWithHTTPClient creates a new StorageServiceSavedCachesLocationGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSavedCachesLocationGetParamsWithHTTPClient(client *http.Client) *StorageServiceSavedCachesLocationGetParams { + + return &StorageServiceSavedCachesLocationGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSavedCachesLocationGetParams contains all the parameters to send to the API endpoint +for the storage service saved caches location get operation typically these are written to a http.Request +*/ +type StorageServiceSavedCachesLocationGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) WithTimeout(timeout time.Duration) *StorageServiceSavedCachesLocationGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) WithContext(ctx context.Context) *StorageServiceSavedCachesLocationGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) WithHTTPClient(client *http.Client) *StorageServiceSavedCachesLocationGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service saved caches location get params +func (o *StorageServiceSavedCachesLocationGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSavedCachesLocationGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_responses.go new file mode 100644 index 00000000000..5a01d8789d2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_saved_caches_location_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSavedCachesLocationGetReader is a Reader for the StorageServiceSavedCachesLocationGet structure. +type StorageServiceSavedCachesLocationGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSavedCachesLocationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSavedCachesLocationGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSavedCachesLocationGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSavedCachesLocationGetOK creates a StorageServiceSavedCachesLocationGetOK with default headers values +func NewStorageServiceSavedCachesLocationGetOK() *StorageServiceSavedCachesLocationGetOK { + return &StorageServiceSavedCachesLocationGetOK{} +} + +/*StorageServiceSavedCachesLocationGetOK handles this case with default header values. + +StorageServiceSavedCachesLocationGetOK storage service saved caches location get o k +*/ +type StorageServiceSavedCachesLocationGetOK struct { + Payload string +} + +func (o *StorageServiceSavedCachesLocationGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceSavedCachesLocationGetOK) 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 +} + +// NewStorageServiceSavedCachesLocationGetDefault creates a StorageServiceSavedCachesLocationGetDefault with default headers values +func NewStorageServiceSavedCachesLocationGetDefault(code int) *StorageServiceSavedCachesLocationGetDefault { + return &StorageServiceSavedCachesLocationGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSavedCachesLocationGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSavedCachesLocationGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service saved caches location get default response +func (o *StorageServiceSavedCachesLocationGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSavedCachesLocationGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSavedCachesLocationGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSavedCachesLocationGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_parameters.go new file mode 100644 index 00000000000..5ac4249786c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSchemaVersionGetParams creates a new StorageServiceSchemaVersionGetParams object +// with the default values initialized. +func NewStorageServiceSchemaVersionGetParams() *StorageServiceSchemaVersionGetParams { + + return &StorageServiceSchemaVersionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSchemaVersionGetParamsWithTimeout creates a new StorageServiceSchemaVersionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSchemaVersionGetParamsWithTimeout(timeout time.Duration) *StorageServiceSchemaVersionGetParams { + + return &StorageServiceSchemaVersionGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSchemaVersionGetParamsWithContext creates a new StorageServiceSchemaVersionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSchemaVersionGetParamsWithContext(ctx context.Context) *StorageServiceSchemaVersionGetParams { + + return &StorageServiceSchemaVersionGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSchemaVersionGetParamsWithHTTPClient creates a new StorageServiceSchemaVersionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSchemaVersionGetParamsWithHTTPClient(client *http.Client) *StorageServiceSchemaVersionGetParams { + + return &StorageServiceSchemaVersionGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSchemaVersionGetParams contains all the parameters to send to the API endpoint +for the storage service schema version get operation typically these are written to a http.Request +*/ +type StorageServiceSchemaVersionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) WithTimeout(timeout time.Duration) *StorageServiceSchemaVersionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) WithContext(ctx context.Context) *StorageServiceSchemaVersionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) WithHTTPClient(client *http.Client) *StorageServiceSchemaVersionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service schema version get params +func (o *StorageServiceSchemaVersionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSchemaVersionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_responses.go new file mode 100644 index 00000000000..0cea0ffda01 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_schema_version_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSchemaVersionGetReader is a Reader for the StorageServiceSchemaVersionGet structure. +type StorageServiceSchemaVersionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSchemaVersionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSchemaVersionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSchemaVersionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSchemaVersionGetOK creates a StorageServiceSchemaVersionGetOK with default headers values +func NewStorageServiceSchemaVersionGetOK() *StorageServiceSchemaVersionGetOK { + return &StorageServiceSchemaVersionGetOK{} +} + +/*StorageServiceSchemaVersionGetOK handles this case with default header values. + +StorageServiceSchemaVersionGetOK storage service schema version get o k +*/ +type StorageServiceSchemaVersionGetOK struct { + Payload string +} + +func (o *StorageServiceSchemaVersionGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceSchemaVersionGetOK) 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 +} + +// NewStorageServiceSchemaVersionGetDefault creates a StorageServiceSchemaVersionGetDefault with default headers values +func NewStorageServiceSchemaVersionGetDefault(code int) *StorageServiceSchemaVersionGetDefault { + return &StorageServiceSchemaVersionGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSchemaVersionGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSchemaVersionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service schema version get default response +func (o *StorageServiceSchemaVersionGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSchemaVersionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSchemaVersionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSchemaVersionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_parameters.go new file mode 100644 index 00000000000..6a27c9fe658 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceScyllaReleaseVersionGetParams creates a new StorageServiceScyllaReleaseVersionGetParams object +// with the default values initialized. +func NewStorageServiceScyllaReleaseVersionGetParams() *StorageServiceScyllaReleaseVersionGetParams { + + return &StorageServiceScyllaReleaseVersionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceScyllaReleaseVersionGetParamsWithTimeout creates a new StorageServiceScyllaReleaseVersionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceScyllaReleaseVersionGetParamsWithTimeout(timeout time.Duration) *StorageServiceScyllaReleaseVersionGetParams { + + return &StorageServiceScyllaReleaseVersionGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceScyllaReleaseVersionGetParamsWithContext creates a new StorageServiceScyllaReleaseVersionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceScyllaReleaseVersionGetParamsWithContext(ctx context.Context) *StorageServiceScyllaReleaseVersionGetParams { + + return &StorageServiceScyllaReleaseVersionGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceScyllaReleaseVersionGetParamsWithHTTPClient creates a new StorageServiceScyllaReleaseVersionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceScyllaReleaseVersionGetParamsWithHTTPClient(client *http.Client) *StorageServiceScyllaReleaseVersionGetParams { + + return &StorageServiceScyllaReleaseVersionGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceScyllaReleaseVersionGetParams contains all the parameters to send to the API endpoint +for the storage service scylla release version get operation typically these are written to a http.Request +*/ +type StorageServiceScyllaReleaseVersionGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) WithTimeout(timeout time.Duration) *StorageServiceScyllaReleaseVersionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) WithContext(ctx context.Context) *StorageServiceScyllaReleaseVersionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) WithHTTPClient(client *http.Client) *StorageServiceScyllaReleaseVersionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service scylla release version get params +func (o *StorageServiceScyllaReleaseVersionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceScyllaReleaseVersionGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_responses.go new file mode 100644 index 00000000000..4b465db6a9e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_scylla_release_version_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceScyllaReleaseVersionGetReader is a Reader for the StorageServiceScyllaReleaseVersionGet structure. +type StorageServiceScyllaReleaseVersionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceScyllaReleaseVersionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceScyllaReleaseVersionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceScyllaReleaseVersionGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceScyllaReleaseVersionGetOK creates a StorageServiceScyllaReleaseVersionGetOK with default headers values +func NewStorageServiceScyllaReleaseVersionGetOK() *StorageServiceScyllaReleaseVersionGetOK { + return &StorageServiceScyllaReleaseVersionGetOK{} +} + +/*StorageServiceScyllaReleaseVersionGetOK handles this case with default header values. + +StorageServiceScyllaReleaseVersionGetOK storage service scylla release version get o k +*/ +type StorageServiceScyllaReleaseVersionGetOK struct { + Payload string +} + +func (o *StorageServiceScyllaReleaseVersionGetOK) GetPayload() string { + return o.Payload +} + +func (o *StorageServiceScyllaReleaseVersionGetOK) 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 +} + +// NewStorageServiceScyllaReleaseVersionGetDefault creates a StorageServiceScyllaReleaseVersionGetDefault with default headers values +func NewStorageServiceScyllaReleaseVersionGetDefault(code int) *StorageServiceScyllaReleaseVersionGetDefault { + return &StorageServiceScyllaReleaseVersionGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceScyllaReleaseVersionGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceScyllaReleaseVersionGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service scylla release version get default response +func (o *StorageServiceScyllaReleaseVersionGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceScyllaReleaseVersionGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceScyllaReleaseVersionGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceScyllaReleaseVersionGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_parameters.go new file mode 100644 index 00000000000..0cd78f83bd6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSlowQueryGetParams creates a new StorageServiceSlowQueryGetParams object +// with the default values initialized. +func NewStorageServiceSlowQueryGetParams() *StorageServiceSlowQueryGetParams { + + return &StorageServiceSlowQueryGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSlowQueryGetParamsWithTimeout creates a new StorageServiceSlowQueryGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSlowQueryGetParamsWithTimeout(timeout time.Duration) *StorageServiceSlowQueryGetParams { + + return &StorageServiceSlowQueryGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSlowQueryGetParamsWithContext creates a new StorageServiceSlowQueryGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSlowQueryGetParamsWithContext(ctx context.Context) *StorageServiceSlowQueryGetParams { + + return &StorageServiceSlowQueryGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSlowQueryGetParamsWithHTTPClient creates a new StorageServiceSlowQueryGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSlowQueryGetParamsWithHTTPClient(client *http.Client) *StorageServiceSlowQueryGetParams { + + return &StorageServiceSlowQueryGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSlowQueryGetParams contains all the parameters to send to the API endpoint +for the storage service slow query get operation typically these are written to a http.Request +*/ +type StorageServiceSlowQueryGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) WithTimeout(timeout time.Duration) *StorageServiceSlowQueryGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) WithContext(ctx context.Context) *StorageServiceSlowQueryGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) WithHTTPClient(client *http.Client) *StorageServiceSlowQueryGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service slow query get params +func (o *StorageServiceSlowQueryGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSlowQueryGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_responses.go new file mode 100644 index 00000000000..f8bbdd06934 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_get_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSlowQueryGetReader is a Reader for the StorageServiceSlowQueryGet structure. +type StorageServiceSlowQueryGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSlowQueryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSlowQueryGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSlowQueryGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSlowQueryGetOK creates a StorageServiceSlowQueryGetOK with default headers values +func NewStorageServiceSlowQueryGetOK() *StorageServiceSlowQueryGetOK { + return &StorageServiceSlowQueryGetOK{} +} + +/*StorageServiceSlowQueryGetOK handles this case with default header values. + +StorageServiceSlowQueryGetOK storage service slow query get o k +*/ +type StorageServiceSlowQueryGetOK struct { + Payload *models.SlowQueryInfo +} + +func (o *StorageServiceSlowQueryGetOK) GetPayload() *models.SlowQueryInfo { + return o.Payload +} + +func (o *StorageServiceSlowQueryGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.SlowQueryInfo) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStorageServiceSlowQueryGetDefault creates a StorageServiceSlowQueryGetDefault with default headers values +func NewStorageServiceSlowQueryGetDefault(code int) *StorageServiceSlowQueryGetDefault { + return &StorageServiceSlowQueryGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSlowQueryGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSlowQueryGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service slow query get default response +func (o *StorageServiceSlowQueryGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSlowQueryGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSlowQueryGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSlowQueryGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_parameters.go new file mode 100644 index 00000000000..cd0e00ace24 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_parameters.go @@ -0,0 +1,212 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSlowQueryPostParams creates a new StorageServiceSlowQueryPostParams object +// with the default values initialized. +func NewStorageServiceSlowQueryPostParams() *StorageServiceSlowQueryPostParams { + var () + return &StorageServiceSlowQueryPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSlowQueryPostParamsWithTimeout creates a new StorageServiceSlowQueryPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSlowQueryPostParamsWithTimeout(timeout time.Duration) *StorageServiceSlowQueryPostParams { + var () + return &StorageServiceSlowQueryPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSlowQueryPostParamsWithContext creates a new StorageServiceSlowQueryPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSlowQueryPostParamsWithContext(ctx context.Context) *StorageServiceSlowQueryPostParams { + var () + return &StorageServiceSlowQueryPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceSlowQueryPostParamsWithHTTPClient creates a new StorageServiceSlowQueryPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSlowQueryPostParamsWithHTTPClient(client *http.Client) *StorageServiceSlowQueryPostParams { + var () + return &StorageServiceSlowQueryPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceSlowQueryPostParams contains all the parameters to send to the API endpoint +for the storage service slow query post operation typically these are written to a http.Request +*/ +type StorageServiceSlowQueryPostParams struct { + + /*Enable + set it to true to enable, anything else to disable + + */ + Enable *bool + /*Threshold + Slow query record threshold in microseconds + + */ + Threshold *string + /*TTL + TTL in seconds + + */ + TTL *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithTimeout(timeout time.Duration) *StorageServiceSlowQueryPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithContext(ctx context.Context) *StorageServiceSlowQueryPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithHTTPClient(client *http.Client) *StorageServiceSlowQueryPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnable adds the enable to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithEnable(enable *bool) *StorageServiceSlowQueryPostParams { + o.SetEnable(enable) + return o +} + +// SetEnable adds the enable to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetEnable(enable *bool) { + o.Enable = enable +} + +// WithThreshold adds the threshold to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithThreshold(threshold *string) *StorageServiceSlowQueryPostParams { + o.SetThreshold(threshold) + return o +} + +// SetThreshold adds the threshold to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetThreshold(threshold *string) { + o.Threshold = threshold +} + +// WithTTL adds the ttl to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) WithTTL(ttl *string) *StorageServiceSlowQueryPostParams { + o.SetTTL(ttl) + return o +} + +// SetTTL adds the ttl to the storage service slow query post params +func (o *StorageServiceSlowQueryPostParams) SetTTL(ttl *string) { + o.TTL = ttl +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSlowQueryPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Enable != nil { + + // query param enable + var qrEnable bool + if o.Enable != nil { + qrEnable = *o.Enable + } + qEnable := swag.FormatBool(qrEnable) + if qEnable != "" { + if err := r.SetQueryParam("enable", qEnable); err != nil { + return err + } + } + + } + + if o.Threshold != nil { + + // query param threshold + var qrThreshold string + if o.Threshold != nil { + qrThreshold = *o.Threshold + } + qThreshold := qrThreshold + if qThreshold != "" { + if err := r.SetQueryParam("threshold", qThreshold); err != nil { + return err + } + } + + } + + if o.TTL != nil { + + // query param ttl + var qrTTL string + if o.TTL != nil { + qrTTL = *o.TTL + } + qTTL := qrTTL + if qTTL != "" { + if err := r.SetQueryParam("ttl", qTTL); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_responses.go new file mode 100644 index 00000000000..8b8778e598f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_slow_query_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSlowQueryPostReader is a Reader for the StorageServiceSlowQueryPost structure. +type StorageServiceSlowQueryPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSlowQueryPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSlowQueryPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSlowQueryPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSlowQueryPostOK creates a StorageServiceSlowQueryPostOK with default headers values +func NewStorageServiceSlowQueryPostOK() *StorageServiceSlowQueryPostOK { + return &StorageServiceSlowQueryPostOK{} +} + +/*StorageServiceSlowQueryPostOK handles this case with default header values. + +StorageServiceSlowQueryPostOK storage service slow query post o k +*/ +type StorageServiceSlowQueryPostOK struct { +} + +func (o *StorageServiceSlowQueryPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceSlowQueryPostDefault creates a StorageServiceSlowQueryPostDefault with default headers values +func NewStorageServiceSlowQueryPostDefault(code int) *StorageServiceSlowQueryPostDefault { + return &StorageServiceSlowQueryPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceSlowQueryPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSlowQueryPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service slow query post default response +func (o *StorageServiceSlowQueryPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSlowQueryPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSlowQueryPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSlowQueryPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_parameters.go new file mode 100644 index 00000000000..87da3640303 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_parameters.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSnapshotsDeleteParams creates a new StorageServiceSnapshotsDeleteParams object +// with the default values initialized. +func NewStorageServiceSnapshotsDeleteParams() *StorageServiceSnapshotsDeleteParams { + var () + return &StorageServiceSnapshotsDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSnapshotsDeleteParamsWithTimeout creates a new StorageServiceSnapshotsDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSnapshotsDeleteParamsWithTimeout(timeout time.Duration) *StorageServiceSnapshotsDeleteParams { + var () + return &StorageServiceSnapshotsDeleteParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSnapshotsDeleteParamsWithContext creates a new StorageServiceSnapshotsDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSnapshotsDeleteParamsWithContext(ctx context.Context) *StorageServiceSnapshotsDeleteParams { + var () + return &StorageServiceSnapshotsDeleteParams{ + + Context: ctx, + } +} + +// NewStorageServiceSnapshotsDeleteParamsWithHTTPClient creates a new StorageServiceSnapshotsDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSnapshotsDeleteParamsWithHTTPClient(client *http.Client) *StorageServiceSnapshotsDeleteParams { + var () + return &StorageServiceSnapshotsDeleteParams{ + HTTPClient: client, + } +} + +/*StorageServiceSnapshotsDeleteParams contains all the parameters to send to the API endpoint +for the storage service snapshots delete operation typically these are written to a http.Request +*/ +type StorageServiceSnapshotsDeleteParams struct { + + /*Kn + Comma seperated keyspaces name to snapshot + + */ + Kn *string + /*Tag + the tag given to the snapshot + + */ + Tag *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) WithTimeout(timeout time.Duration) *StorageServiceSnapshotsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) WithContext(ctx context.Context) *StorageServiceSnapshotsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) WithHTTPClient(client *http.Client) *StorageServiceSnapshotsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKn adds the kn to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) WithKn(kn *string) *StorageServiceSnapshotsDeleteParams { + o.SetKn(kn) + return o +} + +// SetKn adds the kn to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) SetKn(kn *string) { + o.Kn = kn +} + +// WithTag adds the tag to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) WithTag(tag *string) *StorageServiceSnapshotsDeleteParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the storage service snapshots delete params +func (o *StorageServiceSnapshotsDeleteParams) SetTag(tag *string) { + o.Tag = tag +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSnapshotsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Kn != nil { + + // query param kn + var qrKn string + if o.Kn != nil { + qrKn = *o.Kn + } + qKn := qrKn + if qKn != "" { + if err := r.SetQueryParam("kn", qKn); err != nil { + return err + } + } + + } + + if o.Tag != nil { + + // query param tag + var qrTag string + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_responses.go new file mode 100644 index 00000000000..f2f16ca293d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_delete_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSnapshotsDeleteReader is a Reader for the StorageServiceSnapshotsDelete structure. +type StorageServiceSnapshotsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSnapshotsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSnapshotsDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSnapshotsDeleteDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSnapshotsDeleteOK creates a StorageServiceSnapshotsDeleteOK with default headers values +func NewStorageServiceSnapshotsDeleteOK() *StorageServiceSnapshotsDeleteOK { + return &StorageServiceSnapshotsDeleteOK{} +} + +/*StorageServiceSnapshotsDeleteOK handles this case with default header values. + +StorageServiceSnapshotsDeleteOK storage service snapshots delete o k +*/ +type StorageServiceSnapshotsDeleteOK struct { +} + +func (o *StorageServiceSnapshotsDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceSnapshotsDeleteDefault creates a StorageServiceSnapshotsDeleteDefault with default headers values +func NewStorageServiceSnapshotsDeleteDefault(code int) *StorageServiceSnapshotsDeleteDefault { + return &StorageServiceSnapshotsDeleteDefault{ + _statusCode: code, + } +} + +/*StorageServiceSnapshotsDeleteDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSnapshotsDeleteDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service snapshots delete default response +func (o *StorageServiceSnapshotsDeleteDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSnapshotsDeleteDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSnapshotsDeleteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSnapshotsDeleteDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_parameters.go new file mode 100644 index 00000000000..bafaf5b8edc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSnapshotsGetParams creates a new StorageServiceSnapshotsGetParams object +// with the default values initialized. +func NewStorageServiceSnapshotsGetParams() *StorageServiceSnapshotsGetParams { + + return &StorageServiceSnapshotsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSnapshotsGetParamsWithTimeout creates a new StorageServiceSnapshotsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSnapshotsGetParamsWithTimeout(timeout time.Duration) *StorageServiceSnapshotsGetParams { + + return &StorageServiceSnapshotsGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSnapshotsGetParamsWithContext creates a new StorageServiceSnapshotsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSnapshotsGetParamsWithContext(ctx context.Context) *StorageServiceSnapshotsGetParams { + + return &StorageServiceSnapshotsGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSnapshotsGetParamsWithHTTPClient creates a new StorageServiceSnapshotsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSnapshotsGetParamsWithHTTPClient(client *http.Client) *StorageServiceSnapshotsGetParams { + + return &StorageServiceSnapshotsGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSnapshotsGetParams contains all the parameters to send to the API endpoint +for the storage service snapshots get operation typically these are written to a http.Request +*/ +type StorageServiceSnapshotsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) WithTimeout(timeout time.Duration) *StorageServiceSnapshotsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) WithContext(ctx context.Context) *StorageServiceSnapshotsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) WithHTTPClient(client *http.Client) *StorageServiceSnapshotsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service snapshots get params +func (o *StorageServiceSnapshotsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSnapshotsGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_responses.go new file mode 100644 index 00000000000..b8355f8448f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSnapshotsGetReader is a Reader for the StorageServiceSnapshotsGet structure. +type StorageServiceSnapshotsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSnapshotsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSnapshotsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSnapshotsGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSnapshotsGetOK creates a StorageServiceSnapshotsGetOK with default headers values +func NewStorageServiceSnapshotsGetOK() *StorageServiceSnapshotsGetOK { + return &StorageServiceSnapshotsGetOK{} +} + +/*StorageServiceSnapshotsGetOK handles this case with default header values. + +StorageServiceSnapshotsGetOK storage service snapshots get o k +*/ +type StorageServiceSnapshotsGetOK struct { + Payload []*models.Snapshots +} + +func (o *StorageServiceSnapshotsGetOK) GetPayload() []*models.Snapshots { + return o.Payload +} + +func (o *StorageServiceSnapshotsGetOK) 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 +} + +// NewStorageServiceSnapshotsGetDefault creates a StorageServiceSnapshotsGetDefault with default headers values +func NewStorageServiceSnapshotsGetDefault(code int) *StorageServiceSnapshotsGetDefault { + return &StorageServiceSnapshotsGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSnapshotsGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSnapshotsGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service snapshots get default response +func (o *StorageServiceSnapshotsGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSnapshotsGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSnapshotsGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSnapshotsGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_parameters.go new file mode 100644 index 00000000000..fec21bebffc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_parameters.go @@ -0,0 +1,211 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSnapshotsPostParams creates a new StorageServiceSnapshotsPostParams object +// with the default values initialized. +func NewStorageServiceSnapshotsPostParams() *StorageServiceSnapshotsPostParams { + var () + return &StorageServiceSnapshotsPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSnapshotsPostParamsWithTimeout creates a new StorageServiceSnapshotsPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSnapshotsPostParamsWithTimeout(timeout time.Duration) *StorageServiceSnapshotsPostParams { + var () + return &StorageServiceSnapshotsPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSnapshotsPostParamsWithContext creates a new StorageServiceSnapshotsPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSnapshotsPostParamsWithContext(ctx context.Context) *StorageServiceSnapshotsPostParams { + var () + return &StorageServiceSnapshotsPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceSnapshotsPostParamsWithHTTPClient creates a new StorageServiceSnapshotsPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSnapshotsPostParamsWithHTTPClient(client *http.Client) *StorageServiceSnapshotsPostParams { + var () + return &StorageServiceSnapshotsPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceSnapshotsPostParams contains all the parameters to send to the API endpoint +for the storage service snapshots post operation typically these are written to a http.Request +*/ +type StorageServiceSnapshotsPostParams struct { + + /*Cf + the column family to snapshot + + */ + Cf *string + /*Kn + Comma seperated keyspaces name to snapshot + + */ + Kn *string + /*Tag + the tag given to the snapshot + + */ + Tag *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithTimeout(timeout time.Duration) *StorageServiceSnapshotsPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithContext(ctx context.Context) *StorageServiceSnapshotsPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithHTTPClient(client *http.Client) *StorageServiceSnapshotsPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithCf(cf *string) *StorageServiceSnapshotsPostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKn adds the kn to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithKn(kn *string) *StorageServiceSnapshotsPostParams { + o.SetKn(kn) + return o +} + +// SetKn adds the kn to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetKn(kn *string) { + o.Kn = kn +} + +// WithTag adds the tag to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) WithTag(tag *string) *StorageServiceSnapshotsPostParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the storage service snapshots post params +func (o *StorageServiceSnapshotsPostParams) SetTag(tag *string) { + o.Tag = tag +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSnapshotsPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + if o.Kn != nil { + + // query param kn + var qrKn string + if o.Kn != nil { + qrKn = *o.Kn + } + qKn := qrKn + if qKn != "" { + if err := r.SetQueryParam("kn", qKn); err != nil { + return err + } + } + + } + + if o.Tag != nil { + + // query param tag + var qrTag string + if o.Tag != nil { + qrTag = *o.Tag + } + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_responses.go new file mode 100644 index 00000000000..67da58cff83 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSnapshotsPostReader is a Reader for the StorageServiceSnapshotsPost structure. +type StorageServiceSnapshotsPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSnapshotsPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSnapshotsPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSnapshotsPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSnapshotsPostOK creates a StorageServiceSnapshotsPostOK with default headers values +func NewStorageServiceSnapshotsPostOK() *StorageServiceSnapshotsPostOK { + return &StorageServiceSnapshotsPostOK{} +} + +/*StorageServiceSnapshotsPostOK handles this case with default header values. + +StorageServiceSnapshotsPostOK storage service snapshots post o k +*/ +type StorageServiceSnapshotsPostOK struct { +} + +func (o *StorageServiceSnapshotsPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceSnapshotsPostDefault creates a StorageServiceSnapshotsPostDefault with default headers values +func NewStorageServiceSnapshotsPostDefault(code int) *StorageServiceSnapshotsPostDefault { + return &StorageServiceSnapshotsPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceSnapshotsPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSnapshotsPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service snapshots post default response +func (o *StorageServiceSnapshotsPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSnapshotsPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSnapshotsPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSnapshotsPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_parameters.go new file mode 100644 index 00000000000..2264ff9b6e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSnapshotsSizeTrueGetParams creates a new StorageServiceSnapshotsSizeTrueGetParams object +// with the default values initialized. +func NewStorageServiceSnapshotsSizeTrueGetParams() *StorageServiceSnapshotsSizeTrueGetParams { + + return &StorageServiceSnapshotsSizeTrueGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSnapshotsSizeTrueGetParamsWithTimeout creates a new StorageServiceSnapshotsSizeTrueGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSnapshotsSizeTrueGetParamsWithTimeout(timeout time.Duration) *StorageServiceSnapshotsSizeTrueGetParams { + + return &StorageServiceSnapshotsSizeTrueGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSnapshotsSizeTrueGetParamsWithContext creates a new StorageServiceSnapshotsSizeTrueGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSnapshotsSizeTrueGetParamsWithContext(ctx context.Context) *StorageServiceSnapshotsSizeTrueGetParams { + + return &StorageServiceSnapshotsSizeTrueGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceSnapshotsSizeTrueGetParamsWithHTTPClient creates a new StorageServiceSnapshotsSizeTrueGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSnapshotsSizeTrueGetParamsWithHTTPClient(client *http.Client) *StorageServiceSnapshotsSizeTrueGetParams { + + return &StorageServiceSnapshotsSizeTrueGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceSnapshotsSizeTrueGetParams contains all the parameters to send to the API endpoint +for the storage service snapshots size true get operation typically these are written to a http.Request +*/ +type StorageServiceSnapshotsSizeTrueGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) WithTimeout(timeout time.Duration) *StorageServiceSnapshotsSizeTrueGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) WithContext(ctx context.Context) *StorageServiceSnapshotsSizeTrueGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) WithHTTPClient(client *http.Client) *StorageServiceSnapshotsSizeTrueGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service snapshots size true get params +func (o *StorageServiceSnapshotsSizeTrueGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSnapshotsSizeTrueGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_responses.go new file mode 100644 index 00000000000..cd72557f8f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_snapshots_size_true_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSnapshotsSizeTrueGetReader is a Reader for the StorageServiceSnapshotsSizeTrueGet structure. +type StorageServiceSnapshotsSizeTrueGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSnapshotsSizeTrueGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSnapshotsSizeTrueGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSnapshotsSizeTrueGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSnapshotsSizeTrueGetOK creates a StorageServiceSnapshotsSizeTrueGetOK with default headers values +func NewStorageServiceSnapshotsSizeTrueGetOK() *StorageServiceSnapshotsSizeTrueGetOK { + return &StorageServiceSnapshotsSizeTrueGetOK{} +} + +/*StorageServiceSnapshotsSizeTrueGetOK handles this case with default header values. + +StorageServiceSnapshotsSizeTrueGetOK storage service snapshots size true get o k +*/ +type StorageServiceSnapshotsSizeTrueGetOK struct { + Payload interface{} +} + +func (o *StorageServiceSnapshotsSizeTrueGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageServiceSnapshotsSizeTrueGetOK) 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 +} + +// NewStorageServiceSnapshotsSizeTrueGetDefault creates a StorageServiceSnapshotsSizeTrueGetDefault with default headers values +func NewStorageServiceSnapshotsSizeTrueGetDefault(code int) *StorageServiceSnapshotsSizeTrueGetDefault { + return &StorageServiceSnapshotsSizeTrueGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceSnapshotsSizeTrueGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSnapshotsSizeTrueGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service snapshots size true get default response +func (o *StorageServiceSnapshotsSizeTrueGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSnapshotsSizeTrueGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSnapshotsSizeTrueGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSnapshotsSizeTrueGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..b1be47046e3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceSstablesByKeyspacePostParams creates a new StorageServiceSstablesByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceSstablesByKeyspacePostParams() *StorageServiceSstablesByKeyspacePostParams { + var () + return &StorageServiceSstablesByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceSstablesByKeyspacePostParamsWithTimeout creates a new StorageServiceSstablesByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceSstablesByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceSstablesByKeyspacePostParams { + var () + return &StorageServiceSstablesByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceSstablesByKeyspacePostParamsWithContext creates a new StorageServiceSstablesByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceSstablesByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceSstablesByKeyspacePostParams { + var () + return &StorageServiceSstablesByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceSstablesByKeyspacePostParamsWithHTTPClient creates a new StorageServiceSstablesByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceSstablesByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceSstablesByKeyspacePostParams { + var () + return &StorageServiceSstablesByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceSstablesByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service sstables by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceSstablesByKeyspacePostParams struct { + + /*Cf + Column family name + + */ + Cf string + /*Keyspace + The keyspace + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceSstablesByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceSstablesByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceSstablesByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) WithCf(cf string) *StorageServiceSstablesByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) SetCf(cf string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceSstablesByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service sstables by keyspace post params +func (o *StorageServiceSstablesByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceSstablesByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cf + qrCf := o.Cf + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_responses.go new file mode 100644 index 00000000000..a066ad906f3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_sstables_by_keyspace_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceSstablesByKeyspacePostReader is a Reader for the StorageServiceSstablesByKeyspacePost structure. +type StorageServiceSstablesByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceSstablesByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceSstablesByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceSstablesByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceSstablesByKeyspacePostOK creates a StorageServiceSstablesByKeyspacePostOK with default headers values +func NewStorageServiceSstablesByKeyspacePostOK() *StorageServiceSstablesByKeyspacePostOK { + return &StorageServiceSstablesByKeyspacePostOK{} +} + +/*StorageServiceSstablesByKeyspacePostOK handles this case with default header values. + +StorageServiceSstablesByKeyspacePostOK storage service sstables by keyspace post o k +*/ +type StorageServiceSstablesByKeyspacePostOK struct { +} + +func (o *StorageServiceSstablesByKeyspacePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceSstablesByKeyspacePostDefault creates a StorageServiceSstablesByKeyspacePostDefault with default headers values +func NewStorageServiceSstablesByKeyspacePostDefault(code int) *StorageServiceSstablesByKeyspacePostDefault { + return &StorageServiceSstablesByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceSstablesByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceSstablesByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service sstables by keyspace post default response +func (o *StorageServiceSstablesByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceSstablesByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceSstablesByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceSstablesByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_parameters.go new file mode 100644 index 00000000000..8b1e18ca271 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceStopDaemonPostParams creates a new StorageServiceStopDaemonPostParams object +// with the default values initialized. +func NewStorageServiceStopDaemonPostParams() *StorageServiceStopDaemonPostParams { + + return &StorageServiceStopDaemonPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceStopDaemonPostParamsWithTimeout creates a new StorageServiceStopDaemonPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceStopDaemonPostParamsWithTimeout(timeout time.Duration) *StorageServiceStopDaemonPostParams { + + return &StorageServiceStopDaemonPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceStopDaemonPostParamsWithContext creates a new StorageServiceStopDaemonPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceStopDaemonPostParamsWithContext(ctx context.Context) *StorageServiceStopDaemonPostParams { + + return &StorageServiceStopDaemonPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceStopDaemonPostParamsWithHTTPClient creates a new StorageServiceStopDaemonPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceStopDaemonPostParamsWithHTTPClient(client *http.Client) *StorageServiceStopDaemonPostParams { + + return &StorageServiceStopDaemonPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceStopDaemonPostParams contains all the parameters to send to the API endpoint +for the storage service stop daemon post operation typically these are written to a http.Request +*/ +type StorageServiceStopDaemonPostParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) WithTimeout(timeout time.Duration) *StorageServiceStopDaemonPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) WithContext(ctx context.Context) *StorageServiceStopDaemonPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) WithHTTPClient(client *http.Client) *StorageServiceStopDaemonPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service stop daemon post params +func (o *StorageServiceStopDaemonPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceStopDaemonPostParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_responses.go new file mode 100644 index 00000000000..69a115884a4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stop_daemon_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceStopDaemonPostReader is a Reader for the StorageServiceStopDaemonPost structure. +type StorageServiceStopDaemonPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceStopDaemonPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceStopDaemonPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceStopDaemonPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceStopDaemonPostOK creates a StorageServiceStopDaemonPostOK with default headers values +func NewStorageServiceStopDaemonPostOK() *StorageServiceStopDaemonPostOK { + return &StorageServiceStopDaemonPostOK{} +} + +/*StorageServiceStopDaemonPostOK handles this case with default header values. + +StorageServiceStopDaemonPostOK storage service stop daemon post o k +*/ +type StorageServiceStopDaemonPostOK struct { +} + +func (o *StorageServiceStopDaemonPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceStopDaemonPostDefault creates a StorageServiceStopDaemonPostDefault with default headers values +func NewStorageServiceStopDaemonPostDefault(code int) *StorageServiceStopDaemonPostDefault { + return &StorageServiceStopDaemonPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceStopDaemonPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceStopDaemonPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service stop daemon post default response +func (o *StorageServiceStopDaemonPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceStopDaemonPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceStopDaemonPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceStopDaemonPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_parameters.go new file mode 100644 index 00000000000..a84246311b3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceStreamThroughputGetParams creates a new StorageServiceStreamThroughputGetParams object +// with the default values initialized. +func NewStorageServiceStreamThroughputGetParams() *StorageServiceStreamThroughputGetParams { + + return &StorageServiceStreamThroughputGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceStreamThroughputGetParamsWithTimeout creates a new StorageServiceStreamThroughputGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceStreamThroughputGetParamsWithTimeout(timeout time.Duration) *StorageServiceStreamThroughputGetParams { + + return &StorageServiceStreamThroughputGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceStreamThroughputGetParamsWithContext creates a new StorageServiceStreamThroughputGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceStreamThroughputGetParamsWithContext(ctx context.Context) *StorageServiceStreamThroughputGetParams { + + return &StorageServiceStreamThroughputGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceStreamThroughputGetParamsWithHTTPClient creates a new StorageServiceStreamThroughputGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceStreamThroughputGetParamsWithHTTPClient(client *http.Client) *StorageServiceStreamThroughputGetParams { + + return &StorageServiceStreamThroughputGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceStreamThroughputGetParams contains all the parameters to send to the API endpoint +for the storage service stream throughput get operation typically these are written to a http.Request +*/ +type StorageServiceStreamThroughputGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) WithTimeout(timeout time.Duration) *StorageServiceStreamThroughputGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) WithContext(ctx context.Context) *StorageServiceStreamThroughputGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) WithHTTPClient(client *http.Client) *StorageServiceStreamThroughputGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service stream throughput get params +func (o *StorageServiceStreamThroughputGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceStreamThroughputGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_responses.go new file mode 100644 index 00000000000..42dc2a799f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceStreamThroughputGetReader is a Reader for the StorageServiceStreamThroughputGet structure. +type StorageServiceStreamThroughputGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceStreamThroughputGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceStreamThroughputGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceStreamThroughputGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceStreamThroughputGetOK creates a StorageServiceStreamThroughputGetOK with default headers values +func NewStorageServiceStreamThroughputGetOK() *StorageServiceStreamThroughputGetOK { + return &StorageServiceStreamThroughputGetOK{} +} + +/*StorageServiceStreamThroughputGetOK handles this case with default header values. + +StorageServiceStreamThroughputGetOK storage service stream throughput get o k +*/ +type StorageServiceStreamThroughputGetOK struct { + Payload int32 +} + +func (o *StorageServiceStreamThroughputGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceStreamThroughputGetOK) 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 +} + +// NewStorageServiceStreamThroughputGetDefault creates a StorageServiceStreamThroughputGetDefault with default headers values +func NewStorageServiceStreamThroughputGetDefault(code int) *StorageServiceStreamThroughputGetDefault { + return &StorageServiceStreamThroughputGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceStreamThroughputGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceStreamThroughputGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service stream throughput get default response +func (o *StorageServiceStreamThroughputGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceStreamThroughputGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceStreamThroughputGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceStreamThroughputGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_parameters.go new file mode 100644 index 00000000000..fe7d5d2c2d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceStreamThroughputPostParams creates a new StorageServiceStreamThroughputPostParams object +// with the default values initialized. +func NewStorageServiceStreamThroughputPostParams() *StorageServiceStreamThroughputPostParams { + var () + return &StorageServiceStreamThroughputPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceStreamThroughputPostParamsWithTimeout creates a new StorageServiceStreamThroughputPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceStreamThroughputPostParamsWithTimeout(timeout time.Duration) *StorageServiceStreamThroughputPostParams { + var () + return &StorageServiceStreamThroughputPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceStreamThroughputPostParamsWithContext creates a new StorageServiceStreamThroughputPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceStreamThroughputPostParamsWithContext(ctx context.Context) *StorageServiceStreamThroughputPostParams { + var () + return &StorageServiceStreamThroughputPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceStreamThroughputPostParamsWithHTTPClient creates a new StorageServiceStreamThroughputPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceStreamThroughputPostParamsWithHTTPClient(client *http.Client) *StorageServiceStreamThroughputPostParams { + var () + return &StorageServiceStreamThroughputPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceStreamThroughputPostParams contains all the parameters to send to the API endpoint +for the storage service stream throughput post operation typically these are written to a http.Request +*/ +type StorageServiceStreamThroughputPostParams struct { + + /*Value + Stream throughput + + */ + Value int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) WithTimeout(timeout time.Duration) *StorageServiceStreamThroughputPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) WithContext(ctx context.Context) *StorageServiceStreamThroughputPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) WithHTTPClient(client *http.Client) *StorageServiceStreamThroughputPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithValue adds the value to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) WithValue(value int32) *StorageServiceStreamThroughputPostParams { + o.SetValue(value) + return o +} + +// SetValue adds the value to the storage service stream throughput post params +func (o *StorageServiceStreamThroughputPostParams) SetValue(value int32) { + o.Value = value +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceStreamThroughputPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param value + qrValue := o.Value + qValue := swag.FormatInt32(qrValue) + if qValue != "" { + if err := r.SetQueryParam("value", qValue); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_responses.go new file mode 100644 index 00000000000..c51206c2a32 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_stream_throughput_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceStreamThroughputPostReader is a Reader for the StorageServiceStreamThroughputPost structure. +type StorageServiceStreamThroughputPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceStreamThroughputPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceStreamThroughputPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceStreamThroughputPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceStreamThroughputPostOK creates a StorageServiceStreamThroughputPostOK with default headers values +func NewStorageServiceStreamThroughputPostOK() *StorageServiceStreamThroughputPostOK { + return &StorageServiceStreamThroughputPostOK{} +} + +/*StorageServiceStreamThroughputPostOK handles this case with default header values. + +StorageServiceStreamThroughputPostOK storage service stream throughput post o k +*/ +type StorageServiceStreamThroughputPostOK struct { +} + +func (o *StorageServiceStreamThroughputPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceStreamThroughputPostDefault creates a StorageServiceStreamThroughputPostDefault with default headers values +func NewStorageServiceStreamThroughputPostDefault(code int) *StorageServiceStreamThroughputPostDefault { + return &StorageServiceStreamThroughputPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceStreamThroughputPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceStreamThroughputPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service stream throughput post default response +func (o *StorageServiceStreamThroughputPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceStreamThroughputPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceStreamThroughputPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceStreamThroughputPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_parameters.go new file mode 100644 index 00000000000..79c5c8cd37f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTokensByEndpointGetParams creates a new StorageServiceTokensByEndpointGetParams object +// with the default values initialized. +func NewStorageServiceTokensByEndpointGetParams() *StorageServiceTokensByEndpointGetParams { + var () + return &StorageServiceTokensByEndpointGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTokensByEndpointGetParamsWithTimeout creates a new StorageServiceTokensByEndpointGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTokensByEndpointGetParamsWithTimeout(timeout time.Duration) *StorageServiceTokensByEndpointGetParams { + var () + return &StorageServiceTokensByEndpointGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTokensByEndpointGetParamsWithContext creates a new StorageServiceTokensByEndpointGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTokensByEndpointGetParamsWithContext(ctx context.Context) *StorageServiceTokensByEndpointGetParams { + var () + return &StorageServiceTokensByEndpointGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTokensByEndpointGetParamsWithHTTPClient creates a new StorageServiceTokensByEndpointGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTokensByEndpointGetParamsWithHTTPClient(client *http.Client) *StorageServiceTokensByEndpointGetParams { + var () + return &StorageServiceTokensByEndpointGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTokensByEndpointGetParams contains all the parameters to send to the API endpoint +for the storage service tokens by endpoint get operation typically these are written to a http.Request +*/ +type StorageServiceTokensByEndpointGetParams struct { + + /*Endpoint + The endpoint + + */ + Endpoint string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) WithTimeout(timeout time.Duration) *StorageServiceTokensByEndpointGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) WithContext(ctx context.Context) *StorageServiceTokensByEndpointGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) WithHTTPClient(client *http.Client) *StorageServiceTokensByEndpointGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEndpoint adds the endpoint to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) WithEndpoint(endpoint string) *StorageServiceTokensByEndpointGetParams { + o.SetEndpoint(endpoint) + return o +} + +// SetEndpoint adds the endpoint to the storage service tokens by endpoint get params +func (o *StorageServiceTokensByEndpointGetParams) SetEndpoint(endpoint string) { + o.Endpoint = endpoint +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTokensByEndpointGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param endpoint + if err := r.SetPathParam("endpoint", o.Endpoint); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_responses.go new file mode 100644 index 00000000000..8e13d4da53d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_by_endpoint_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTokensByEndpointGetReader is a Reader for the StorageServiceTokensByEndpointGet structure. +type StorageServiceTokensByEndpointGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTokensByEndpointGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTokensByEndpointGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTokensByEndpointGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTokensByEndpointGetOK creates a StorageServiceTokensByEndpointGetOK with default headers values +func NewStorageServiceTokensByEndpointGetOK() *StorageServiceTokensByEndpointGetOK { + return &StorageServiceTokensByEndpointGetOK{} +} + +/*StorageServiceTokensByEndpointGetOK handles this case with default header values. + +StorageServiceTokensByEndpointGetOK storage service tokens by endpoint get o k +*/ +type StorageServiceTokensByEndpointGetOK struct { + Payload []string +} + +func (o *StorageServiceTokensByEndpointGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceTokensByEndpointGetOK) 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 +} + +// NewStorageServiceTokensByEndpointGetDefault creates a StorageServiceTokensByEndpointGetDefault with default headers values +func NewStorageServiceTokensByEndpointGetDefault(code int) *StorageServiceTokensByEndpointGetDefault { + return &StorageServiceTokensByEndpointGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTokensByEndpointGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTokensByEndpointGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tokens by endpoint get default response +func (o *StorageServiceTokensByEndpointGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTokensByEndpointGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTokensByEndpointGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTokensByEndpointGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_parameters.go new file mode 100644 index 00000000000..b1473745f71 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTokensEndpointGetParams creates a new StorageServiceTokensEndpointGetParams object +// with the default values initialized. +func NewStorageServiceTokensEndpointGetParams() *StorageServiceTokensEndpointGetParams { + + return &StorageServiceTokensEndpointGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTokensEndpointGetParamsWithTimeout creates a new StorageServiceTokensEndpointGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTokensEndpointGetParamsWithTimeout(timeout time.Duration) *StorageServiceTokensEndpointGetParams { + + return &StorageServiceTokensEndpointGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTokensEndpointGetParamsWithContext creates a new StorageServiceTokensEndpointGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTokensEndpointGetParamsWithContext(ctx context.Context) *StorageServiceTokensEndpointGetParams { + + return &StorageServiceTokensEndpointGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTokensEndpointGetParamsWithHTTPClient creates a new StorageServiceTokensEndpointGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTokensEndpointGetParamsWithHTTPClient(client *http.Client) *StorageServiceTokensEndpointGetParams { + + return &StorageServiceTokensEndpointGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTokensEndpointGetParams contains all the parameters to send to the API endpoint +for the storage service tokens endpoint get operation typically these are written to a http.Request +*/ +type StorageServiceTokensEndpointGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) WithTimeout(timeout time.Duration) *StorageServiceTokensEndpointGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) WithContext(ctx context.Context) *StorageServiceTokensEndpointGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) WithHTTPClient(client *http.Client) *StorageServiceTokensEndpointGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tokens endpoint get params +func (o *StorageServiceTokensEndpointGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTokensEndpointGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_responses.go new file mode 100644 index 00000000000..dc952e79f8c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_endpoint_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTokensEndpointGetReader is a Reader for the StorageServiceTokensEndpointGet structure. +type StorageServiceTokensEndpointGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTokensEndpointGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTokensEndpointGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTokensEndpointGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTokensEndpointGetOK creates a StorageServiceTokensEndpointGetOK with default headers values +func NewStorageServiceTokensEndpointGetOK() *StorageServiceTokensEndpointGetOK { + return &StorageServiceTokensEndpointGetOK{} +} + +/*StorageServiceTokensEndpointGetOK handles this case with default header values. + +StorageServiceTokensEndpointGetOK storage service tokens endpoint get o k +*/ +type StorageServiceTokensEndpointGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceTokensEndpointGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceTokensEndpointGetOK) 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 +} + +// NewStorageServiceTokensEndpointGetDefault creates a StorageServiceTokensEndpointGetDefault with default headers values +func NewStorageServiceTokensEndpointGetDefault(code int) *StorageServiceTokensEndpointGetDefault { + return &StorageServiceTokensEndpointGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTokensEndpointGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTokensEndpointGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tokens endpoint get default response +func (o *StorageServiceTokensEndpointGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTokensEndpointGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTokensEndpointGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTokensEndpointGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_parameters.go new file mode 100644 index 00000000000..532730b62ce --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTokensGetParams creates a new StorageServiceTokensGetParams object +// with the default values initialized. +func NewStorageServiceTokensGetParams() *StorageServiceTokensGetParams { + + return &StorageServiceTokensGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTokensGetParamsWithTimeout creates a new StorageServiceTokensGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTokensGetParamsWithTimeout(timeout time.Duration) *StorageServiceTokensGetParams { + + return &StorageServiceTokensGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTokensGetParamsWithContext creates a new StorageServiceTokensGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTokensGetParamsWithContext(ctx context.Context) *StorageServiceTokensGetParams { + + return &StorageServiceTokensGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTokensGetParamsWithHTTPClient creates a new StorageServiceTokensGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTokensGetParamsWithHTTPClient(client *http.Client) *StorageServiceTokensGetParams { + + return &StorageServiceTokensGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTokensGetParams contains all the parameters to send to the API endpoint +for the storage service tokens get operation typically these are written to a http.Request +*/ +type StorageServiceTokensGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tokens get params +func (o *StorageServiceTokensGetParams) WithTimeout(timeout time.Duration) *StorageServiceTokensGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tokens get params +func (o *StorageServiceTokensGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tokens get params +func (o *StorageServiceTokensGetParams) WithContext(ctx context.Context) *StorageServiceTokensGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tokens get params +func (o *StorageServiceTokensGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tokens get params +func (o *StorageServiceTokensGetParams) WithHTTPClient(client *http.Client) *StorageServiceTokensGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tokens get params +func (o *StorageServiceTokensGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTokensGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_responses.go new file mode 100644 index 00000000000..264a5e574a9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tokens_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTokensGetReader is a Reader for the StorageServiceTokensGet structure. +type StorageServiceTokensGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTokensGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTokensGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTokensGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTokensGetOK creates a StorageServiceTokensGetOK with default headers values +func NewStorageServiceTokensGetOK() *StorageServiceTokensGetOK { + return &StorageServiceTokensGetOK{} +} + +/*StorageServiceTokensGetOK handles this case with default header values. + +StorageServiceTokensGetOK storage service tokens get o k +*/ +type StorageServiceTokensGetOK struct { + Payload []string +} + +func (o *StorageServiceTokensGetOK) GetPayload() []string { + return o.Payload +} + +func (o *StorageServiceTokensGetOK) 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 +} + +// NewStorageServiceTokensGetDefault creates a StorageServiceTokensGetDefault with default headers values +func NewStorageServiceTokensGetDefault(code int) *StorageServiceTokensGetDefault { + return &StorageServiceTokensGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTokensGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTokensGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tokens get default response +func (o *StorageServiceTokensGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTokensGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTokensGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTokensGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_parameters.go new file mode 100644 index 00000000000..97d12c465c0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTombstoneFailureThresholdGetParams creates a new StorageServiceTombstoneFailureThresholdGetParams object +// with the default values initialized. +func NewStorageServiceTombstoneFailureThresholdGetParams() *StorageServiceTombstoneFailureThresholdGetParams { + + return &StorageServiceTombstoneFailureThresholdGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTombstoneFailureThresholdGetParamsWithTimeout creates a new StorageServiceTombstoneFailureThresholdGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTombstoneFailureThresholdGetParamsWithTimeout(timeout time.Duration) *StorageServiceTombstoneFailureThresholdGetParams { + + return &StorageServiceTombstoneFailureThresholdGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTombstoneFailureThresholdGetParamsWithContext creates a new StorageServiceTombstoneFailureThresholdGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTombstoneFailureThresholdGetParamsWithContext(ctx context.Context) *StorageServiceTombstoneFailureThresholdGetParams { + + return &StorageServiceTombstoneFailureThresholdGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTombstoneFailureThresholdGetParamsWithHTTPClient creates a new StorageServiceTombstoneFailureThresholdGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTombstoneFailureThresholdGetParamsWithHTTPClient(client *http.Client) *StorageServiceTombstoneFailureThresholdGetParams { + + return &StorageServiceTombstoneFailureThresholdGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTombstoneFailureThresholdGetParams contains all the parameters to send to the API endpoint +for the storage service tombstone failure threshold get operation typically these are written to a http.Request +*/ +type StorageServiceTombstoneFailureThresholdGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) WithTimeout(timeout time.Duration) *StorageServiceTombstoneFailureThresholdGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) WithContext(ctx context.Context) *StorageServiceTombstoneFailureThresholdGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) WithHTTPClient(client *http.Client) *StorageServiceTombstoneFailureThresholdGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tombstone failure threshold get params +func (o *StorageServiceTombstoneFailureThresholdGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTombstoneFailureThresholdGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_responses.go new file mode 100644 index 00000000000..4fc8020d8f6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTombstoneFailureThresholdGetReader is a Reader for the StorageServiceTombstoneFailureThresholdGet structure. +type StorageServiceTombstoneFailureThresholdGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTombstoneFailureThresholdGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTombstoneFailureThresholdGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTombstoneFailureThresholdGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTombstoneFailureThresholdGetOK creates a StorageServiceTombstoneFailureThresholdGetOK with default headers values +func NewStorageServiceTombstoneFailureThresholdGetOK() *StorageServiceTombstoneFailureThresholdGetOK { + return &StorageServiceTombstoneFailureThresholdGetOK{} +} + +/*StorageServiceTombstoneFailureThresholdGetOK handles this case with default header values. + +StorageServiceTombstoneFailureThresholdGetOK storage service tombstone failure threshold get o k +*/ +type StorageServiceTombstoneFailureThresholdGetOK struct { + Payload int32 +} + +func (o *StorageServiceTombstoneFailureThresholdGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceTombstoneFailureThresholdGetOK) 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 +} + +// NewStorageServiceTombstoneFailureThresholdGetDefault creates a StorageServiceTombstoneFailureThresholdGetDefault with default headers values +func NewStorageServiceTombstoneFailureThresholdGetDefault(code int) *StorageServiceTombstoneFailureThresholdGetDefault { + return &StorageServiceTombstoneFailureThresholdGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTombstoneFailureThresholdGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTombstoneFailureThresholdGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tombstone failure threshold get default response +func (o *StorageServiceTombstoneFailureThresholdGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTombstoneFailureThresholdGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTombstoneFailureThresholdGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTombstoneFailureThresholdGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_parameters.go new file mode 100644 index 00000000000..23fafb6e3ff --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTombstoneFailureThresholdPostParams creates a new StorageServiceTombstoneFailureThresholdPostParams object +// with the default values initialized. +func NewStorageServiceTombstoneFailureThresholdPostParams() *StorageServiceTombstoneFailureThresholdPostParams { + var () + return &StorageServiceTombstoneFailureThresholdPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTombstoneFailureThresholdPostParamsWithTimeout creates a new StorageServiceTombstoneFailureThresholdPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTombstoneFailureThresholdPostParamsWithTimeout(timeout time.Duration) *StorageServiceTombstoneFailureThresholdPostParams { + var () + return &StorageServiceTombstoneFailureThresholdPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTombstoneFailureThresholdPostParamsWithContext creates a new StorageServiceTombstoneFailureThresholdPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTombstoneFailureThresholdPostParamsWithContext(ctx context.Context) *StorageServiceTombstoneFailureThresholdPostParams { + var () + return &StorageServiceTombstoneFailureThresholdPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceTombstoneFailureThresholdPostParamsWithHTTPClient creates a new StorageServiceTombstoneFailureThresholdPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTombstoneFailureThresholdPostParamsWithHTTPClient(client *http.Client) *StorageServiceTombstoneFailureThresholdPostParams { + var () + return &StorageServiceTombstoneFailureThresholdPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceTombstoneFailureThresholdPostParams contains all the parameters to send to the API endpoint +for the storage service tombstone failure threshold post operation typically these are written to a http.Request +*/ +type StorageServiceTombstoneFailureThresholdPostParams struct { + + /*TombstoneDebugThreshold + tombstone debug threshold + + */ + TombstoneDebugThreshold int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) WithTimeout(timeout time.Duration) *StorageServiceTombstoneFailureThresholdPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) WithContext(ctx context.Context) *StorageServiceTombstoneFailureThresholdPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) WithHTTPClient(client *http.Client) *StorageServiceTombstoneFailureThresholdPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTombstoneDebugThreshold adds the tombstoneDebugThreshold to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) WithTombstoneDebugThreshold(tombstoneDebugThreshold int32) *StorageServiceTombstoneFailureThresholdPostParams { + o.SetTombstoneDebugThreshold(tombstoneDebugThreshold) + return o +} + +// SetTombstoneDebugThreshold adds the tombstoneDebugThreshold to the storage service tombstone failure threshold post params +func (o *StorageServiceTombstoneFailureThresholdPostParams) SetTombstoneDebugThreshold(tombstoneDebugThreshold int32) { + o.TombstoneDebugThreshold = tombstoneDebugThreshold +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTombstoneFailureThresholdPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param tombstone_debug_threshold + qrTombstoneDebugThreshold := o.TombstoneDebugThreshold + qTombstoneDebugThreshold := swag.FormatInt32(qrTombstoneDebugThreshold) + if qTombstoneDebugThreshold != "" { + if err := r.SetQueryParam("tombstone_debug_threshold", qTombstoneDebugThreshold); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_responses.go new file mode 100644 index 00000000000..96d83696b4c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_failure_threshold_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTombstoneFailureThresholdPostReader is a Reader for the StorageServiceTombstoneFailureThresholdPost structure. +type StorageServiceTombstoneFailureThresholdPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTombstoneFailureThresholdPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTombstoneFailureThresholdPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTombstoneFailureThresholdPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTombstoneFailureThresholdPostOK creates a StorageServiceTombstoneFailureThresholdPostOK with default headers values +func NewStorageServiceTombstoneFailureThresholdPostOK() *StorageServiceTombstoneFailureThresholdPostOK { + return &StorageServiceTombstoneFailureThresholdPostOK{} +} + +/*StorageServiceTombstoneFailureThresholdPostOK handles this case with default header values. + +StorageServiceTombstoneFailureThresholdPostOK storage service tombstone failure threshold post o k +*/ +type StorageServiceTombstoneFailureThresholdPostOK struct { +} + +func (o *StorageServiceTombstoneFailureThresholdPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceTombstoneFailureThresholdPostDefault creates a StorageServiceTombstoneFailureThresholdPostDefault with default headers values +func NewStorageServiceTombstoneFailureThresholdPostDefault(code int) *StorageServiceTombstoneFailureThresholdPostDefault { + return &StorageServiceTombstoneFailureThresholdPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceTombstoneFailureThresholdPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTombstoneFailureThresholdPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tombstone failure threshold post default response +func (o *StorageServiceTombstoneFailureThresholdPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTombstoneFailureThresholdPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTombstoneFailureThresholdPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTombstoneFailureThresholdPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_parameters.go new file mode 100644 index 00000000000..2234d0312a9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTombstoneWarnThresholdGetParams creates a new StorageServiceTombstoneWarnThresholdGetParams object +// with the default values initialized. +func NewStorageServiceTombstoneWarnThresholdGetParams() *StorageServiceTombstoneWarnThresholdGetParams { + + return &StorageServiceTombstoneWarnThresholdGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTombstoneWarnThresholdGetParamsWithTimeout creates a new StorageServiceTombstoneWarnThresholdGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTombstoneWarnThresholdGetParamsWithTimeout(timeout time.Duration) *StorageServiceTombstoneWarnThresholdGetParams { + + return &StorageServiceTombstoneWarnThresholdGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTombstoneWarnThresholdGetParamsWithContext creates a new StorageServiceTombstoneWarnThresholdGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTombstoneWarnThresholdGetParamsWithContext(ctx context.Context) *StorageServiceTombstoneWarnThresholdGetParams { + + return &StorageServiceTombstoneWarnThresholdGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTombstoneWarnThresholdGetParamsWithHTTPClient creates a new StorageServiceTombstoneWarnThresholdGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTombstoneWarnThresholdGetParamsWithHTTPClient(client *http.Client) *StorageServiceTombstoneWarnThresholdGetParams { + + return &StorageServiceTombstoneWarnThresholdGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTombstoneWarnThresholdGetParams contains all the parameters to send to the API endpoint +for the storage service tombstone warn threshold get operation typically these are written to a http.Request +*/ +type StorageServiceTombstoneWarnThresholdGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) WithTimeout(timeout time.Duration) *StorageServiceTombstoneWarnThresholdGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) WithContext(ctx context.Context) *StorageServiceTombstoneWarnThresholdGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) WithHTTPClient(client *http.Client) *StorageServiceTombstoneWarnThresholdGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tombstone warn threshold get params +func (o *StorageServiceTombstoneWarnThresholdGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTombstoneWarnThresholdGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_responses.go new file mode 100644 index 00000000000..66da500bab2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTombstoneWarnThresholdGetReader is a Reader for the StorageServiceTombstoneWarnThresholdGet structure. +type StorageServiceTombstoneWarnThresholdGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTombstoneWarnThresholdGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTombstoneWarnThresholdGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTombstoneWarnThresholdGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTombstoneWarnThresholdGetOK creates a StorageServiceTombstoneWarnThresholdGetOK with default headers values +func NewStorageServiceTombstoneWarnThresholdGetOK() *StorageServiceTombstoneWarnThresholdGetOK { + return &StorageServiceTombstoneWarnThresholdGetOK{} +} + +/*StorageServiceTombstoneWarnThresholdGetOK handles this case with default header values. + +StorageServiceTombstoneWarnThresholdGetOK storage service tombstone warn threshold get o k +*/ +type StorageServiceTombstoneWarnThresholdGetOK struct { + Payload int32 +} + +func (o *StorageServiceTombstoneWarnThresholdGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StorageServiceTombstoneWarnThresholdGetOK) 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 +} + +// NewStorageServiceTombstoneWarnThresholdGetDefault creates a StorageServiceTombstoneWarnThresholdGetDefault with default headers values +func NewStorageServiceTombstoneWarnThresholdGetDefault(code int) *StorageServiceTombstoneWarnThresholdGetDefault { + return &StorageServiceTombstoneWarnThresholdGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTombstoneWarnThresholdGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTombstoneWarnThresholdGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tombstone warn threshold get default response +func (o *StorageServiceTombstoneWarnThresholdGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTombstoneWarnThresholdGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTombstoneWarnThresholdGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTombstoneWarnThresholdGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_parameters.go new file mode 100644 index 00000000000..e2f7803dad0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_parameters.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTombstoneWarnThresholdPostParams creates a new StorageServiceTombstoneWarnThresholdPostParams object +// with the default values initialized. +func NewStorageServiceTombstoneWarnThresholdPostParams() *StorageServiceTombstoneWarnThresholdPostParams { + var () + return &StorageServiceTombstoneWarnThresholdPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTombstoneWarnThresholdPostParamsWithTimeout creates a new StorageServiceTombstoneWarnThresholdPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTombstoneWarnThresholdPostParamsWithTimeout(timeout time.Duration) *StorageServiceTombstoneWarnThresholdPostParams { + var () + return &StorageServiceTombstoneWarnThresholdPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTombstoneWarnThresholdPostParamsWithContext creates a new StorageServiceTombstoneWarnThresholdPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTombstoneWarnThresholdPostParamsWithContext(ctx context.Context) *StorageServiceTombstoneWarnThresholdPostParams { + var () + return &StorageServiceTombstoneWarnThresholdPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceTombstoneWarnThresholdPostParamsWithHTTPClient creates a new StorageServiceTombstoneWarnThresholdPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTombstoneWarnThresholdPostParamsWithHTTPClient(client *http.Client) *StorageServiceTombstoneWarnThresholdPostParams { + var () + return &StorageServiceTombstoneWarnThresholdPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceTombstoneWarnThresholdPostParams contains all the parameters to send to the API endpoint +for the storage service tombstone warn threshold post operation typically these are written to a http.Request +*/ +type StorageServiceTombstoneWarnThresholdPostParams struct { + + /*DebugThreshold + tombstone debug threshold + + */ + DebugThreshold int32 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) WithTimeout(timeout time.Duration) *StorageServiceTombstoneWarnThresholdPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) WithContext(ctx context.Context) *StorageServiceTombstoneWarnThresholdPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) WithHTTPClient(client *http.Client) *StorageServiceTombstoneWarnThresholdPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDebugThreshold adds the debugThreshold to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) WithDebugThreshold(debugThreshold int32) *StorageServiceTombstoneWarnThresholdPostParams { + o.SetDebugThreshold(debugThreshold) + return o +} + +// SetDebugThreshold adds the debugThreshold to the storage service tombstone warn threshold post params +func (o *StorageServiceTombstoneWarnThresholdPostParams) SetDebugThreshold(debugThreshold int32) { + o.DebugThreshold = debugThreshold +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTombstoneWarnThresholdPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param debug_threshold + qrDebugThreshold := o.DebugThreshold + qDebugThreshold := swag.FormatInt32(qrDebugThreshold) + if qDebugThreshold != "" { + if err := r.SetQueryParam("debug_threshold", qDebugThreshold); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_responses.go new file mode 100644 index 00000000000..1a2777c66ab --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_tombstone_warn_threshold_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTombstoneWarnThresholdPostReader is a Reader for the StorageServiceTombstoneWarnThresholdPost structure. +type StorageServiceTombstoneWarnThresholdPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTombstoneWarnThresholdPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTombstoneWarnThresholdPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTombstoneWarnThresholdPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTombstoneWarnThresholdPostOK creates a StorageServiceTombstoneWarnThresholdPostOK with default headers values +func NewStorageServiceTombstoneWarnThresholdPostOK() *StorageServiceTombstoneWarnThresholdPostOK { + return &StorageServiceTombstoneWarnThresholdPostOK{} +} + +/*StorageServiceTombstoneWarnThresholdPostOK handles this case with default header values. + +StorageServiceTombstoneWarnThresholdPostOK storage service tombstone warn threshold post o k +*/ +type StorageServiceTombstoneWarnThresholdPostOK struct { +} + +func (o *StorageServiceTombstoneWarnThresholdPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceTombstoneWarnThresholdPostDefault creates a StorageServiceTombstoneWarnThresholdPostDefault with default headers values +func NewStorageServiceTombstoneWarnThresholdPostDefault(code int) *StorageServiceTombstoneWarnThresholdPostDefault { + return &StorageServiceTombstoneWarnThresholdPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceTombstoneWarnThresholdPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTombstoneWarnThresholdPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service tombstone warn threshold post default response +func (o *StorageServiceTombstoneWarnThresholdPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTombstoneWarnThresholdPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTombstoneWarnThresholdPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTombstoneWarnThresholdPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_parameters.go new file mode 100644 index 00000000000..5fc00adac05 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTraceProbabilityGetParams creates a new StorageServiceTraceProbabilityGetParams object +// with the default values initialized. +func NewStorageServiceTraceProbabilityGetParams() *StorageServiceTraceProbabilityGetParams { + + return &StorageServiceTraceProbabilityGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTraceProbabilityGetParamsWithTimeout creates a new StorageServiceTraceProbabilityGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTraceProbabilityGetParamsWithTimeout(timeout time.Duration) *StorageServiceTraceProbabilityGetParams { + + return &StorageServiceTraceProbabilityGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTraceProbabilityGetParamsWithContext creates a new StorageServiceTraceProbabilityGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTraceProbabilityGetParamsWithContext(ctx context.Context) *StorageServiceTraceProbabilityGetParams { + + return &StorageServiceTraceProbabilityGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceTraceProbabilityGetParamsWithHTTPClient creates a new StorageServiceTraceProbabilityGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTraceProbabilityGetParamsWithHTTPClient(client *http.Client) *StorageServiceTraceProbabilityGetParams { + + return &StorageServiceTraceProbabilityGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceTraceProbabilityGetParams contains all the parameters to send to the API endpoint +for the storage service trace probability get operation typically these are written to a http.Request +*/ +type StorageServiceTraceProbabilityGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) WithTimeout(timeout time.Duration) *StorageServiceTraceProbabilityGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) WithContext(ctx context.Context) *StorageServiceTraceProbabilityGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) WithHTTPClient(client *http.Client) *StorageServiceTraceProbabilityGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service trace probability get params +func (o *StorageServiceTraceProbabilityGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTraceProbabilityGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_responses.go new file mode 100644 index 00000000000..56b270a52db --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTraceProbabilityGetReader is a Reader for the StorageServiceTraceProbabilityGet structure. +type StorageServiceTraceProbabilityGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTraceProbabilityGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTraceProbabilityGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTraceProbabilityGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTraceProbabilityGetOK creates a StorageServiceTraceProbabilityGetOK with default headers values +func NewStorageServiceTraceProbabilityGetOK() *StorageServiceTraceProbabilityGetOK { + return &StorageServiceTraceProbabilityGetOK{} +} + +/*StorageServiceTraceProbabilityGetOK handles this case with default header values. + +StorageServiceTraceProbabilityGetOK storage service trace probability get o k +*/ +type StorageServiceTraceProbabilityGetOK struct { + Payload interface{} +} + +func (o *StorageServiceTraceProbabilityGetOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StorageServiceTraceProbabilityGetOK) 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 +} + +// NewStorageServiceTraceProbabilityGetDefault creates a StorageServiceTraceProbabilityGetDefault with default headers values +func NewStorageServiceTraceProbabilityGetDefault(code int) *StorageServiceTraceProbabilityGetDefault { + return &StorageServiceTraceProbabilityGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceTraceProbabilityGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTraceProbabilityGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service trace probability get default response +func (o *StorageServiceTraceProbabilityGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTraceProbabilityGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTraceProbabilityGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTraceProbabilityGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_parameters.go new file mode 100644 index 00000000000..2bc048489a9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTraceProbabilityPostParams creates a new StorageServiceTraceProbabilityPostParams object +// with the default values initialized. +func NewStorageServiceTraceProbabilityPostParams() *StorageServiceTraceProbabilityPostParams { + var () + return &StorageServiceTraceProbabilityPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTraceProbabilityPostParamsWithTimeout creates a new StorageServiceTraceProbabilityPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTraceProbabilityPostParamsWithTimeout(timeout time.Duration) *StorageServiceTraceProbabilityPostParams { + var () + return &StorageServiceTraceProbabilityPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTraceProbabilityPostParamsWithContext creates a new StorageServiceTraceProbabilityPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTraceProbabilityPostParamsWithContext(ctx context.Context) *StorageServiceTraceProbabilityPostParams { + var () + return &StorageServiceTraceProbabilityPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceTraceProbabilityPostParamsWithHTTPClient creates a new StorageServiceTraceProbabilityPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTraceProbabilityPostParamsWithHTTPClient(client *http.Client) *StorageServiceTraceProbabilityPostParams { + var () + return &StorageServiceTraceProbabilityPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceTraceProbabilityPostParams contains all the parameters to send to the API endpoint +for the storage service trace probability post operation typically these are written to a http.Request +*/ +type StorageServiceTraceProbabilityPostParams struct { + + /*Probability + [0,1] will enable tracing on a partial number of requests with the provided probability. 0 will disable tracing and 1 will enable tracing for all requests (which mich severely cripple the system) + + */ + Probability string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) WithTimeout(timeout time.Duration) *StorageServiceTraceProbabilityPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) WithContext(ctx context.Context) *StorageServiceTraceProbabilityPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) WithHTTPClient(client *http.Client) *StorageServiceTraceProbabilityPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProbability adds the probability to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) WithProbability(probability string) *StorageServiceTraceProbabilityPostParams { + o.SetProbability(probability) + return o +} + +// SetProbability adds the probability to the storage service trace probability post params +func (o *StorageServiceTraceProbabilityPostParams) SetProbability(probability string) { + o.Probability = probability +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTraceProbabilityPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param probability + qrProbability := o.Probability + qProbability := qrProbability + if qProbability != "" { + if err := r.SetQueryParam("probability", qProbability); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_responses.go new file mode 100644 index 00000000000..f1c9d73f9bc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_trace_probability_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTraceProbabilityPostReader is a Reader for the StorageServiceTraceProbabilityPost structure. +type StorageServiceTraceProbabilityPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTraceProbabilityPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTraceProbabilityPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTraceProbabilityPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTraceProbabilityPostOK creates a StorageServiceTraceProbabilityPostOK with default headers values +func NewStorageServiceTraceProbabilityPostOK() *StorageServiceTraceProbabilityPostOK { + return &StorageServiceTraceProbabilityPostOK{} +} + +/*StorageServiceTraceProbabilityPostOK handles this case with default header values. + +StorageServiceTraceProbabilityPostOK storage service trace probability post o k +*/ +type StorageServiceTraceProbabilityPostOK struct { +} + +func (o *StorageServiceTraceProbabilityPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceTraceProbabilityPostDefault creates a StorageServiceTraceProbabilityPostDefault with default headers values +func NewStorageServiceTraceProbabilityPostDefault(code int) *StorageServiceTraceProbabilityPostDefault { + return &StorageServiceTraceProbabilityPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceTraceProbabilityPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTraceProbabilityPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service trace probability post default response +func (o *StorageServiceTraceProbabilityPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTraceProbabilityPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTraceProbabilityPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTraceProbabilityPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_parameters.go new file mode 100644 index 00000000000..98aa23ad0a6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceTruncateByKeyspacePostParams creates a new StorageServiceTruncateByKeyspacePostParams object +// with the default values initialized. +func NewStorageServiceTruncateByKeyspacePostParams() *StorageServiceTruncateByKeyspacePostParams { + var () + return &StorageServiceTruncateByKeyspacePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceTruncateByKeyspacePostParamsWithTimeout creates a new StorageServiceTruncateByKeyspacePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceTruncateByKeyspacePostParamsWithTimeout(timeout time.Duration) *StorageServiceTruncateByKeyspacePostParams { + var () + return &StorageServiceTruncateByKeyspacePostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceTruncateByKeyspacePostParamsWithContext creates a new StorageServiceTruncateByKeyspacePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceTruncateByKeyspacePostParamsWithContext(ctx context.Context) *StorageServiceTruncateByKeyspacePostParams { + var () + return &StorageServiceTruncateByKeyspacePostParams{ + + Context: ctx, + } +} + +// NewStorageServiceTruncateByKeyspacePostParamsWithHTTPClient creates a new StorageServiceTruncateByKeyspacePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceTruncateByKeyspacePostParamsWithHTTPClient(client *http.Client) *StorageServiceTruncateByKeyspacePostParams { + var () + return &StorageServiceTruncateByKeyspacePostParams{ + HTTPClient: client, + } +} + +/*StorageServiceTruncateByKeyspacePostParams contains all the parameters to send to the API endpoint +for the storage service truncate by keyspace post operation typically these are written to a http.Request +*/ +type StorageServiceTruncateByKeyspacePostParams struct { + + /*Cf + Column family name + + */ + Cf *string + /*Keyspace + The keyspace + + */ + Keyspace string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) WithTimeout(timeout time.Duration) *StorageServiceTruncateByKeyspacePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) WithContext(ctx context.Context) *StorageServiceTruncateByKeyspacePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) WithHTTPClient(client *http.Client) *StorageServiceTruncateByKeyspacePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCf adds the cf to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) WithCf(cf *string) *StorageServiceTruncateByKeyspacePostParams { + o.SetCf(cf) + return o +} + +// SetCf adds the cf to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) SetCf(cf *string) { + o.Cf = cf +} + +// WithKeyspace adds the keyspace to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) WithKeyspace(keyspace string) *StorageServiceTruncateByKeyspacePostParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service truncate by keyspace post params +func (o *StorageServiceTruncateByKeyspacePostParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceTruncateByKeyspacePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Cf != nil { + + // query param cf + var qrCf string + if o.Cf != nil { + qrCf = *o.Cf + } + qCf := qrCf + if qCf != "" { + if err := r.SetQueryParam("cf", qCf); err != nil { + return err + } + } + + } + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_responses.go new file mode 100644 index 00000000000..2a3e290e02e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_truncate_by_keyspace_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceTruncateByKeyspacePostReader is a Reader for the StorageServiceTruncateByKeyspacePost structure. +type StorageServiceTruncateByKeyspacePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceTruncateByKeyspacePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceTruncateByKeyspacePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceTruncateByKeyspacePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceTruncateByKeyspacePostOK creates a StorageServiceTruncateByKeyspacePostOK with default headers values +func NewStorageServiceTruncateByKeyspacePostOK() *StorageServiceTruncateByKeyspacePostOK { + return &StorageServiceTruncateByKeyspacePostOK{} +} + +/*StorageServiceTruncateByKeyspacePostOK handles this case with default header values. + +StorageServiceTruncateByKeyspacePostOK storage service truncate by keyspace post o k +*/ +type StorageServiceTruncateByKeyspacePostOK struct { +} + +func (o *StorageServiceTruncateByKeyspacePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceTruncateByKeyspacePostDefault creates a StorageServiceTruncateByKeyspacePostDefault with default headers values +func NewStorageServiceTruncateByKeyspacePostDefault(code int) *StorageServiceTruncateByKeyspacePostDefault { + return &StorageServiceTruncateByKeyspacePostDefault{ + _statusCode: code, + } +} + +/*StorageServiceTruncateByKeyspacePostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceTruncateByKeyspacePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service truncate by keyspace post default response +func (o *StorageServiceTruncateByKeyspacePostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceTruncateByKeyspacePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceTruncateByKeyspacePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceTruncateByKeyspacePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_parameters.go new file mode 100644 index 00000000000..7c3491c1d36 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_parameters.go @@ -0,0 +1,262 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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/swag" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceUpdateSnitchPostParams creates a new StorageServiceUpdateSnitchPostParams object +// with the default values initialized. +func NewStorageServiceUpdateSnitchPostParams() *StorageServiceUpdateSnitchPostParams { + var () + return &StorageServiceUpdateSnitchPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceUpdateSnitchPostParamsWithTimeout creates a new StorageServiceUpdateSnitchPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceUpdateSnitchPostParamsWithTimeout(timeout time.Duration) *StorageServiceUpdateSnitchPostParams { + var () + return &StorageServiceUpdateSnitchPostParams{ + + timeout: timeout, + } +} + +// NewStorageServiceUpdateSnitchPostParamsWithContext creates a new StorageServiceUpdateSnitchPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceUpdateSnitchPostParamsWithContext(ctx context.Context) *StorageServiceUpdateSnitchPostParams { + var () + return &StorageServiceUpdateSnitchPostParams{ + + Context: ctx, + } +} + +// NewStorageServiceUpdateSnitchPostParamsWithHTTPClient creates a new StorageServiceUpdateSnitchPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceUpdateSnitchPostParamsWithHTTPClient(client *http.Client) *StorageServiceUpdateSnitchPostParams { + var () + return &StorageServiceUpdateSnitchPostParams{ + HTTPClient: client, + } +} + +/*StorageServiceUpdateSnitchPostParams contains all the parameters to send to the API endpoint +for the storage service update snitch post operation typically these are written to a http.Request +*/ +type StorageServiceUpdateSnitchPostParams struct { + + /*Dynamic + When true dynamicsnitch is used + + */ + Dynamic bool + /*DynamicBadnessThreshold + Dynamic badness threshold, (default 0.0) + + */ + DynamicBadnessThreshold *string + /*DynamicResetInterval + integer, in ms (default 600,000) + + */ + DynamicResetInterval *int32 + /*DynamicUpdateInterval + integer, in ms (default 100) + + */ + DynamicUpdateInterval *int32 + /*EpSnitchClassName + The canonical path name for a class implementing IEndpointSnitch + + */ + EpSnitchClassName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithTimeout(timeout time.Duration) *StorageServiceUpdateSnitchPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithContext(ctx context.Context) *StorageServiceUpdateSnitchPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithHTTPClient(client *http.Client) *StorageServiceUpdateSnitchPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDynamic adds the dynamic to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithDynamic(dynamic bool) *StorageServiceUpdateSnitchPostParams { + o.SetDynamic(dynamic) + return o +} + +// SetDynamic adds the dynamic to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetDynamic(dynamic bool) { + o.Dynamic = dynamic +} + +// WithDynamicBadnessThreshold adds the dynamicBadnessThreshold to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithDynamicBadnessThreshold(dynamicBadnessThreshold *string) *StorageServiceUpdateSnitchPostParams { + o.SetDynamicBadnessThreshold(dynamicBadnessThreshold) + return o +} + +// SetDynamicBadnessThreshold adds the dynamicBadnessThreshold to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetDynamicBadnessThreshold(dynamicBadnessThreshold *string) { + o.DynamicBadnessThreshold = dynamicBadnessThreshold +} + +// WithDynamicResetInterval adds the dynamicResetInterval to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithDynamicResetInterval(dynamicResetInterval *int32) *StorageServiceUpdateSnitchPostParams { + o.SetDynamicResetInterval(dynamicResetInterval) + return o +} + +// SetDynamicResetInterval adds the dynamicResetInterval to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetDynamicResetInterval(dynamicResetInterval *int32) { + o.DynamicResetInterval = dynamicResetInterval +} + +// WithDynamicUpdateInterval adds the dynamicUpdateInterval to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithDynamicUpdateInterval(dynamicUpdateInterval *int32) *StorageServiceUpdateSnitchPostParams { + o.SetDynamicUpdateInterval(dynamicUpdateInterval) + return o +} + +// SetDynamicUpdateInterval adds the dynamicUpdateInterval to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetDynamicUpdateInterval(dynamicUpdateInterval *int32) { + o.DynamicUpdateInterval = dynamicUpdateInterval +} + +// WithEpSnitchClassName adds the epSnitchClassName to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) WithEpSnitchClassName(epSnitchClassName string) *StorageServiceUpdateSnitchPostParams { + o.SetEpSnitchClassName(epSnitchClassName) + return o +} + +// SetEpSnitchClassName adds the epSnitchClassName to the storage service update snitch post params +func (o *StorageServiceUpdateSnitchPostParams) SetEpSnitchClassName(epSnitchClassName string) { + o.EpSnitchClassName = epSnitchClassName +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceUpdateSnitchPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param dynamic + qrDynamic := o.Dynamic + qDynamic := swag.FormatBool(qrDynamic) + if qDynamic != "" { + if err := r.SetQueryParam("dynamic", qDynamic); err != nil { + return err + } + } + + if o.DynamicBadnessThreshold != nil { + + // query param dynamic_badness_threshold + var qrDynamicBadnessThreshold string + if o.DynamicBadnessThreshold != nil { + qrDynamicBadnessThreshold = *o.DynamicBadnessThreshold + } + qDynamicBadnessThreshold := qrDynamicBadnessThreshold + if qDynamicBadnessThreshold != "" { + if err := r.SetQueryParam("dynamic_badness_threshold", qDynamicBadnessThreshold); err != nil { + return err + } + } + + } + + if o.DynamicResetInterval != nil { + + // query param dynamic_reset_interval + var qrDynamicResetInterval int32 + if o.DynamicResetInterval != nil { + qrDynamicResetInterval = *o.DynamicResetInterval + } + qDynamicResetInterval := swag.FormatInt32(qrDynamicResetInterval) + if qDynamicResetInterval != "" { + if err := r.SetQueryParam("dynamic_reset_interval", qDynamicResetInterval); err != nil { + return err + } + } + + } + + if o.DynamicUpdateInterval != nil { + + // query param dynamic_update_interval + var qrDynamicUpdateInterval int32 + if o.DynamicUpdateInterval != nil { + qrDynamicUpdateInterval = *o.DynamicUpdateInterval + } + qDynamicUpdateInterval := swag.FormatInt32(qrDynamicUpdateInterval) + if qDynamicUpdateInterval != "" { + if err := r.SetQueryParam("dynamic_update_interval", qDynamicUpdateInterval); err != nil { + return err + } + } + + } + + // query param ep_snitch_class_name + qrEpSnitchClassName := o.EpSnitchClassName + qEpSnitchClassName := qrEpSnitchClassName + if qEpSnitchClassName != "" { + if err := r.SetQueryParam("ep_snitch_class_name", qEpSnitchClassName); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_responses.go new file mode 100644 index 00000000000..022b5da57f9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_update_snitch_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceUpdateSnitchPostReader is a Reader for the StorageServiceUpdateSnitchPost structure. +type StorageServiceUpdateSnitchPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceUpdateSnitchPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceUpdateSnitchPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceUpdateSnitchPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceUpdateSnitchPostOK creates a StorageServiceUpdateSnitchPostOK with default headers values +func NewStorageServiceUpdateSnitchPostOK() *StorageServiceUpdateSnitchPostOK { + return &StorageServiceUpdateSnitchPostOK{} +} + +/*StorageServiceUpdateSnitchPostOK handles this case with default header values. + +StorageServiceUpdateSnitchPostOK storage service update snitch post o k +*/ +type StorageServiceUpdateSnitchPostOK struct { +} + +func (o *StorageServiceUpdateSnitchPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewStorageServiceUpdateSnitchPostDefault creates a StorageServiceUpdateSnitchPostDefault with default headers values +func NewStorageServiceUpdateSnitchPostDefault(code int) *StorageServiceUpdateSnitchPostDefault { + return &StorageServiceUpdateSnitchPostDefault{ + _statusCode: code, + } +} + +/*StorageServiceUpdateSnitchPostDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceUpdateSnitchPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service update snitch post default response +func (o *StorageServiceUpdateSnitchPostDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceUpdateSnitchPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceUpdateSnitchPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceUpdateSnitchPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_parameters.go new file mode 100644 index 00000000000..ed92e775cc6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParams creates a new StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams object +// with the default values initialized. +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParams() *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + var () + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithTimeout creates a new StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithTimeout(timeout time.Duration) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + var () + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams{ + + timeout: timeout, + } +} + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithContext creates a new StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithContext(ctx context.Context) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + var () + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams{ + + Context: ctx, + } +} + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithHTTPClient creates a new StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetParamsWithHTTPClient(client *http.Client) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + var () + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams{ + HTTPClient: client, + } +} + +/*StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams contains all the parameters to send to the API endpoint +for the storage service view build statuses by keyspace and view get operation typically these are written to a http.Request +*/ +type StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams struct { + + /*Keyspace + The keyspace + + */ + Keyspace string + /*View + View name + + */ + View string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WithTimeout(timeout time.Duration) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WithContext(ctx context.Context) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WithHTTPClient(client *http.Client) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKeyspace adds the keyspace to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WithKeyspace(keyspace string) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + o.SetKeyspace(keyspace) + return o +} + +// SetKeyspace adds the keyspace to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) SetKeyspace(keyspace string) { + o.Keyspace = keyspace +} + +// WithView adds the view to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WithView(view string) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams { + o.SetView(view) + return o +} + +// SetView adds the view to the storage service view build statuses by keyspace and view get params +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) SetView(view string) { + o.View = view +} + +// WriteToRequest writes these params to a swagger request +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param keyspace + if err := r.SetPathParam("keyspace", o.Keyspace); err != nil { + return err + } + + // path param view + if err := r.SetPathParam("view", o.View); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_responses.go new file mode 100644 index 00000000000..8f4a0fecc58 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/storage_service_view_build_statuses_by_keyspace_and_view_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StorageServiceViewBuildStatusesByKeyspaceAndViewGetReader is a Reader for the StorageServiceViewBuildStatusesByKeyspaceAndViewGet structure. +type StorageServiceViewBuildStatusesByKeyspaceAndViewGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetOK creates a StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK with default headers values +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetOK() *StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK { + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK{} +} + +/*StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK handles this case with default header values. + +StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK storage service view build statuses by keyspace and view get o k +*/ +type StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK struct { + Payload []*models.Mapper +} + +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK) GetPayload() []*models.Mapper { + return o.Payload +} + +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetOK) 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 +} + +// NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault creates a StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault with default headers values +func NewStorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault(code int) *StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault { + return &StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault{ + _statusCode: code, + } +} + +/*StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault handles this case with default header values. + +internal server error +*/ +type StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the storage service view build statuses by keyspace and view get default response +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault) Code() int { + return o._statusCode +} + +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StorageServiceViewBuildStatusesByKeyspaceAndViewGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_parameters.go new file mode 100644 index 00000000000..dc8d86346bd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerGetParams creates a new StreamManagerGetParams object +// with the default values initialized. +func NewStreamManagerGetParams() *StreamManagerGetParams { + + return &StreamManagerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerGetParamsWithTimeout creates a new StreamManagerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerGetParamsWithTimeout(timeout time.Duration) *StreamManagerGetParams { + + return &StreamManagerGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerGetParamsWithContext creates a new StreamManagerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerGetParamsWithContext(ctx context.Context) *StreamManagerGetParams { + + return &StreamManagerGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerGetParamsWithHTTPClient creates a new StreamManagerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerGetParamsWithHTTPClient(client *http.Client) *StreamManagerGetParams { + + return &StreamManagerGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerGetParams contains all the parameters to send to the API endpoint +for the stream manager get operation typically these are written to a http.Request +*/ +type StreamManagerGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager get params +func (o *StreamManagerGetParams) WithTimeout(timeout time.Duration) *StreamManagerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager get params +func (o *StreamManagerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager get params +func (o *StreamManagerGetParams) WithContext(ctx context.Context) *StreamManagerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager get params +func (o *StreamManagerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager get params +func (o *StreamManagerGetParams) WithHTTPClient(client *http.Client) *StreamManagerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager get params +func (o *StreamManagerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_responses.go new file mode 100644 index 00000000000..2cd8c1cdb20 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerGetReader is a Reader for the StreamManagerGet structure. +type StreamManagerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerGetOK creates a StreamManagerGetOK with default headers values +func NewStreamManagerGetOK() *StreamManagerGetOK { + return &StreamManagerGetOK{} +} + +/*StreamManagerGetOK handles this case with default header values. + +StreamManagerGetOK stream manager get o k +*/ +type StreamManagerGetOK struct { + Payload []*models.StreamState +} + +func (o *StreamManagerGetOK) GetPayload() []*models.StreamState { + return o.Payload +} + +func (o *StreamManagerGetOK) 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 +} + +// NewStreamManagerGetDefault creates a StreamManagerGetDefault with default headers values +func NewStreamManagerGetDefault(code int) *StreamManagerGetDefault { + return &StreamManagerGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager get default response +func (o *StreamManagerGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_parameters.go new file mode 100644 index 00000000000..8a9445db6ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerMetricsIncomingByPeerGetParams creates a new StreamManagerMetricsIncomingByPeerGetParams object +// with the default values initialized. +func NewStreamManagerMetricsIncomingByPeerGetParams() *StreamManagerMetricsIncomingByPeerGetParams { + var () + return &StreamManagerMetricsIncomingByPeerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerMetricsIncomingByPeerGetParamsWithTimeout creates a new StreamManagerMetricsIncomingByPeerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerMetricsIncomingByPeerGetParamsWithTimeout(timeout time.Duration) *StreamManagerMetricsIncomingByPeerGetParams { + var () + return &StreamManagerMetricsIncomingByPeerGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerMetricsIncomingByPeerGetParamsWithContext creates a new StreamManagerMetricsIncomingByPeerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerMetricsIncomingByPeerGetParamsWithContext(ctx context.Context) *StreamManagerMetricsIncomingByPeerGetParams { + var () + return &StreamManagerMetricsIncomingByPeerGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerMetricsIncomingByPeerGetParamsWithHTTPClient creates a new StreamManagerMetricsIncomingByPeerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerMetricsIncomingByPeerGetParamsWithHTTPClient(client *http.Client) *StreamManagerMetricsIncomingByPeerGetParams { + var () + return &StreamManagerMetricsIncomingByPeerGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerMetricsIncomingByPeerGetParams contains all the parameters to send to the API endpoint +for the stream manager metrics incoming by peer get operation typically these are written to a http.Request +*/ +type StreamManagerMetricsIncomingByPeerGetParams struct { + + /*Peer + The stream peer + + */ + Peer string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) WithTimeout(timeout time.Duration) *StreamManagerMetricsIncomingByPeerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) WithContext(ctx context.Context) *StreamManagerMetricsIncomingByPeerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) WithHTTPClient(client *http.Client) *StreamManagerMetricsIncomingByPeerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeer adds the peer to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) WithPeer(peer string) *StreamManagerMetricsIncomingByPeerGetParams { + o.SetPeer(peer) + return o +} + +// SetPeer adds the peer to the stream manager metrics incoming by peer get params +func (o *StreamManagerMetricsIncomingByPeerGetParams) SetPeer(peer string) { + o.Peer = peer +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerMetricsIncomingByPeerGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param peer + if err := r.SetPathParam("peer", o.Peer); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_responses.go new file mode 100644 index 00000000000..143955fa322 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_by_peer_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerMetricsIncomingByPeerGetReader is a Reader for the StreamManagerMetricsIncomingByPeerGet structure. +type StreamManagerMetricsIncomingByPeerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerMetricsIncomingByPeerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerMetricsIncomingByPeerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerMetricsIncomingByPeerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerMetricsIncomingByPeerGetOK creates a StreamManagerMetricsIncomingByPeerGetOK with default headers values +func NewStreamManagerMetricsIncomingByPeerGetOK() *StreamManagerMetricsIncomingByPeerGetOK { + return &StreamManagerMetricsIncomingByPeerGetOK{} +} + +/*StreamManagerMetricsIncomingByPeerGetOK handles this case with default header values. + +StreamManagerMetricsIncomingByPeerGetOK stream manager metrics incoming by peer get o k +*/ +type StreamManagerMetricsIncomingByPeerGetOK struct { + Payload int32 +} + +func (o *StreamManagerMetricsIncomingByPeerGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StreamManagerMetricsIncomingByPeerGetOK) 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 +} + +// NewStreamManagerMetricsIncomingByPeerGetDefault creates a StreamManagerMetricsIncomingByPeerGetDefault with default headers values +func NewStreamManagerMetricsIncomingByPeerGetDefault(code int) *StreamManagerMetricsIncomingByPeerGetDefault { + return &StreamManagerMetricsIncomingByPeerGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerMetricsIncomingByPeerGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerMetricsIncomingByPeerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager metrics incoming by peer get default response +func (o *StreamManagerMetricsIncomingByPeerGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerMetricsIncomingByPeerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerMetricsIncomingByPeerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerMetricsIncomingByPeerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_parameters.go new file mode 100644 index 00000000000..3b0c56218f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerMetricsIncomingGetParams creates a new StreamManagerMetricsIncomingGetParams object +// with the default values initialized. +func NewStreamManagerMetricsIncomingGetParams() *StreamManagerMetricsIncomingGetParams { + + return &StreamManagerMetricsIncomingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerMetricsIncomingGetParamsWithTimeout creates a new StreamManagerMetricsIncomingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerMetricsIncomingGetParamsWithTimeout(timeout time.Duration) *StreamManagerMetricsIncomingGetParams { + + return &StreamManagerMetricsIncomingGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerMetricsIncomingGetParamsWithContext creates a new StreamManagerMetricsIncomingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerMetricsIncomingGetParamsWithContext(ctx context.Context) *StreamManagerMetricsIncomingGetParams { + + return &StreamManagerMetricsIncomingGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerMetricsIncomingGetParamsWithHTTPClient creates a new StreamManagerMetricsIncomingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerMetricsIncomingGetParamsWithHTTPClient(client *http.Client) *StreamManagerMetricsIncomingGetParams { + + return &StreamManagerMetricsIncomingGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerMetricsIncomingGetParams contains all the parameters to send to the API endpoint +for the stream manager metrics incoming get operation typically these are written to a http.Request +*/ +type StreamManagerMetricsIncomingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) WithTimeout(timeout time.Duration) *StreamManagerMetricsIncomingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) WithContext(ctx context.Context) *StreamManagerMetricsIncomingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) WithHTTPClient(client *http.Client) *StreamManagerMetricsIncomingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager metrics incoming get params +func (o *StreamManagerMetricsIncomingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerMetricsIncomingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_responses.go new file mode 100644 index 00000000000..f8e8d7c9c58 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_incoming_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerMetricsIncomingGetReader is a Reader for the StreamManagerMetricsIncomingGet structure. +type StreamManagerMetricsIncomingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerMetricsIncomingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerMetricsIncomingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerMetricsIncomingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerMetricsIncomingGetOK creates a StreamManagerMetricsIncomingGetOK with default headers values +func NewStreamManagerMetricsIncomingGetOK() *StreamManagerMetricsIncomingGetOK { + return &StreamManagerMetricsIncomingGetOK{} +} + +/*StreamManagerMetricsIncomingGetOK handles this case with default header values. + +StreamManagerMetricsIncomingGetOK stream manager metrics incoming get o k +*/ +type StreamManagerMetricsIncomingGetOK struct { + Payload int32 +} + +func (o *StreamManagerMetricsIncomingGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StreamManagerMetricsIncomingGetOK) 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 +} + +// NewStreamManagerMetricsIncomingGetDefault creates a StreamManagerMetricsIncomingGetDefault with default headers values +func NewStreamManagerMetricsIncomingGetDefault(code int) *StreamManagerMetricsIncomingGetDefault { + return &StreamManagerMetricsIncomingGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerMetricsIncomingGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerMetricsIncomingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager metrics incoming get default response +func (o *StreamManagerMetricsIncomingGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerMetricsIncomingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerMetricsIncomingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerMetricsIncomingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_parameters.go new file mode 100644 index 00000000000..212ddb6028c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerMetricsOutboundGetParams creates a new StreamManagerMetricsOutboundGetParams object +// with the default values initialized. +func NewStreamManagerMetricsOutboundGetParams() *StreamManagerMetricsOutboundGetParams { + + return &StreamManagerMetricsOutboundGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerMetricsOutboundGetParamsWithTimeout creates a new StreamManagerMetricsOutboundGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerMetricsOutboundGetParamsWithTimeout(timeout time.Duration) *StreamManagerMetricsOutboundGetParams { + + return &StreamManagerMetricsOutboundGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerMetricsOutboundGetParamsWithContext creates a new StreamManagerMetricsOutboundGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerMetricsOutboundGetParamsWithContext(ctx context.Context) *StreamManagerMetricsOutboundGetParams { + + return &StreamManagerMetricsOutboundGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerMetricsOutboundGetParamsWithHTTPClient creates a new StreamManagerMetricsOutboundGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerMetricsOutboundGetParamsWithHTTPClient(client *http.Client) *StreamManagerMetricsOutboundGetParams { + + return &StreamManagerMetricsOutboundGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerMetricsOutboundGetParams contains all the parameters to send to the API endpoint +for the stream manager metrics outbound get operation typically these are written to a http.Request +*/ +type StreamManagerMetricsOutboundGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) WithTimeout(timeout time.Duration) *StreamManagerMetricsOutboundGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) WithContext(ctx context.Context) *StreamManagerMetricsOutboundGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) WithHTTPClient(client *http.Client) *StreamManagerMetricsOutboundGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager metrics outbound get params +func (o *StreamManagerMetricsOutboundGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerMetricsOutboundGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_responses.go new file mode 100644 index 00000000000..df63edf8a59 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outbound_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerMetricsOutboundGetReader is a Reader for the StreamManagerMetricsOutboundGet structure. +type StreamManagerMetricsOutboundGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerMetricsOutboundGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerMetricsOutboundGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerMetricsOutboundGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerMetricsOutboundGetOK creates a StreamManagerMetricsOutboundGetOK with default headers values +func NewStreamManagerMetricsOutboundGetOK() *StreamManagerMetricsOutboundGetOK { + return &StreamManagerMetricsOutboundGetOK{} +} + +/*StreamManagerMetricsOutboundGetOK handles this case with default header values. + +StreamManagerMetricsOutboundGetOK stream manager metrics outbound get o k +*/ +type StreamManagerMetricsOutboundGetOK struct { + Payload int32 +} + +func (o *StreamManagerMetricsOutboundGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StreamManagerMetricsOutboundGetOK) 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 +} + +// NewStreamManagerMetricsOutboundGetDefault creates a StreamManagerMetricsOutboundGetDefault with default headers values +func NewStreamManagerMetricsOutboundGetDefault(code int) *StreamManagerMetricsOutboundGetDefault { + return &StreamManagerMetricsOutboundGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerMetricsOutboundGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerMetricsOutboundGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager metrics outbound get default response +func (o *StreamManagerMetricsOutboundGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerMetricsOutboundGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerMetricsOutboundGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerMetricsOutboundGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_parameters.go new file mode 100644 index 00000000000..2a7d54a0dd2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerMetricsOutgoingByPeerGetParams creates a new StreamManagerMetricsOutgoingByPeerGetParams object +// with the default values initialized. +func NewStreamManagerMetricsOutgoingByPeerGetParams() *StreamManagerMetricsOutgoingByPeerGetParams { + var () + return &StreamManagerMetricsOutgoingByPeerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerMetricsOutgoingByPeerGetParamsWithTimeout creates a new StreamManagerMetricsOutgoingByPeerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerMetricsOutgoingByPeerGetParamsWithTimeout(timeout time.Duration) *StreamManagerMetricsOutgoingByPeerGetParams { + var () + return &StreamManagerMetricsOutgoingByPeerGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerMetricsOutgoingByPeerGetParamsWithContext creates a new StreamManagerMetricsOutgoingByPeerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerMetricsOutgoingByPeerGetParamsWithContext(ctx context.Context) *StreamManagerMetricsOutgoingByPeerGetParams { + var () + return &StreamManagerMetricsOutgoingByPeerGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerMetricsOutgoingByPeerGetParamsWithHTTPClient creates a new StreamManagerMetricsOutgoingByPeerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerMetricsOutgoingByPeerGetParamsWithHTTPClient(client *http.Client) *StreamManagerMetricsOutgoingByPeerGetParams { + var () + return &StreamManagerMetricsOutgoingByPeerGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerMetricsOutgoingByPeerGetParams contains all the parameters to send to the API endpoint +for the stream manager metrics outgoing by peer get operation typically these are written to a http.Request +*/ +type StreamManagerMetricsOutgoingByPeerGetParams struct { + + /*Peer + The stream peer + + */ + Peer string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) WithTimeout(timeout time.Duration) *StreamManagerMetricsOutgoingByPeerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) WithContext(ctx context.Context) *StreamManagerMetricsOutgoingByPeerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) WithHTTPClient(client *http.Client) *StreamManagerMetricsOutgoingByPeerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeer adds the peer to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) WithPeer(peer string) *StreamManagerMetricsOutgoingByPeerGetParams { + o.SetPeer(peer) + return o +} + +// SetPeer adds the peer to the stream manager metrics outgoing by peer get params +func (o *StreamManagerMetricsOutgoingByPeerGetParams) SetPeer(peer string) { + o.Peer = peer +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerMetricsOutgoingByPeerGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param peer + if err := r.SetPathParam("peer", o.Peer); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_responses.go new file mode 100644 index 00000000000..b9e3dd64bfd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_by_peer_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerMetricsOutgoingByPeerGetReader is a Reader for the StreamManagerMetricsOutgoingByPeerGet structure. +type StreamManagerMetricsOutgoingByPeerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerMetricsOutgoingByPeerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerMetricsOutgoingByPeerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerMetricsOutgoingByPeerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerMetricsOutgoingByPeerGetOK creates a StreamManagerMetricsOutgoingByPeerGetOK with default headers values +func NewStreamManagerMetricsOutgoingByPeerGetOK() *StreamManagerMetricsOutgoingByPeerGetOK { + return &StreamManagerMetricsOutgoingByPeerGetOK{} +} + +/*StreamManagerMetricsOutgoingByPeerGetOK handles this case with default header values. + +StreamManagerMetricsOutgoingByPeerGetOK stream manager metrics outgoing by peer get o k +*/ +type StreamManagerMetricsOutgoingByPeerGetOK struct { + Payload int32 +} + +func (o *StreamManagerMetricsOutgoingByPeerGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StreamManagerMetricsOutgoingByPeerGetOK) 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 +} + +// NewStreamManagerMetricsOutgoingByPeerGetDefault creates a StreamManagerMetricsOutgoingByPeerGetDefault with default headers values +func NewStreamManagerMetricsOutgoingByPeerGetDefault(code int) *StreamManagerMetricsOutgoingByPeerGetDefault { + return &StreamManagerMetricsOutgoingByPeerGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerMetricsOutgoingByPeerGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerMetricsOutgoingByPeerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager metrics outgoing by peer get default response +func (o *StreamManagerMetricsOutgoingByPeerGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerMetricsOutgoingByPeerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerMetricsOutgoingByPeerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerMetricsOutgoingByPeerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_parameters.go new file mode 100644 index 00000000000..32ae8886d27 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewStreamManagerMetricsOutgoingGetParams creates a new StreamManagerMetricsOutgoingGetParams object +// with the default values initialized. +func NewStreamManagerMetricsOutgoingGetParams() *StreamManagerMetricsOutgoingGetParams { + + return &StreamManagerMetricsOutgoingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewStreamManagerMetricsOutgoingGetParamsWithTimeout creates a new StreamManagerMetricsOutgoingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewStreamManagerMetricsOutgoingGetParamsWithTimeout(timeout time.Duration) *StreamManagerMetricsOutgoingGetParams { + + return &StreamManagerMetricsOutgoingGetParams{ + + timeout: timeout, + } +} + +// NewStreamManagerMetricsOutgoingGetParamsWithContext creates a new StreamManagerMetricsOutgoingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewStreamManagerMetricsOutgoingGetParamsWithContext(ctx context.Context) *StreamManagerMetricsOutgoingGetParams { + + return &StreamManagerMetricsOutgoingGetParams{ + + Context: ctx, + } +} + +// NewStreamManagerMetricsOutgoingGetParamsWithHTTPClient creates a new StreamManagerMetricsOutgoingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewStreamManagerMetricsOutgoingGetParamsWithHTTPClient(client *http.Client) *StreamManagerMetricsOutgoingGetParams { + + return &StreamManagerMetricsOutgoingGetParams{ + HTTPClient: client, + } +} + +/*StreamManagerMetricsOutgoingGetParams contains all the parameters to send to the API endpoint +for the stream manager metrics outgoing get operation typically these are written to a http.Request +*/ +type StreamManagerMetricsOutgoingGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) WithTimeout(timeout time.Duration) *StreamManagerMetricsOutgoingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) WithContext(ctx context.Context) *StreamManagerMetricsOutgoingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) WithHTTPClient(client *http.Client) *StreamManagerMetricsOutgoingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the stream manager metrics outgoing get params +func (o *StreamManagerMetricsOutgoingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *StreamManagerMetricsOutgoingGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_responses.go new file mode 100644 index 00000000000..1f12130ce0d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/stream_manager_metrics_outgoing_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// StreamManagerMetricsOutgoingGetReader is a Reader for the StreamManagerMetricsOutgoingGet structure. +type StreamManagerMetricsOutgoingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StreamManagerMetricsOutgoingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStreamManagerMetricsOutgoingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStreamManagerMetricsOutgoingGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStreamManagerMetricsOutgoingGetOK creates a StreamManagerMetricsOutgoingGetOK with default headers values +func NewStreamManagerMetricsOutgoingGetOK() *StreamManagerMetricsOutgoingGetOK { + return &StreamManagerMetricsOutgoingGetOK{} +} + +/*StreamManagerMetricsOutgoingGetOK handles this case with default header values. + +StreamManagerMetricsOutgoingGetOK stream manager metrics outgoing get o k +*/ +type StreamManagerMetricsOutgoingGetOK struct { + Payload int32 +} + +func (o *StreamManagerMetricsOutgoingGetOK) GetPayload() int32 { + return o.Payload +} + +func (o *StreamManagerMetricsOutgoingGetOK) 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 +} + +// NewStreamManagerMetricsOutgoingGetDefault creates a StreamManagerMetricsOutgoingGetDefault with default headers values +func NewStreamManagerMetricsOutgoingGetDefault(code int) *StreamManagerMetricsOutgoingGetDefault { + return &StreamManagerMetricsOutgoingGetDefault{ + _statusCode: code, + } +} + +/*StreamManagerMetricsOutgoingGetDefault handles this case with default header values. + +internal server error +*/ +type StreamManagerMetricsOutgoingGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the stream manager metrics outgoing get default response +func (o *StreamManagerMetricsOutgoingGetDefault) Code() int { + return o._statusCode +} + +func (o *StreamManagerMetricsOutgoingGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *StreamManagerMetricsOutgoingGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *StreamManagerMetricsOutgoingGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_parameters.go new file mode 100644 index 00000000000..31af47c99e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSystemLoggerByNameGetParams creates a new SystemLoggerByNameGetParams object +// with the default values initialized. +func NewSystemLoggerByNameGetParams() *SystemLoggerByNameGetParams { + var () + return &SystemLoggerByNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSystemLoggerByNameGetParamsWithTimeout creates a new SystemLoggerByNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSystemLoggerByNameGetParamsWithTimeout(timeout time.Duration) *SystemLoggerByNameGetParams { + var () + return &SystemLoggerByNameGetParams{ + + timeout: timeout, + } +} + +// NewSystemLoggerByNameGetParamsWithContext creates a new SystemLoggerByNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewSystemLoggerByNameGetParamsWithContext(ctx context.Context) *SystemLoggerByNameGetParams { + var () + return &SystemLoggerByNameGetParams{ + + Context: ctx, + } +} + +// NewSystemLoggerByNameGetParamsWithHTTPClient creates a new SystemLoggerByNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSystemLoggerByNameGetParamsWithHTTPClient(client *http.Client) *SystemLoggerByNameGetParams { + var () + return &SystemLoggerByNameGetParams{ + HTTPClient: client, + } +} + +/*SystemLoggerByNameGetParams contains all the parameters to send to the API endpoint +for the system logger by name get operation typically these are written to a http.Request +*/ +type SystemLoggerByNameGetParams struct { + + /*Name + The logger to query about + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the system logger by name get params +func (o *SystemLoggerByNameGetParams) WithTimeout(timeout time.Duration) *SystemLoggerByNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the system logger by name get params +func (o *SystemLoggerByNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the system logger by name get params +func (o *SystemLoggerByNameGetParams) WithContext(ctx context.Context) *SystemLoggerByNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the system logger by name get params +func (o *SystemLoggerByNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the system logger by name get params +func (o *SystemLoggerByNameGetParams) WithHTTPClient(client *http.Client) *SystemLoggerByNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the system logger by name get params +func (o *SystemLoggerByNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the system logger by name get params +func (o *SystemLoggerByNameGetParams) WithName(name string) *SystemLoggerByNameGetParams { + o.SetName(name) + return o +} + +// SetName adds the name to the system logger by name get params +func (o *SystemLoggerByNameGetParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *SystemLoggerByNameGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_responses.go new file mode 100644 index 00000000000..76a127c2e3a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SystemLoggerByNameGetReader is a Reader for the SystemLoggerByNameGet structure. +type SystemLoggerByNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SystemLoggerByNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSystemLoggerByNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSystemLoggerByNameGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSystemLoggerByNameGetOK creates a SystemLoggerByNameGetOK with default headers values +func NewSystemLoggerByNameGetOK() *SystemLoggerByNameGetOK { + return &SystemLoggerByNameGetOK{} +} + +/*SystemLoggerByNameGetOK handles this case with default header values. + +SystemLoggerByNameGetOK system logger by name get o k +*/ +type SystemLoggerByNameGetOK struct { + Payload string +} + +func (o *SystemLoggerByNameGetOK) GetPayload() string { + return o.Payload +} + +func (o *SystemLoggerByNameGetOK) 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 +} + +// NewSystemLoggerByNameGetDefault creates a SystemLoggerByNameGetDefault with default headers values +func NewSystemLoggerByNameGetDefault(code int) *SystemLoggerByNameGetDefault { + return &SystemLoggerByNameGetDefault{ + _statusCode: code, + } +} + +/*SystemLoggerByNameGetDefault handles this case with default header values. + +internal server error +*/ +type SystemLoggerByNameGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the system logger by name get default response +func (o *SystemLoggerByNameGetDefault) Code() int { + return o._statusCode +} + +func (o *SystemLoggerByNameGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SystemLoggerByNameGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SystemLoggerByNameGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_parameters.go new file mode 100644 index 00000000000..7839db8072f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSystemLoggerByNamePostParams creates a new SystemLoggerByNamePostParams object +// with the default values initialized. +func NewSystemLoggerByNamePostParams() *SystemLoggerByNamePostParams { + var () + return &SystemLoggerByNamePostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSystemLoggerByNamePostParamsWithTimeout creates a new SystemLoggerByNamePostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSystemLoggerByNamePostParamsWithTimeout(timeout time.Duration) *SystemLoggerByNamePostParams { + var () + return &SystemLoggerByNamePostParams{ + + timeout: timeout, + } +} + +// NewSystemLoggerByNamePostParamsWithContext creates a new SystemLoggerByNamePostParams object +// with the default values initialized, and the ability to set a context for a request +func NewSystemLoggerByNamePostParamsWithContext(ctx context.Context) *SystemLoggerByNamePostParams { + var () + return &SystemLoggerByNamePostParams{ + + Context: ctx, + } +} + +// NewSystemLoggerByNamePostParamsWithHTTPClient creates a new SystemLoggerByNamePostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSystemLoggerByNamePostParamsWithHTTPClient(client *http.Client) *SystemLoggerByNamePostParams { + var () + return &SystemLoggerByNamePostParams{ + HTTPClient: client, + } +} + +/*SystemLoggerByNamePostParams contains all the parameters to send to the API endpoint +for the system logger by name post operation typically these are written to a http.Request +*/ +type SystemLoggerByNamePostParams struct { + + /*Level + The new log level + + */ + Level string + /*Name + The logger to query about + + */ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the system logger by name post params +func (o *SystemLoggerByNamePostParams) WithTimeout(timeout time.Duration) *SystemLoggerByNamePostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the system logger by name post params +func (o *SystemLoggerByNamePostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the system logger by name post params +func (o *SystemLoggerByNamePostParams) WithContext(ctx context.Context) *SystemLoggerByNamePostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the system logger by name post params +func (o *SystemLoggerByNamePostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the system logger by name post params +func (o *SystemLoggerByNamePostParams) WithHTTPClient(client *http.Client) *SystemLoggerByNamePostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the system logger by name post params +func (o *SystemLoggerByNamePostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLevel adds the level to the system logger by name post params +func (o *SystemLoggerByNamePostParams) WithLevel(level string) *SystemLoggerByNamePostParams { + o.SetLevel(level) + return o +} + +// SetLevel adds the level to the system logger by name post params +func (o *SystemLoggerByNamePostParams) SetLevel(level string) { + o.Level = level +} + +// WithName adds the name to the system logger by name post params +func (o *SystemLoggerByNamePostParams) WithName(name string) *SystemLoggerByNamePostParams { + o.SetName(name) + return o +} + +// SetName adds the name to the system logger by name post params +func (o *SystemLoggerByNamePostParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *SystemLoggerByNamePostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param level + qrLevel := o.Level + qLevel := qrLevel + if qLevel != "" { + if err := r.SetQueryParam("level", qLevel); 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/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_responses.go new file mode 100644 index 00000000000..13cd41dab5a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_by_name_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SystemLoggerByNamePostReader is a Reader for the SystemLoggerByNamePost structure. +type SystemLoggerByNamePostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SystemLoggerByNamePostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSystemLoggerByNamePostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSystemLoggerByNamePostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSystemLoggerByNamePostOK creates a SystemLoggerByNamePostOK with default headers values +func NewSystemLoggerByNamePostOK() *SystemLoggerByNamePostOK { + return &SystemLoggerByNamePostOK{} +} + +/*SystemLoggerByNamePostOK handles this case with default header values. + +SystemLoggerByNamePostOK system logger by name post o k +*/ +type SystemLoggerByNamePostOK struct { +} + +func (o *SystemLoggerByNamePostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewSystemLoggerByNamePostDefault creates a SystemLoggerByNamePostDefault with default headers values +func NewSystemLoggerByNamePostDefault(code int) *SystemLoggerByNamePostDefault { + return &SystemLoggerByNamePostDefault{ + _statusCode: code, + } +} + +/*SystemLoggerByNamePostDefault handles this case with default header values. + +internal server error +*/ +type SystemLoggerByNamePostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the system logger by name post default response +func (o *SystemLoggerByNamePostDefault) Code() int { + return o._statusCode +} + +func (o *SystemLoggerByNamePostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SystemLoggerByNamePostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SystemLoggerByNamePostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_parameters.go new file mode 100644 index 00000000000..201587b90ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSystemLoggerGetParams creates a new SystemLoggerGetParams object +// with the default values initialized. +func NewSystemLoggerGetParams() *SystemLoggerGetParams { + + return &SystemLoggerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSystemLoggerGetParamsWithTimeout creates a new SystemLoggerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSystemLoggerGetParamsWithTimeout(timeout time.Duration) *SystemLoggerGetParams { + + return &SystemLoggerGetParams{ + + timeout: timeout, + } +} + +// NewSystemLoggerGetParamsWithContext creates a new SystemLoggerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewSystemLoggerGetParamsWithContext(ctx context.Context) *SystemLoggerGetParams { + + return &SystemLoggerGetParams{ + + Context: ctx, + } +} + +// NewSystemLoggerGetParamsWithHTTPClient creates a new SystemLoggerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSystemLoggerGetParamsWithHTTPClient(client *http.Client) *SystemLoggerGetParams { + + return &SystemLoggerGetParams{ + HTTPClient: client, + } +} + +/*SystemLoggerGetParams contains all the parameters to send to the API endpoint +for the system logger get operation typically these are written to a http.Request +*/ +type SystemLoggerGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the system logger get params +func (o *SystemLoggerGetParams) WithTimeout(timeout time.Duration) *SystemLoggerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the system logger get params +func (o *SystemLoggerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the system logger get params +func (o *SystemLoggerGetParams) WithContext(ctx context.Context) *SystemLoggerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the system logger get params +func (o *SystemLoggerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the system logger get params +func (o *SystemLoggerGetParams) WithHTTPClient(client *http.Client) *SystemLoggerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the system logger get params +func (o *SystemLoggerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *SystemLoggerGetParams) 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/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_responses.go new file mode 100644 index 00000000000..2ed18c16368 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_get_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SystemLoggerGetReader is a Reader for the SystemLoggerGet structure. +type SystemLoggerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SystemLoggerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSystemLoggerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSystemLoggerGetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSystemLoggerGetOK creates a SystemLoggerGetOK with default headers values +func NewSystemLoggerGetOK() *SystemLoggerGetOK { + return &SystemLoggerGetOK{} +} + +/*SystemLoggerGetOK handles this case with default header values. + +SystemLoggerGetOK system logger get o k +*/ +type SystemLoggerGetOK struct { + Payload []string +} + +func (o *SystemLoggerGetOK) GetPayload() []string { + return o.Payload +} + +func (o *SystemLoggerGetOK) 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 +} + +// NewSystemLoggerGetDefault creates a SystemLoggerGetDefault with default headers values +func NewSystemLoggerGetDefault(code int) *SystemLoggerGetDefault { + return &SystemLoggerGetDefault{ + _statusCode: code, + } +} + +/*SystemLoggerGetDefault handles this case with default header values. + +internal server error +*/ +type SystemLoggerGetDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the system logger get default response +func (o *SystemLoggerGetDefault) Code() int { + return o._statusCode +} + +func (o *SystemLoggerGetDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SystemLoggerGetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SystemLoggerGetDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_parameters.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_parameters.go new file mode 100644 index 00000000000..e3bf41baa53 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewSystemLoggerPostParams creates a new SystemLoggerPostParams object +// with the default values initialized. +func NewSystemLoggerPostParams() *SystemLoggerPostParams { + var () + return &SystemLoggerPostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewSystemLoggerPostParamsWithTimeout creates a new SystemLoggerPostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewSystemLoggerPostParamsWithTimeout(timeout time.Duration) *SystemLoggerPostParams { + var () + return &SystemLoggerPostParams{ + + timeout: timeout, + } +} + +// NewSystemLoggerPostParamsWithContext creates a new SystemLoggerPostParams object +// with the default values initialized, and the ability to set a context for a request +func NewSystemLoggerPostParamsWithContext(ctx context.Context) *SystemLoggerPostParams { + var () + return &SystemLoggerPostParams{ + + Context: ctx, + } +} + +// NewSystemLoggerPostParamsWithHTTPClient creates a new SystemLoggerPostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewSystemLoggerPostParamsWithHTTPClient(client *http.Client) *SystemLoggerPostParams { + var () + return &SystemLoggerPostParams{ + HTTPClient: client, + } +} + +/*SystemLoggerPostParams contains all the parameters to send to the API endpoint +for the system logger post operation typically these are written to a http.Request +*/ +type SystemLoggerPostParams struct { + + /*Level + The new log level + + */ + Level string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the system logger post params +func (o *SystemLoggerPostParams) WithTimeout(timeout time.Duration) *SystemLoggerPostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the system logger post params +func (o *SystemLoggerPostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the system logger post params +func (o *SystemLoggerPostParams) WithContext(ctx context.Context) *SystemLoggerPostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the system logger post params +func (o *SystemLoggerPostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the system logger post params +func (o *SystemLoggerPostParams) WithHTTPClient(client *http.Client) *SystemLoggerPostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the system logger post params +func (o *SystemLoggerPostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLevel adds the level to the system logger post params +func (o *SystemLoggerPostParams) WithLevel(level string) *SystemLoggerPostParams { + o.SetLevel(level) + return o +} + +// SetLevel adds the level to the system logger post params +func (o *SystemLoggerPostParams) SetLevel(level string) { + o.Level = level +} + +// WriteToRequest writes these params to a swagger request +func (o *SystemLoggerPostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param level + qrLevel := o.Level + qLevel := qrLevel + if qLevel != "" { + if err := r.SetQueryParam("level", qLevel); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_responses.go b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_responses.go new file mode 100644 index 00000000000..306822e3f8f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/operations/system_logger_post_responses.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/models" +) + +// SystemLoggerPostReader is a Reader for the SystemLoggerPost structure. +type SystemLoggerPostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *SystemLoggerPostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewSystemLoggerPostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewSystemLoggerPostDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewSystemLoggerPostOK creates a SystemLoggerPostOK with default headers values +func NewSystemLoggerPostOK() *SystemLoggerPostOK { + return &SystemLoggerPostOK{} +} + +/*SystemLoggerPostOK handles this case with default header values. + +SystemLoggerPostOK system logger post o k +*/ +type SystemLoggerPostOK struct { +} + +func (o *SystemLoggerPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +// NewSystemLoggerPostDefault creates a SystemLoggerPostDefault with default headers values +func NewSystemLoggerPostDefault(code int) *SystemLoggerPostDefault { + return &SystemLoggerPostDefault{ + _statusCode: code, + } +} + +/*SystemLoggerPostDefault handles this case with default header values. + +internal server error +*/ +type SystemLoggerPostDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the system logger post default response +func (o *SystemLoggerPostDefault) Code() int { + return o._statusCode +} + +func (o *SystemLoggerPostDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *SystemLoggerPostDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *SystemLoggerPostDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla/client/scylla_client.go b/pkg/scyllaclient/internal/scylla/client/scylla_client.go new file mode 100644 index 00000000000..5eb9daf1230 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/client/scylla_client.go @@ -0,0 +1,117 @@ +// 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" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla/client/operations" +) + +// Default scylla HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "mermaid.magic.host" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http"} + +// NewHTTPClient creates a new scylla HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Scylla { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new scylla HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Scylla { + // 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 scylla client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Scylla { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Scylla) + cli.Transport = transport + + cli.Operations = operations.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 +} + +// Scylla is a client for scylla +type Scylla struct { + Operations *operations.Client + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Scylla) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + + c.Operations.SetTransport(transport) + +} diff --git a/pkg/scyllaclient/internal/scylla/models/collectd_metric_status.go b/pkg/scyllaclient/internal/scylla/models/collectd_metric_status.go new file mode 100644 index 00000000000..b5ae8d5b045 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/collectd_metric_status.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// CollectdMetricStatus collectd_metric_status +// +// Holds a collectd id and an enable flag +// swagger:model collectd_metric_status +type CollectdMetricStatus struct { + + // Is the metric enabled + Enable bool `json:"enable,omitempty"` + + // id + ID *TypeInstanceID `json:"id,omitempty"` +} + +// Validate validates this collectd metric status +func (m *CollectdMetricStatus) 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 *CollectdMetricStatus) 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") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *CollectdMetricStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CollectdMetricStatus) UnmarshalBinary(b []byte) error { + var res CollectdMetricStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/collectd_value.go b/pkg/scyllaclient/internal/scylla/models/collectd_value.go new file mode 100644 index 00000000000..885f0305346 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/collectd_value.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// CollectdValue collectd_value +// +// Holds a collectd value +// swagger:model collectd_value +type CollectdValue struct { + + // An array of values + Values []interface{} `json:"values"` +} + +// Validate validates this collectd value +func (m *CollectdValue) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CollectdValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CollectdValue) UnmarshalBinary(b []byte) error { + var res CollectdValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/column_family_info.go b/pkg/scyllaclient/internal/scylla/models/column_family_info.go new file mode 100644 index 00000000000..ec83d02aef6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/column_family_info.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// ColumnFamilyInfo column_family_info +// +// Information about column family +// swagger:model column_family_info +type ColumnFamilyInfo struct { + + // The column family + Cf string `json:"cf,omitempty"` + + // The Keyspace + Ks string `json:"ks,omitempty"` + + // The column family type + Type string `json:"type,omitempty"` +} + +// Validate validates this column family info +func (m *ColumnFamilyInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ColumnFamilyInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ColumnFamilyInfo) UnmarshalBinary(b []byte) error { + var res ColumnFamilyInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/compaction_info.go b/pkg/scyllaclient/internal/scylla/models/compaction_info.go new file mode 100644 index 00000000000..5d73c0609a0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/compaction_info.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// CompactionInfo compaction_info +// +// A key value mapping +// swagger:model compaction_info +type CompactionInfo struct { + + // The current completed + Completed interface{} `json:"completed,omitempty"` + + // The operation type + OperationType string `json:"operation_type,omitempty"` + + // The total to compact + Total interface{} `json:"total,omitempty"` + + // The compacted unit + Unit string `json:"unit,omitempty"` +} + +// Validate validates this compaction info +func (m *CompactionInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *CompactionInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *CompactionInfo) UnmarshalBinary(b []byte) error { + var res CompactionInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/direction.go b/pkg/scyllaclient/internal/scylla/models/direction.go new file mode 100644 index 00000000000..77474286bd8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/direction.go @@ -0,0 +1,65 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// Direction Direction +// +// The file name +// swagger:model Direction +type Direction string + +const ( + + // DirectionOUT captures enum value "OUT" + DirectionOUT Direction = "OUT" + + // DirectionIN captures enum value "IN" + DirectionIN Direction = "IN" +) + +// for schema +var directionEnum []interface{} + +func init() { + var res []Direction + if err := json.Unmarshal([]byte(`["OUT","IN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + directionEnum = append(directionEnum, v) + } +} + +func (m Direction) validateDirectionEnum(path, location string, value Direction) error { + if err := validate.Enum(path, location, value, directionEnum); err != nil { + return err + } + return nil +} + +// Validate validates this direction +func (m Direction) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateDirectionEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/endpoint_detail.go b/pkg/scyllaclient/internal/scylla/models/endpoint_detail.go new file mode 100644 index 00000000000..27a7556af37 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/endpoint_detail.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// EndpointDetail endpoint_detail +// +// Endpoint detail +// swagger:model endpoint_detail +type EndpointDetail struct { + + // The endpoint datacenter + Datacenter string `json:"datacenter,omitempty"` + + // The endpoint host + Host string `json:"host,omitempty"` + + // The endpoint rack + Rack string `json:"rack,omitempty"` +} + +// Validate validates this endpoint detail +func (m *EndpointDetail) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EndpointDetail) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EndpointDetail) UnmarshalBinary(b []byte) error { + var res EndpointDetail + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/endpoint_phi_value.go b/pkg/scyllaclient/internal/scylla/models/endpoint_phi_value.go new file mode 100644 index 00000000000..6cc133ef59d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/endpoint_phi_value.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// EndpointPhiValue endpoint_phi_value +// +// Holds phi value for a single end point +// swagger:model endpoint_phi_value +type EndpointPhiValue struct { + + // end point address + Endpoint string `json:"endpoint,omitempty"` + + // Phi value + Phi interface{} `json:"phi,omitempty"` +} + +// Validate validates this endpoint phi value +func (m *EndpointPhiValue) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EndpointPhiValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EndpointPhiValue) UnmarshalBinary(b []byte) error { + var res EndpointPhiValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/endpoint_state.go b/pkg/scyllaclient/internal/scylla/models/endpoint_state.go new file mode 100644 index 00000000000..663489aa234 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/endpoint_state.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// EndpointState endpoint_state +// +// Holds an endpoint state +// swagger:model endpoint_state +type EndpointState struct { + + // The endpoint address + Addrs string `json:"addrs,omitempty"` + + // Is the endpoint alive + ApplicationState []*VersionValue `json:"application_state"` + + // The heart beat generation + Generation int32 `json:"generation,omitempty"` + + // Is the endpoint alive + IsAlive bool `json:"is_alive,omitempty"` + + // The update timestamp + UpdateTime interface{} `json:"update_time,omitempty"` + + // The heart beat version + Version int32 `json:"version,omitempty"` +} + +// Validate validates this endpoint state +func (m *EndpointState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateApplicationState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *EndpointState) validateApplicationState(formats strfmt.Registry) error { + + if swag.IsZero(m.ApplicationState) { // not required + return nil + } + + for i := 0; i < len(m.ApplicationState); i++ { + if swag.IsZero(m.ApplicationState[i]) { // not required + continue + } + + if m.ApplicationState[i] != nil { + if err := m.ApplicationState[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("application_state" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *EndpointState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EndpointState) UnmarshalBinary(b []byte) error { + var res EndpointState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/error_model.go b/pkg/scyllaclient/internal/scylla/models/error_model.go new file mode 100644 index 00000000000..28e7014f942 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/error_model.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// ErrorModel error model +// swagger:model ErrorModel +type ErrorModel struct { + + // code + Code int64 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this error model +func (m *ErrorModel) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ErrorModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ErrorModel) UnmarshalBinary(b []byte) error { + var res ErrorModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/estimated_histogram.go b/pkg/scyllaclient/internal/scylla/models/estimated_histogram.go new file mode 100644 index 00000000000..b1edfbe838e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/estimated_histogram.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// EstimatedHistogram estimated_histogram +// +// An estimated histogram values +// swagger:model estimated_histogram +type EstimatedHistogram struct { + + // The series of values to which the counts in `buckets` correspond + BucketOffsets []interface{} `json:"bucket_offsets"` + + // The histogram buckets + Buckets []interface{} `json:"buckets"` +} + +// Validate validates this estimated histogram +func (m *EstimatedHistogram) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *EstimatedHistogram) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *EstimatedHistogram) UnmarshalBinary(b []byte) error { + var res EstimatedHistogram + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/histogram.go b/pkg/scyllaclient/internal/scylla/models/histogram.go new file mode 100644 index 00000000000..e139d6100ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/histogram.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Histogram histogram +// +// A histogram values +// swagger:model histogram +type Histogram struct { + + // Total count so far + Count interface{} `json:"count,omitempty"` + + // The max so far + Max interface{} `json:"max,omitempty"` + + // The mean + Mean interface{} `json:"mean,omitempty"` + + // The min so far + Min interface{} `json:"min,omitempty"` + + // A sample containing the last n elements + Sample []interface{} `json:"sample"` + + // Total sum so far + Sum interface{} `json:"sum,omitempty"` + + // The variance + Variance interface{} `json:"variance,omitempty"` +} + +// Validate validates this histogram +func (m *Histogram) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Histogram) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Histogram) UnmarshalBinary(b []byte) error { + var res Histogram + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/history.go b/pkg/scyllaclient/internal/scylla/models/history.go new file mode 100644 index 00000000000..9f5feb438bf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/history.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// History history +// +// Compaction history information +// swagger:model history +type History struct { + + // Bytes in + BytesIn interface{} `json:"bytes_in,omitempty"` + + // Bytes out + BytesOut interface{} `json:"bytes_out,omitempty"` + + // The column family name + Cf string `json:"cf,omitempty"` + + // The time of compaction + CompactedAt interface{} `json:"compacted_at,omitempty"` + + // The UUID + ID string `json:"id,omitempty"` + + // The keyspace name + Ks string `json:"ks,omitempty"` + + // The merged rows + RowsMerged []*RowMerged `json:"rows_merged"` +} + +// Validate validates this history +func (m *History) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRowsMerged(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *History) validateRowsMerged(formats strfmt.Registry) error { + + if swag.IsZero(m.RowsMerged) { // not required + return nil + } + + for i := 0; i < len(m.RowsMerged); i++ { + if swag.IsZero(m.RowsMerged[i]) { // not required + continue + } + + if m.RowsMerged[i] != nil { + if err := m.RowsMerged[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rows_merged" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *History) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *History) UnmarshalBinary(b []byte) error { + var res History + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/level.go b/pkg/scyllaclient/internal/scylla/models/level.go new file mode 100644 index 00000000000..08e23af075c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/level.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// Level level +// swagger:model level +type Level string + +const ( + + // LevelError captures enum value "error" + LevelError Level = "error" + + // LevelWarn captures enum value "warn" + LevelWarn Level = "warn" + + // LevelInfo captures enum value "info" + LevelInfo Level = "info" + + // LevelDebug captures enum value "debug" + LevelDebug Level = "debug" + + // LevelTrace captures enum value "trace" + LevelTrace Level = "trace" +) + +// for schema +var levelEnum []interface{} + +func init() { + var res []Level + if err := json.Unmarshal([]byte(`["error","warn","info","debug","trace"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + levelEnum = append(levelEnum, v) + } +} + +func (m Level) validateLevelEnum(path, location string, value Level) error { + if err := validate.Enum(path, location, value, levelEnum); err != nil { + return err + } + return nil +} + +// Validate validates this level +func (m Level) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateLevelEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/map_string_double.go b/pkg/scyllaclient/internal/scylla/models/map_string_double.go new file mode 100644 index 00000000000..ce91e15ee57 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/map_string_double.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// MapStringDouble map_string_double +// +// A key value mapping between a string and a double +// swagger:model map_string_double +type MapStringDouble struct { + + // The key + Key string `json:"key,omitempty"` + + // The value + Value interface{} `json:"value,omitempty"` +} + +// Validate validates this map string double +func (m *MapStringDouble) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MapStringDouble) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MapStringDouble) UnmarshalBinary(b []byte) error { + var res MapStringDouble + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/maplist_mapper.go b/pkg/scyllaclient/internal/scylla/models/maplist_mapper.go new file mode 100644 index 00000000000..7d3713b9fe0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/maplist_mapper.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// MaplistMapper maplist_mapper +// +// A key value mapping, where key and value are list +// swagger:model maplist_mapper +type MaplistMapper struct { + + // The key + Key []string `json:"key"` + + // The value + Value []string `json:"value"` +} + +// Validate validates this maplist mapper +func (m *MaplistMapper) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MaplistMapper) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MaplistMapper) UnmarshalBinary(b []byte) error { + var res MaplistMapper + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/mapper.go b/pkg/scyllaclient/internal/scylla/models/mapper.go new file mode 100644 index 00000000000..5cb9532dba3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/mapper.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Mapper mapper +// +// A key value mapping +// swagger:model mapper +type Mapper struct { + + // The key + Key string `json:"key,omitempty"` + + // The value + Value string `json:"value,omitempty"` +} + +// Validate validates this mapper +func (m *Mapper) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Mapper) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Mapper) UnmarshalBinary(b []byte) error { + var res Mapper + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/mapper_list.go b/pkg/scyllaclient/internal/scylla/models/mapper_list.go new file mode 100644 index 00000000000..9733176dca7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/mapper_list.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// MapperList mapper_list +// +// Holds a key value which is a list +// swagger:model mapper_list +type MapperList struct { + + // The key + Key string `json:"key,omitempty"` + + // The value + Value []string `json:"value"` +} + +// Validate validates this mapper list +func (m *MapperList) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MapperList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MapperList) UnmarshalBinary(b []byte) error { + var res MapperList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/message_counter.go b/pkg/scyllaclient/internal/scylla/models/message_counter.go new file mode 100644 index 00000000000..4cfc488f7c3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/message_counter.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// MessageCounter message_counter +// +// Holds command counters +// swagger:model message_counter +type MessageCounter struct { + + // key + Key string `json:"key,omitempty"` + + // value + Value interface{} `json:"value,omitempty"` +} + +// Validate validates this message counter +func (m *MessageCounter) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *MessageCounter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *MessageCounter) UnmarshalBinary(b []byte) error { + var res MessageCounter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/progress_info.go b/pkg/scyllaclient/internal/scylla/models/progress_info.go new file mode 100644 index 00000000000..01de8e700de --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/progress_info.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// ProgressInfo progress_info +// +// File transfer progress +// swagger:model progress_info +type ProgressInfo struct { + + // The current bytes + CurrentBytes interface{} `json:"current_bytes,omitempty"` + + // direction + Direction Direction `json:"direction,omitempty"` + + // The file name + FileName string `json:"file_name,omitempty"` + + // The peer address + Peer string `json:"peer,omitempty"` + + // The session index + SessionIndex int32 `json:"session_index,omitempty"` + + // The total bytes + TotalBytes interface{} `json:"total_bytes,omitempty"` +} + +// Validate validates this progress info +func (m *ProgressInfo) 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 +} + +func (m *ProgressInfo) validateDirection(formats strfmt.Registry) error { + + if swag.IsZero(m.Direction) { // not required + return nil + } + + if err := m.Direction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("direction") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProgressInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProgressInfo) UnmarshalBinary(b []byte) error { + var res ProgressInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/progress_info_mapper.go b/pkg/scyllaclient/internal/scylla/models/progress_info_mapper.go new file mode 100644 index 00000000000..a8137dc42ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/progress_info_mapper.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// ProgressInfoMapper progress_info_mapper +// +// A mapping between file and its progress info +// swagger:model progress_info_mapper +type ProgressInfoMapper struct { + + // The key + Key string `json:"key,omitempty"` + + // value + Value *ProgressInfo `json:"value,omitempty"` +} + +// Validate validates this progress info mapper +func (m *ProgressInfoMapper) 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 *ProgressInfoMapper) 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") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ProgressInfoMapper) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ProgressInfoMapper) UnmarshalBinary(b []byte) error { + var res ProgressInfoMapper + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/rate_moving_average.go b/pkg/scyllaclient/internal/scylla/models/rate_moving_average.go new file mode 100644 index 00000000000..5c59540a929 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/rate_moving_average.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// RateMovingAverage rate_moving_average +// +// A meter metric which measures mean throughput and one, five, and fifteen-minute exponentially-weighted moving average throughputs +// swagger:model rate_moving_average +type RateMovingAverage struct { + + // Total number of events from startup + Count interface{} `json:"count,omitempty"` + + // The mean rate from startup + MeanRate interface{} `json:"mean_rate,omitempty"` + + // One, five and fifteen mintues rates + Rates []interface{} `json:"rates"` +} + +// Validate validates this rate moving average +func (m *RateMovingAverage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RateMovingAverage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RateMovingAverage) UnmarshalBinary(b []byte) error { + var res RateMovingAverage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/rate_moving_average_and_histogram.go b/pkg/scyllaclient/internal/scylla/models/rate_moving_average_and_histogram.go new file mode 100644 index 00000000000..edeaf969815 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/rate_moving_average_and_histogram.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// RateMovingAverageAndHistogram rate_moving_average_and_histogram +// +// A timer metric which aggregates timing durations and provides duration statistics, plus throughput statistics +// swagger:model rate_moving_average_and_histogram +type RateMovingAverageAndHistogram struct { + + // hist + Hist *Histogram `json:"hist,omitempty"` + + // meter + Meter *RateMovingAverage `json:"meter,omitempty"` +} + +// Validate validates this rate moving average and histogram +func (m *RateMovingAverageAndHistogram) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHist(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMeter(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *RateMovingAverageAndHistogram) validateHist(formats strfmt.Registry) error { + + if swag.IsZero(m.Hist) { // not required + return nil + } + + if m.Hist != nil { + if err := m.Hist.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hist") + } + return err + } + } + + return nil +} + +func (m *RateMovingAverageAndHistogram) validateMeter(formats strfmt.Registry) error { + + if swag.IsZero(m.Meter) { // not required + return nil + } + + if m.Meter != nil { + if err := m.Meter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meter") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *RateMovingAverageAndHistogram) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RateMovingAverageAndHistogram) UnmarshalBinary(b []byte) error { + var res RateMovingAverageAndHistogram + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/repair_async_status_response.go b/pkg/scyllaclient/internal/scylla/models/repair_async_status_response.go new file mode 100644 index 00000000000..ad04a01383e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/repair_async_status_response.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// RepairAsyncStatusResponse repair_async_statusResponse +// swagger:model repair_async_statusResponse +type RepairAsyncStatusResponse string + +const ( + + // RepairAsyncStatusResponseRUNNING captures enum value "RUNNING" + RepairAsyncStatusResponseRUNNING RepairAsyncStatusResponse = "RUNNING" + + // RepairAsyncStatusResponseSUCCESSFUL captures enum value "SUCCESSFUL" + RepairAsyncStatusResponseSUCCESSFUL RepairAsyncStatusResponse = "SUCCESSFUL" + + // RepairAsyncStatusResponseFAILED captures enum value "FAILED" + RepairAsyncStatusResponseFAILED RepairAsyncStatusResponse = "FAILED" +) + +// for schema +var repairAsyncStatusResponseEnum []interface{} + +func init() { + var res []RepairAsyncStatusResponse + if err := json.Unmarshal([]byte(`["RUNNING","SUCCESSFUL","FAILED"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + repairAsyncStatusResponseEnum = append(repairAsyncStatusResponseEnum, v) + } +} + +func (m RepairAsyncStatusResponse) validateRepairAsyncStatusResponseEnum(path, location string, value RepairAsyncStatusResponse) error { + if err := validate.Enum(path, location, value, repairAsyncStatusResponseEnum); err != nil { + return err + } + return nil +} + +// Validate validates this repair async status response +func (m RepairAsyncStatusResponse) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateRepairAsyncStatusResponseEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/row_merged.go b/pkg/scyllaclient/internal/scylla/models/row_merged.go new file mode 100644 index 00000000000..316dd244ac0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/row_merged.go @@ -0,0 +1,48 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// RowMerged row_merged +// +// A row merged information +// swagger:model row_merged +type RowMerged struct { + + // The number of sstable + Key int32 `json:"key,omitempty"` + + // The number or row compacted + Value interface{} `json:"value,omitempty"` +} + +// Validate validates this row merged +func (m *RowMerged) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *RowMerged) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *RowMerged) UnmarshalBinary(b []byte) error { + var res RowMerged + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/slow_query_info.go b/pkg/scyllaclient/internal/scylla/models/slow_query_info.go new file mode 100644 index 00000000000..a9227093ce8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/slow_query_info.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// SlowQueryInfo slow_query_info +// +// Slow query triggering information +// swagger:model slow_query_info +type SlowQueryInfo struct { + + // Is slow query logging enable or disable + Enable bool `json:"enable,omitempty"` + + // The slow query logging threshold in microseconds. Queries that takes longer, will be logged + Threshold interface{} `json:"threshold,omitempty"` + + // The slow query TTL in seconds + TTL interface{} `json:"ttl,omitempty"` +} + +// Validate validates this slow query info +func (m *SlowQueryInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *SlowQueryInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *SlowQueryInfo) UnmarshalBinary(b []byte) error { + var res SlowQueryInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/snapshot.go b/pkg/scyllaclient/internal/scylla/models/snapshot.go new file mode 100644 index 00000000000..0f07ea487f0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/snapshot.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Snapshot snapshot +// +// Snapshot detail +// swagger:model snapshot +type Snapshot struct { + + // The column family + Cf string `json:"cf,omitempty"` + + // The key space snapshot key + Ks string `json:"ks,omitempty"` + + // The live snapshot size + Live interface{} `json:"live,omitempty"` + + // The total snapshot size + Total interface{} `json:"total,omitempty"` +} + +// Validate validates this snapshot +func (m *Snapshot) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Snapshot) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Snapshot) UnmarshalBinary(b []byte) error { + var res Snapshot + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/snapshots.go b/pkg/scyllaclient/internal/scylla/models/snapshots.go new file mode 100644 index 00000000000..ba7d806040e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/snapshots.go @@ -0,0 +1,85 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// Snapshots snapshots +// +// List of Snapshot detail +// swagger:model snapshots +type Snapshots struct { + + // The snapshot key + Key string `json:"key,omitempty"` + + // The column family + Value []*Snapshot `json:"value"` +} + +// Validate validates this snapshots +func (m *Snapshots) 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 *Snapshots) validateValue(formats strfmt.Registry) error { + + if swag.IsZero(m.Value) { // not required + return nil + } + + for i := 0; i < len(m.Value); i++ { + if swag.IsZero(m.Value[i]) { // not required + continue + } + + if m.Value[i] != nil { + if err := m.Value[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("value" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *Snapshots) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Snapshots) UnmarshalBinary(b []byte) error { + var res Snapshots + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/state.go b/pkg/scyllaclient/internal/scylla/models/state.go new file mode 100644 index 00000000000..ed150ad3451 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/state.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// State State +// +// Current session state +// swagger:model State +type State string + +const ( + + // StateINITIALIZED captures enum value "INITIALIZED" + StateINITIALIZED State = "INITIALIZED" + + // StatePREPARING captures enum value "PREPARING" + StatePREPARING State = "PREPARING" + + // StateSTREAMING captures enum value "STREAMING" + StateSTREAMING State = "STREAMING" + + // StateWAITCOMPLETE captures enum value "WAIT_COMPLETE" + StateWAITCOMPLETE State = "WAIT_COMPLETE" + + // StateCOMPLETE captures enum value "COMPLETE" + StateCOMPLETE State = "COMPLETE" + + // StateFAILED captures enum value "FAILED" + StateFAILED State = "FAILED" +) + +// for schema +var stateEnum []interface{} + +func init() { + var res []State + if err := json.Unmarshal([]byte(`["INITIALIZED","PREPARING","STREAMING","WAIT_COMPLETE","COMPLETE","FAILED"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + stateEnum = append(stateEnum, v) + } +} + +func (m State) validateStateEnum(path, location string, value State) error { + if err := validate.Enum(path, location, value, stateEnum); err != nil { + return err + } + return nil +} + +// Validate validates this state +func (m State) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateStateEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/stream_info.go b/pkg/scyllaclient/internal/scylla/models/stream_info.go new file mode 100644 index 00000000000..aa004fbbcf7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/stream_info.go @@ -0,0 +1,210 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// StreamInfo stream_info +// +// Stream session info +// swagger:model stream_info +type StreamInfo struct { + + // connecting + Connecting string `json:"connecting,omitempty"` + + // The peer + Peer string `json:"peer,omitempty"` + + // Receiving files + ReceivingFiles []*ProgressInfoMapper `json:"receiving_files"` + + // Receiving summaries + ReceivingSummaries []*StreamSummary `json:"receiving_summaries"` + + // Sending files + SendingFiles []*ProgressInfoMapper `json:"sending_files"` + + // Sending summaries + SendingSummaries []*StreamSummary `json:"sending_summaries"` + + // The session index + SessionIndex int32 `json:"session_index,omitempty"` + + // state + State State `json:"state,omitempty"` +} + +// Validate validates this stream info +func (m *StreamInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReceivingFiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReceivingSummaries(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSendingFiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSendingSummaries(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 *StreamInfo) validateReceivingFiles(formats strfmt.Registry) error { + + if swag.IsZero(m.ReceivingFiles) { // not required + return nil + } + + for i := 0; i < len(m.ReceivingFiles); i++ { + if swag.IsZero(m.ReceivingFiles[i]) { // not required + continue + } + + if m.ReceivingFiles[i] != nil { + if err := m.ReceivingFiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("receiving_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StreamInfo) validateReceivingSummaries(formats strfmt.Registry) error { + + if swag.IsZero(m.ReceivingSummaries) { // not required + return nil + } + + for i := 0; i < len(m.ReceivingSummaries); i++ { + if swag.IsZero(m.ReceivingSummaries[i]) { // not required + continue + } + + if m.ReceivingSummaries[i] != nil { + if err := m.ReceivingSummaries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("receiving_summaries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StreamInfo) validateSendingFiles(formats strfmt.Registry) error { + + if swag.IsZero(m.SendingFiles) { // not required + return nil + } + + for i := 0; i < len(m.SendingFiles); i++ { + if swag.IsZero(m.SendingFiles[i]) { // not required + continue + } + + if m.SendingFiles[i] != nil { + if err := m.SendingFiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sending_files" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StreamInfo) validateSendingSummaries(formats strfmt.Registry) error { + + if swag.IsZero(m.SendingSummaries) { // not required + return nil + } + + for i := 0; i < len(m.SendingSummaries); i++ { + if swag.IsZero(m.SendingSummaries[i]) { // not required + continue + } + + if m.SendingSummaries[i] != nil { + if err := m.SendingSummaries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sending_summaries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *StreamInfo) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StreamInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StreamInfo) UnmarshalBinary(b []byte) error { + var res StreamInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/stream_state.go b/pkg/scyllaclient/internal/scylla/models/stream_state.go new file mode 100644 index 00000000000..ca9552efd7f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/stream_state.go @@ -0,0 +1,88 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// StreamState stream_state +// +// Current snapshot of streaming progress +// swagger:model stream_state +type StreamState struct { + + // The stream description + Description string `json:"description,omitempty"` + + // Plan UUID + PlanID string `json:"plan_id,omitempty"` + + // The sessions info + Sessions []*StreamInfo `json:"sessions"` +} + +// Validate validates this stream state +func (m *StreamState) 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 *StreamState) 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)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *StreamState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StreamState) UnmarshalBinary(b []byte) error { + var res StreamState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/stream_summary.go b/pkg/scyllaclient/internal/scylla/models/stream_summary.go new file mode 100644 index 00000000000..79bb1e88c80 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/stream_summary.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// StreamSummary stream_summary +// +// Stream summary info +// swagger:model stream_summary +type StreamSummary struct { + + // The ID + CfID string `json:"cf_id,omitempty"` + + // Number of files to transfer. Can be 0 if nothing to transfer for some streaming request. + Files int32 `json:"files,omitempty"` + + // total size + TotalSize interface{} `json:"total_size,omitempty"` +} + +// Validate validates this stream summary +func (m *StreamSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *StreamSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *StreamSummary) UnmarshalBinary(b []byte) error { + var res StreamSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/summary.go b/pkg/scyllaclient/internal/scylla/models/summary.go new file mode 100644 index 00000000000..f0efdbd9a41 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/summary.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// Summary summary +// +// A compaction summary object +// swagger:model summary +type Summary struct { + + // The column family name + Cf string `json:"cf,omitempty"` + + // The number of units completed + Completed interface{} `json:"completed,omitempty"` + + // The UUID + ID string `json:"id,omitempty"` + + // The keyspace name + Ks string `json:"ks,omitempty"` + + // The task compaction type + TaskType string `json:"task_type,omitempty"` + + // The total number of units + Total interface{} `json:"total,omitempty"` + + // The units being used + Unit string `json:"unit,omitempty"` +} + +// Validate validates this summary +func (m *Summary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Summary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Summary) UnmarshalBinary(b []byte) error { + var res Summary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/token_range.go b/pkg/scyllaclient/internal/scylla/models/token_range.go new file mode 100644 index 00000000000..3c08d0ebd6e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/token_range.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// TokenRange token_range +// +// Endpoint range information +// swagger:model token_range +type TokenRange struct { + + // The range start token + EndToken string `json:"end_token,omitempty"` + + // The endpoint details + EndpointDetails []*EndpointDetail `json:"endpoint_details"` + + // The endpoints + Endpoints []string `json:"endpoints"` + + // The rpc endpoints + RPCEndpoints []string `json:"rpc_endpoints"` + + // The range start token + StartToken string `json:"start_token,omitempty"` +} + +// Validate validates this token range +func (m *TokenRange) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndpointDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *TokenRange) validateEndpointDetails(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointDetails) { // not required + return nil + } + + for i := 0; i < len(m.EndpointDetails); i++ { + if swag.IsZero(m.EndpointDetails[i]) { // not required + continue + } + + if m.EndpointDetails[i] != nil { + if err := m.EndpointDetails[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endpoint_details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *TokenRange) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TokenRange) UnmarshalBinary(b []byte) error { + var res TokenRange + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/type.go b/pkg/scyllaclient/internal/scylla/models/type.go new file mode 100644 index 00000000000..225fbce7d47 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/type.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// Type type +// swagger:model type +type Type string + +const ( + + // TypeAll captures enum value "all" + TypeAll Type = "all" + + // TypeUser captures enum value "user" + TypeUser Type = "user" + + // TypeNonLocalStrategy captures enum value "non_local_strategy" + TypeNonLocalStrategy Type = "non_local_strategy" +) + +// for schema +var typeEnum []interface{} + +func init() { + var res []Type + if err := json.Unmarshal([]byte(`["all","user","non_local_strategy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + typeEnum = append(typeEnum, v) + } +} + +func (m Type) validateTypeEnum(path, location string, value Type) error { + if err := validate.Enum(path, location, value, typeEnum); err != nil { + return err + } + return nil +} + +// Validate validates this type +func (m Type) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/type_instance_id.go b/pkg/scyllaclient/internal/scylla/models/type_instance_id.go new file mode 100644 index 00000000000..c0d5074c055 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/type_instance_id.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// TypeInstanceID type_instance_id +// +// A type instance ID +// swagger:model type_instance_id +type TypeInstanceID struct { + + // The plugin ID + Plugin string `json:"plugin,omitempty"` + + // The plugin instance + PluginInstance string `json:"plugin_instance,omitempty"` + + // The plugin type + Type string `json:"type,omitempty"` + + // The plugin type instance + TypeInstance string `json:"type_instance,omitempty"` +} + +// Validate validates this type instance id +func (m *TypeInstanceID) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *TypeInstanceID) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *TypeInstanceID) UnmarshalBinary(b []byte) error { + var res TypeInstanceID + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/verb.go b/pkg/scyllaclient/internal/scylla/models/verb.go new file mode 100644 index 00000000000..e4820a028a6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/verb.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/validate" +) + +// Verb Verb +// swagger:model Verb +type Verb string + +const ( + + // VerbCLIENTID captures enum value "CLIENT_ID" + VerbCLIENTID Verb = "CLIENT_ID" + + // VerbMUTATION captures enum value "MUTATION" + VerbMUTATION Verb = "MUTATION" + + // VerbMUTATIONDONE captures enum value "MUTATION_DONE" + VerbMUTATIONDONE Verb = "MUTATION_DONE" + + // VerbREADDATA captures enum value "READ_DATA" + VerbREADDATA Verb = "READ_DATA" + + // VerbREADMUTATIONDATA captures enum value "READ_MUTATION_DATA" + VerbREADMUTATIONDATA Verb = "READ_MUTATION_DATA" + + // VerbREADDIGEST captures enum value "READ_DIGEST" + VerbREADDIGEST Verb = "READ_DIGEST" + + // VerbGOSSIPECHO captures enum value "GOSSIP_ECHO" + VerbGOSSIPECHO Verb = "GOSSIP_ECHO" + + // VerbGOSSIPDIGESTSYN captures enum value "GOSSIP_DIGEST_SYN" + VerbGOSSIPDIGESTSYN Verb = "GOSSIP_DIGEST_SYN" + + // VerbGOSSIPDIGESTACK2 captures enum value "GOSSIP_DIGEST_ACK2" + VerbGOSSIPDIGESTACK2 Verb = "GOSSIP_DIGEST_ACK2" + + // VerbGOSSIPSHUTDOWN captures enum value "GOSSIP_SHUTDOWN" + VerbGOSSIPSHUTDOWN Verb = "GOSSIP_SHUTDOWN" + + // VerbDEFINITIONSUPDATE captures enum value "DEFINITIONS_UPDATE" + VerbDEFINITIONSUPDATE Verb = "DEFINITIONS_UPDATE" + + // VerbTRUNCATE captures enum value "TRUNCATE" + VerbTRUNCATE Verb = "TRUNCATE" + + // VerbREPLICATIONFINISHED captures enum value "REPLICATION_FINISHED" + VerbREPLICATIONFINISHED Verb = "REPLICATION_FINISHED" + + // VerbMIGRATIONREQUEST captures enum value "MIGRATION_REQUEST" + VerbMIGRATIONREQUEST Verb = "MIGRATION_REQUEST" + + // VerbPREPAREMESSAGE captures enum value "PREPARE_MESSAGE" + VerbPREPAREMESSAGE Verb = "PREPARE_MESSAGE" + + // VerbPREPAREDONEMESSAGE captures enum value "PREPARE_DONE_MESSAGE" + VerbPREPAREDONEMESSAGE Verb = "PREPARE_DONE_MESSAGE" + + // VerbSTREAMMUTATION captures enum value "STREAM_MUTATION" + VerbSTREAMMUTATION Verb = "STREAM_MUTATION" + + // VerbSTREAMMUTATIONDONE captures enum value "STREAM_MUTATION_DONE" + VerbSTREAMMUTATIONDONE Verb = "STREAM_MUTATION_DONE" + + // VerbCOMPLETEMESSAGE captures enum value "COMPLETE_MESSAGE" + VerbCOMPLETEMESSAGE Verb = "COMPLETE_MESSAGE" + + // VerbREPAIRCHECKSUMRANGE captures enum value "REPAIR_CHECKSUM_RANGE" + VerbREPAIRCHECKSUMRANGE Verb = "REPAIR_CHECKSUM_RANGE" + + // VerbGETSCHEMAVERSION captures enum value "GET_SCHEMA_VERSION" + VerbGETSCHEMAVERSION Verb = "GET_SCHEMA_VERSION" +) + +// for schema +var verbEnum []interface{} + +func init() { + var res []Verb + if err := json.Unmarshal([]byte(`["CLIENT_ID","MUTATION","MUTATION_DONE","READ_DATA","READ_MUTATION_DATA","READ_DIGEST","GOSSIP_ECHO","GOSSIP_DIGEST_SYN","GOSSIP_DIGEST_ACK2","GOSSIP_SHUTDOWN","DEFINITIONS_UPDATE","TRUNCATE","REPLICATION_FINISHED","MIGRATION_REQUEST","PREPARE_MESSAGE","PREPARE_DONE_MESSAGE","STREAM_MUTATION","STREAM_MUTATION_DONE","COMPLETE_MESSAGE","REPAIR_CHECKSUM_RANGE","GET_SCHEMA_VERSION"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + verbEnum = append(verbEnum, v) + } +} + +func (m Verb) validateVerbEnum(path, location string, value Verb) error { + if err := validate.Enum(path, location, value, verbEnum); err != nil { + return err + } + return nil +} + +// Validate validates this verb +func (m Verb) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateVerbEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/verb_counter.go b/pkg/scyllaclient/internal/scylla/models/verb_counter.go new file mode 100644 index 00000000000..32ad26fb8c4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/verb_counter.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" +) + +// VerbCounter verb_counter +// +// Holds verb counters +// swagger:model verb_counter +type VerbCounter struct { + + // count + Count interface{} `json:"count,omitempty"` + + // verb + Verb Verb `json:"verb,omitempty"` +} + +// Validate validates this verb counter +func (m *VerbCounter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVerb(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *VerbCounter) validateVerb(formats strfmt.Registry) error { + + if swag.IsZero(m.Verb) { // not required + return nil + } + + if err := m.Verb.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("verb") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *VerbCounter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VerbCounter) UnmarshalBinary(b []byte) error { + var res VerbCounter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla/models/version_value.go b/pkg/scyllaclient/internal/scylla/models/version_value.go new file mode 100644 index 00000000000..7718108c4ed --- /dev/null +++ b/pkg/scyllaclient/internal/scylla/models/version_value.go @@ -0,0 +1,51 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// VersionValue version_value +// +// Holds a version value for an application state +// swagger:model version_value +type VersionValue struct { + + // The application state enum index + ApplicationState int32 `json:"application_state,omitempty"` + + // The version value + Value string `json:"value,omitempty"` + + // The application state version + Version int32 `json:"version,omitempty"` +} + +// Validate validates this version value +func (m *VersionValue) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *VersionValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *VersionValue) UnmarshalBinary(b []byte) error { + var res VersionValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/config_client.go b/pkg/scyllaclient/internal/scylla_v2/client/config/config_client.go new file mode 100644 index 00000000000..205fb4eeb8b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/config_client.go @@ -0,0 +1,6089 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// 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" + + strfmt "github.com/go-openapi/strfmt" +) + +// New creates a new config API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client for config API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +/* +FindConfigAbortOnLsaBadAlloc Abort when allocation in LSA region fails +*/ +func (a *Client) FindConfigAbortOnLsaBadAlloc(params *FindConfigAbortOnLsaBadAllocParams) (*FindConfigAbortOnLsaBadAllocOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAbortOnLsaBadAllocParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_abort_on_lsa_bad_alloc", + Method: "GET", + PathPattern: "/config/abort_on_lsa_bad_alloc", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAbortOnLsaBadAllocReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAbortOnLsaBadAllocOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAbortOnLsaBadAllocDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAPIAddress Http Rest API address +*/ +func (a *Client) FindConfigAPIAddress(params *FindConfigAPIAddressParams) (*FindConfigAPIAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAPIAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_api_address", + Method: "GET", + PathPattern: "/config/api_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAPIAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAPIAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAPIAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAPIDocDir The API definition file directory +*/ +func (a *Client) FindConfigAPIDocDir(params *FindConfigAPIDocDirParams) (*FindConfigAPIDocDirOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAPIDocDirParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_api_doc_dir", + Method: "GET", + PathPattern: "/config/api_doc_dir", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAPIDocDirReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAPIDocDirOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAPIDocDirDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAPIPort Http Rest API port +*/ +func (a *Client) FindConfigAPIPort(params *FindConfigAPIPortParams) (*FindConfigAPIPortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAPIPortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_api_port", + Method: "GET", + PathPattern: "/config/api_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAPIPortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAPIPortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAPIPortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAPIUIDir The directory location of the API GUI +*/ +func (a *Client) FindConfigAPIUIDir(params *FindConfigAPIUIDirParams) (*FindConfigAPIUIDirOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAPIUIDirParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_api_ui_dir", + Method: "GET", + PathPattern: "/config/api_ui_dir", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAPIUIDirReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAPIUIDirOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAPIUIDirDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAuthenticator The authentication backend, used to identify users. The available authenticators are: + + org.apache.cassandra.auth.AllowAllAuthenticator : Disables authentication; no checks are performed. + org.apache.cassandra.auth.PasswordAuthenticator : Authenticates users with user names and hashed passwords stored in the system_auth.credentials table. If you use the default, 1, and the node with the lone replica goes down, you will not be able to log into the cluster because the system_auth keyspace was not replicated. +Related information: Internal authentication +*/ +func (a *Client) FindConfigAuthenticator(params *FindConfigAuthenticatorParams) (*FindConfigAuthenticatorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAuthenticatorParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_authenticator", + Method: "GET", + PathPattern: "/config/authenticator", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAuthenticatorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAuthenticatorOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAuthenticatorDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAuthorizer The authorization backend. It implements IAuthenticator, which limits access and provides permissions. The available authorizers are: + + AllowAllAuthorizer : Disables authorization; allows any action to any user. + CassandraAuthorizer : Stores permissions in system_auth.permissions table. If you use the default, 1, and the node with the lone replica goes down, you will not be able to log into the cluster because the system_auth keyspace was not replicated. +Related information: Object permissions +*/ +func (a *Client) FindConfigAuthorizer(params *FindConfigAuthorizerParams) (*FindConfigAuthorizerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAuthorizerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_authorizer", + Method: "GET", + PathPattern: "/config/authorizer", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAuthorizerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAuthorizerOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAuthorizerDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAutoAdjustFlushQuota true: auto-adjust memtable shares for flush processes +*/ +func (a *Client) FindConfigAutoAdjustFlushQuota(params *FindConfigAutoAdjustFlushQuotaParams) (*FindConfigAutoAdjustFlushQuotaOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAutoAdjustFlushQuotaParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_auto_adjust_flush_quota", + Method: "GET", + PathPattern: "/config/auto_adjust_flush_quota", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAutoAdjustFlushQuotaReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAutoAdjustFlushQuotaOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAutoAdjustFlushQuotaDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAutoBootstrap This setting has been removed from default configuration. It makes new (non-seed) nodes automatically migrate the right data to themselves. Do not set this to false unless you really know what you are doing. +Related information: Initializing a multiple node cluster (single data center) and Initializing a multiple node cluster (multiple data centers). +*/ +func (a *Client) FindConfigAutoBootstrap(params *FindConfigAutoBootstrapParams) (*FindConfigAutoBootstrapOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAutoBootstrapParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_auto_bootstrap", + Method: "GET", + PathPattern: "/config/auto_bootstrap", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAutoBootstrapReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAutoBootstrapOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAutoBootstrapDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigAutoSnapshot Enable or disable whether a snapshot is taken of the data before keyspace truncation or dropping of tables. To prevent data loss, using the default setting is strongly advised. If you set to false, you will lose data on truncation or drop. +*/ +func (a *Client) FindConfigAutoSnapshot(params *FindConfigAutoSnapshotParams) (*FindConfigAutoSnapshotOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigAutoSnapshotParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_auto_snapshot", + Method: "GET", + PathPattern: "/config/auto_snapshot", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigAutoSnapshotReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigAutoSnapshotOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigAutoSnapshotDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBackgroundWriterSchedulingQuota max cpu usage ratio (between 0 and 1) for compaction process. Not intended for setting in normal operations. Setting it to 1 or higher will disable it, recommended operational setting is 0.5. +*/ +func (a *Client) FindConfigBackgroundWriterSchedulingQuota(params *FindConfigBackgroundWriterSchedulingQuotaParams) (*FindConfigBackgroundWriterSchedulingQuotaOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBackgroundWriterSchedulingQuotaParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_background_writer_scheduling_quota", + Method: "GET", + PathPattern: "/config/background_writer_scheduling_quota", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBackgroundWriterSchedulingQuotaReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBackgroundWriterSchedulingQuotaOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBackgroundWriterSchedulingQuotaDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBatchSizeFailThresholdInKb Fail any multiple-partition batch exceeding this value. 50kb (10x warn threshold) by default. +*/ +func (a *Client) FindConfigBatchSizeFailThresholdInKb(params *FindConfigBatchSizeFailThresholdInKbParams) (*FindConfigBatchSizeFailThresholdInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBatchSizeFailThresholdInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_batch_size_fail_threshold_in_kb", + Method: "GET", + PathPattern: "/config/batch_size_fail_threshold_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBatchSizeFailThresholdInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBatchSizeFailThresholdInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBatchSizeFailThresholdInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBatchSizeWarnThresholdInKb Log WARN on any batch size exceeding this value in kilobytes. Caution should be taken on increasing the size of this threshold as it can lead to node instability. +*/ +func (a *Client) FindConfigBatchSizeWarnThresholdInKb(params *FindConfigBatchSizeWarnThresholdInKbParams) (*FindConfigBatchSizeWarnThresholdInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBatchSizeWarnThresholdInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_batch_size_warn_threshold_in_kb", + Method: "GET", + PathPattern: "/config/batch_size_warn_threshold_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBatchSizeWarnThresholdInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBatchSizeWarnThresholdInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBatchSizeWarnThresholdInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBatchlogReplayThrottleInKb Total maximum throttle. Throttling is reduced proportionally to the number of nodes in the cluster. +*/ +func (a *Client) FindConfigBatchlogReplayThrottleInKb(params *FindConfigBatchlogReplayThrottleInKbParams) (*FindConfigBatchlogReplayThrottleInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBatchlogReplayThrottleInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_batchlog_replay_throttle_in_kb", + Method: "GET", + PathPattern: "/config/batchlog_replay_throttle_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBatchlogReplayThrottleInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBatchlogReplayThrottleInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBatchlogReplayThrottleInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBroadcastAddress The IP address a node tells other nodes in the cluster to contact it by. It allows public and private address to be different. For example, use the broadcast_address parameter in topologies where not all nodes have access to other nodes by their private IP addresses. +If your Scylla cluster is deployed across multiple Amazon EC2 regions and you use the EC2MultiRegionSnitch , set the broadcast_address to public IP address of the node and the listen_address to the private IP. +*/ +func (a *Client) FindConfigBroadcastAddress(params *FindConfigBroadcastAddressParams) (*FindConfigBroadcastAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBroadcastAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_broadcast_address", + Method: "GET", + PathPattern: "/config/broadcast_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBroadcastAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBroadcastAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBroadcastAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigBroadcastRPCAddress RPC address to broadcast to drivers and other Scylla nodes. This cannot be set to 0.0.0.0. If blank, it is set to the value of the rpc_address or rpc_interface. If rpc_address or rpc_interfaceis set to 0.0.0.0, this property must be set. + +*/ +func (a *Client) FindConfigBroadcastRPCAddress(params *FindConfigBroadcastRPCAddressParams) (*FindConfigBroadcastRPCAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigBroadcastRPCAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_broadcast_rpc_address", + Method: "GET", + PathPattern: "/config/broadcast_rpc_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigBroadcastRPCAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigBroadcastRPCAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigBroadcastRPCAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCacheHitRateReadBalancing This boolean controls whether the replicas for read query will be choosen based on cache hit ratio +*/ +func (a *Client) FindConfigCacheHitRateReadBalancing(params *FindConfigCacheHitRateReadBalancingParams) (*FindConfigCacheHitRateReadBalancingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCacheHitRateReadBalancingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_cache_hit_rate_read_balancing", + Method: "GET", + PathPattern: "/config/cache_hit_rate_read_balancing", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCacheHitRateReadBalancingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCacheHitRateReadBalancingOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCacheHitRateReadBalancingDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCasContentionTimeoutInMs The time that the coordinator continues to retry a CAS (compare and set) operation that contends with other proposals for the same row. +*/ +func (a *Client) FindConfigCasContentionTimeoutInMs(params *FindConfigCasContentionTimeoutInMsParams) (*FindConfigCasContentionTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCasContentionTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_cas_contention_timeout_in_ms", + Method: "GET", + PathPattern: "/config/cas_contention_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCasContentionTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCasContentionTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCasContentionTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigClientEncryptionOptions Enable or disable client-to-node encryption. You must also generate keys and provide the appropriate key and certificate. No custom encryption options are currently enabled. The available options are: + + enabled : (Default: false ) To enable, set to true. + certificate: (Default: conf/scylla.crt) The location of a PEM-encoded x509 certificate used to identify and encrypt the client/server communication. + keyfile: (Default: conf/scylla.key) PEM Key file associated with certificate. +truststore : (Default: ) Location of the truststore containing the trusted certificate for authenticating remote servers. + +The advanced settings are: + + priority_string : GnuTLS priority string controlling TLS algorithms used/allowed. + require_client_auth : (Default: false ) Enables or disables certificate authentication. +Related information: Client-to-node encryption +*/ +func (a *Client) FindConfigClientEncryptionOptions(params *FindConfigClientEncryptionOptionsParams) (*FindConfigClientEncryptionOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigClientEncryptionOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_client_encryption_options", + Method: "GET", + PathPattern: "/config/client_encryption_options", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigClientEncryptionOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigClientEncryptionOptionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigClientEncryptionOptionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigClusterName The name of the cluster; used to prevent machines in one logical cluster from joining another. All nodes participating in a cluster must have the same value. +*/ +func (a *Client) FindConfigClusterName(params *FindConfigClusterNameParams) (*FindConfigClusterNameOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigClusterNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_cluster_name", + Method: "GET", + PathPattern: "/config/cluster_name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigClusterNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigClusterNameOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigClusterNameDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigColumnIndexSizeInKb Granularity of the index of rows within a partition. For huge rows, decrease this setting to improve seek time. If you use key cache, be careful not to make this setting too large because key cache will be overwhelmed. If you're unsure of the size of the rows, it's best to use the default setting. +*/ +func (a *Client) FindConfigColumnIndexSizeInKb(params *FindConfigColumnIndexSizeInKbParams) (*FindConfigColumnIndexSizeInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigColumnIndexSizeInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_column_index_size_in_kb", + Method: "GET", + PathPattern: "/config/column_index_size_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigColumnIndexSizeInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigColumnIndexSizeInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigColumnIndexSizeInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitFailurePolicy Policy for commit disk failures: + + die Shut down gossip and Thrift and kill the JVM, so the node can be replaced. + stop Shut down gossip and Thrift, leaving the node effectively dead, but can be inspected using JMX. + stop_commit Shut down the commit log, letting writes collect but continuing to service reads (as in pre-2.0.5 Cassandra). + ignore Ignore fatal errors and let the batches fail. +*/ +func (a *Client) FindConfigCommitFailurePolicy(params *FindConfigCommitFailurePolicyParams) (*FindConfigCommitFailurePolicyOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitFailurePolicyParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commit_failure_policy", + Method: "GET", + PathPattern: "/config/commit_failure_policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitFailurePolicyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitFailurePolicyOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitFailurePolicyDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogDirectory The directory where the commit log is stored. For optimal write performance, it is recommended the commit log be on a separate disk partition (ideally, a separate physical device) from the data file directories. +*/ +func (a *Client) FindConfigCommitlogDirectory(params *FindConfigCommitlogDirectoryParams) (*FindConfigCommitlogDirectoryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogDirectoryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_directory", + Method: "GET", + PathPattern: "/config/commitlog_directory", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogDirectoryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogDirectoryOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogDirectoryDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogReuseSegments Whether or not to re-use commitlog segments when finished instead of deleting them. Can improve commitlog latency on some file systems. + +*/ +func (a *Client) FindConfigCommitlogReuseSegments(params *FindConfigCommitlogReuseSegmentsParams) (*FindConfigCommitlogReuseSegmentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogReuseSegmentsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_reuse_segments", + Method: "GET", + PathPattern: "/config/commitlog_reuse_segments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogReuseSegmentsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogReuseSegmentsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogReuseSegmentsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogSegmentSizeInMb Sets the size of the individual commitlog file segments. A commitlog segment may be archived, deleted, or recycled after all its data has been flushed to SSTables. This amount of data can potentially include commitlog segments from every table in the system. The default size is usually suitable for most commitlog archiving, but if you want a finer granularity, 8 or 16 MB is reasonable. See Commit log archive configuration. +Related information: Commit log archive configuration +*/ +func (a *Client) FindConfigCommitlogSegmentSizeInMb(params *FindConfigCommitlogSegmentSizeInMbParams) (*FindConfigCommitlogSegmentSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogSegmentSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_segment_size_in_mb", + Method: "GET", + PathPattern: "/config/commitlog_segment_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogSegmentSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogSegmentSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogSegmentSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogSync The method that Scylla uses to acknowledge writes in milliseconds: + + periodic : Used with commitlog_sync_period_in_ms (Default: 10000 - 10 seconds ) to control how often the commit log is synchronized to disk. Periodic syncs are acknowledged immediately. + batch : Used with commitlog_sync_batch_window_in_ms (Default: disabled **) to control how long Scylla waits for other writes before performing a sync. When using this method, writes are not acknowledged until fsynced to disk. +Related information: Durability +*/ +func (a *Client) FindConfigCommitlogSync(params *FindConfigCommitlogSyncParams) (*FindConfigCommitlogSyncOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_sync", + Method: "GET", + PathPattern: "/config/commitlog_sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogSyncOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogSyncDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogSyncBatchWindowInMs Controls how long the system waits for other writes before performing a sync in ''batch'' mode. +*/ +func (a *Client) FindConfigCommitlogSyncBatchWindowInMs(params *FindConfigCommitlogSyncBatchWindowInMsParams) (*FindConfigCommitlogSyncBatchWindowInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogSyncBatchWindowInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_sync_batch_window_in_ms", + Method: "GET", + PathPattern: "/config/commitlog_sync_batch_window_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogSyncBatchWindowInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogSyncBatchWindowInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogSyncBatchWindowInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogSyncPeriodInMs Controls how long the system waits for other writes before performing a sync in ''periodic'' mode. +*/ +func (a *Client) FindConfigCommitlogSyncPeriodInMs(params *FindConfigCommitlogSyncPeriodInMsParams) (*FindConfigCommitlogSyncPeriodInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogSyncPeriodInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_sync_period_in_ms", + Method: "GET", + PathPattern: "/config/commitlog_sync_period_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogSyncPeriodInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogSyncPeriodInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogSyncPeriodInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogTotalSpaceInMb Total space used for commitlogs. If the used space goes above this value, Scylla rounds up to the next nearest segment multiple and flushes memtables to disk for the oldest commitlog segments, removing those log segments. This reduces the amount of data to replay on startup, and prevents infrequently-updated tables from indefinitely keeping commitlog segments. A small total commitlog space tends to cause more flush activity on less-active tables. +Related information: Configuring memtable throughput +*/ +func (a *Client) FindConfigCommitlogTotalSpaceInMb(params *FindConfigCommitlogTotalSpaceInMbParams) (*FindConfigCommitlogTotalSpaceInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogTotalSpaceInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_total_space_in_mb", + Method: "GET", + PathPattern: "/config/commitlog_total_space_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogTotalSpaceInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogTotalSpaceInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogTotalSpaceInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCommitlogUseoDsync Whether or not to use O_DSYNC mode for commitlog segments IO. Can improve commitlog latency on some file systems. + +*/ +func (a *Client) FindConfigCommitlogUseoDsync(params *FindConfigCommitlogUseoDsyncParams) (*FindConfigCommitlogUseODsyncOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCommitlogUseoDsyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_commitlog_use_o_dsync", + Method: "GET", + PathPattern: "/config/commitlog_use_o_dsync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCommitlogUseoDsyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCommitlogUseODsyncOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCommitlogUseoDsyncDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionEnforceMinThreshold If set to true, enforce the min_threshold option for compactions strictly. If false (default), Scylla may decide to compact even if below min_threshold +*/ +func (a *Client) FindConfigCompactionEnforceMinThreshold(params *FindConfigCompactionEnforceMinThresholdParams) (*FindConfigCompactionEnforceMinThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionEnforceMinThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_enforce_min_threshold", + Method: "GET", + PathPattern: "/config/compaction_enforce_min_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionEnforceMinThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionEnforceMinThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionEnforceMinThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionLargeCellWarningThresholdMb Log a warning when writing cells larger than this value +*/ +func (a *Client) FindConfigCompactionLargeCellWarningThresholdMb(params *FindConfigCompactionLargeCellWarningThresholdMbParams) (*FindConfigCompactionLargeCellWarningThresholdMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionLargeCellWarningThresholdMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_large_cell_warning_threshold_mb", + Method: "GET", + PathPattern: "/config/compaction_large_cell_warning_threshold_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionLargeCellWarningThresholdMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionLargeCellWarningThresholdMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionLargeCellWarningThresholdMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionLargePartitionWarningThresholdMb Log a warning when writing partitions larger than this value +*/ +func (a *Client) FindConfigCompactionLargePartitionWarningThresholdMb(params *FindConfigCompactionLargePartitionWarningThresholdMbParams) (*FindConfigCompactionLargePartitionWarningThresholdMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionLargePartitionWarningThresholdMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_large_partition_warning_threshold_mb", + Method: "GET", + PathPattern: "/config/compaction_large_partition_warning_threshold_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionLargePartitionWarningThresholdMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionLargePartitionWarningThresholdMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionLargePartitionWarningThresholdMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionLargeRowWarningThresholdMb Log a warning when writing rows larger than this value +*/ +func (a *Client) FindConfigCompactionLargeRowWarningThresholdMb(params *FindConfigCompactionLargeRowWarningThresholdMbParams) (*FindConfigCompactionLargeRowWarningThresholdMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionLargeRowWarningThresholdMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_large_row_warning_threshold_mb", + Method: "GET", + PathPattern: "/config/compaction_large_row_warning_threshold_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionLargeRowWarningThresholdMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionLargeRowWarningThresholdMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionLargeRowWarningThresholdMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionPreheatKeyCache When set to true , cached row keys are tracked during compaction, and re-cached to their new positions in the compacted SSTable. If you have extremely large key caches for tables, set the value to false ; see Global row and key caches properties. +*/ +func (a *Client) FindConfigCompactionPreheatKeyCache(params *FindConfigCompactionPreheatKeyCacheParams) (*FindConfigCompactionPreheatKeyCacheOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionPreheatKeyCacheParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_preheat_key_cache", + Method: "GET", + PathPattern: "/config/compaction_preheat_key_cache", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionPreheatKeyCacheReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionPreheatKeyCacheOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionPreheatKeyCacheDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionRowsCountWarningThreshold Log a warning when writing a number of rows larger than this value +*/ +func (a *Client) FindConfigCompactionRowsCountWarningThreshold(params *FindConfigCompactionRowsCountWarningThresholdParams) (*FindConfigCompactionRowsCountWarningThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionRowsCountWarningThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_rows_count_warning_threshold", + Method: "GET", + PathPattern: "/config/compaction_rows_count_warning_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionRowsCountWarningThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionRowsCountWarningThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionRowsCountWarningThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionStaticShares If set to higher than 0, ignore the controller's output and set the compaction shares statically. Do not set this unless you know what you are doing and suspect a problem in the controller. This option will be retired when the controller reaches more maturity +*/ +func (a *Client) FindConfigCompactionStaticShares(params *FindConfigCompactionStaticSharesParams) (*FindConfigCompactionStaticSharesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionStaticSharesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_static_shares", + Method: "GET", + PathPattern: "/config/compaction_static_shares", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionStaticSharesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionStaticSharesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionStaticSharesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCompactionThroughputMbPerSec Throttles compaction to the specified total throughput across the entire system. The faster you insert data, the faster you need to compact in order to keep the SSTable count down. The recommended Value is 16 to 32 times the rate of write throughput (in MBs/second). Setting the value to 0 disables compaction throttling. +Related information: Configuring compaction +*/ +func (a *Client) FindConfigCompactionThroughputMbPerSec(params *FindConfigCompactionThroughputMbPerSecParams) (*FindConfigCompactionThroughputMbPerSecOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCompactionThroughputMbPerSecParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_compaction_throughput_mb_per_sec", + Method: "GET", + PathPattern: "/config/compaction_throughput_mb_per_sec", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCompactionThroughputMbPerSecReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCompactionThroughputMbPerSecOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCompactionThroughputMbPerSecDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigConcurrentCompactors Sets the number of concurrent compaction processes allowed to run simultaneously on a node, not including validation compactions for anti-entropy repair. Simultaneous compactions help preserve read performance in a mixed read-write workload by mitigating the tendency of small SSTables to accumulate during a single long-running compaction. If compactions run too slowly or too fast, change compaction_throughput_mb_per_sec first. +*/ +func (a *Client) FindConfigConcurrentCompactors(params *FindConfigConcurrentCompactorsParams) (*FindConfigConcurrentCompactorsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigConcurrentCompactorsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_concurrent_compactors", + Method: "GET", + PathPattern: "/config/concurrent_compactors", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigConcurrentCompactorsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigConcurrentCompactorsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigConcurrentCompactorsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigConcurrentCounterWrites Counter writes read the current values before incrementing and writing them back. The recommended value is (16 × number_of_drives) . +*/ +func (a *Client) FindConfigConcurrentCounterWrites(params *FindConfigConcurrentCounterWritesParams) (*FindConfigConcurrentCounterWritesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigConcurrentCounterWritesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_concurrent_counter_writes", + Method: "GET", + PathPattern: "/config/concurrent_counter_writes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigConcurrentCounterWritesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigConcurrentCounterWritesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigConcurrentCounterWritesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigConcurrentReads For workloads with more data than can fit in memory, the bottleneck is reads fetching data from disk. Setting to (16 × number_of_drives) allows operations to queue low enough in the stack so that the OS and drives can reorder them. +*/ +func (a *Client) FindConfigConcurrentReads(params *FindConfigConcurrentReadsParams) (*FindConfigConcurrentReadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigConcurrentReadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_concurrent_reads", + Method: "GET", + PathPattern: "/config/concurrent_reads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigConcurrentReadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigConcurrentReadsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigConcurrentReadsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigConcurrentWrites Writes in Cassandra are rarely I/O bound, so the ideal number of concurrent writes depends on the number of CPU cores in your system. The recommended value is (8 x number_of_cpu_cores). +*/ +func (a *Client) FindConfigConcurrentWrites(params *FindConfigConcurrentWritesParams) (*FindConfigConcurrentWritesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigConcurrentWritesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_concurrent_writes", + Method: "GET", + PathPattern: "/config/concurrent_writes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigConcurrentWritesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigConcurrentWritesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigConcurrentWritesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigConsistentRangemovement When set to true, range movements will be consistent. It means: 1) it will refuse to bootstrap a new node if other bootstrapping/leaving/moving nodes detected. 2) data will be streamed to a new node only from the node which is no longer responsible for the token range. Same as -Dcassandra.consistent.rangemovement in cassandra +*/ +func (a *Client) FindConfigConsistentRangemovement(params *FindConfigConsistentRangemovementParams) (*FindConfigConsistentRangemovementOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigConsistentRangemovementParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_consistent_rangemovement", + Method: "GET", + PathPattern: "/config/consistent_rangemovement", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigConsistentRangemovementReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigConsistentRangemovementOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigConsistentRangemovementDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCounterCacheKeysToSave Number of keys from the counter cache to save. When disabled all keys are saved. +*/ +func (a *Client) FindConfigCounterCacheKeysToSave(params *FindConfigCounterCacheKeysToSaveParams) (*FindConfigCounterCacheKeysToSaveOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCounterCacheKeysToSaveParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_counter_cache_keys_to_save", + Method: "GET", + PathPattern: "/config/counter_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCounterCacheKeysToSaveReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCounterCacheKeysToSaveOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCounterCacheKeysToSaveDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCounterCacheSavePeriod Duration after which Cassandra should save the counter cache (keys only). Caches are saved to saved_caches_directory. +*/ +func (a *Client) FindConfigCounterCacheSavePeriod(params *FindConfigCounterCacheSavePeriodParams) (*FindConfigCounterCacheSavePeriodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCounterCacheSavePeriodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_counter_cache_save_period", + Method: "GET", + PathPattern: "/config/counter_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCounterCacheSavePeriodReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCounterCacheSavePeriodOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCounterCacheSavePeriodDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCounterCacheSizeInMb When no value is specified a minimum of 2.5% of Heap or 50MB. If you perform counter deletes and rely on low gc_grace_seconds, you should disable the counter cache. To disable, set to 0 +*/ +func (a *Client) FindConfigCounterCacheSizeInMb(params *FindConfigCounterCacheSizeInMbParams) (*FindConfigCounterCacheSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCounterCacheSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_counter_cache_size_in_mb", + Method: "GET", + PathPattern: "/config/counter_cache_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCounterCacheSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCounterCacheSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCounterCacheSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCounterWriteRequestTimeoutInMs The time that the coordinator waits for counter writes to complete. +*/ +func (a *Client) FindConfigCounterWriteRequestTimeoutInMs(params *FindConfigCounterWriteRequestTimeoutInMsParams) (*FindConfigCounterWriteRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCounterWriteRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_counter_write_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/counter_write_request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCounterWriteRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCounterWriteRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCounterWriteRequestTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCPUScheduler Enable cpu scheduling +*/ +func (a *Client) FindConfigCPUScheduler(params *FindConfigCPUSchedulerParams) (*FindConfigCPUSchedulerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCPUSchedulerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_cpu_scheduler", + Method: "GET", + PathPattern: "/config/cpu_scheduler", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCPUSchedulerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCPUSchedulerOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCPUSchedulerDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigCrossNodeTimeout Enable or disable operation timeout information exchange between nodes (to accurately measure request timeouts). If disabled Cassandra assumes the request was forwarded to the replica instantly by the coordinator. +CAUTION: +Before enabling this property make sure NTP (network time protocol) is installed and the times are synchronized between the nodes. +*/ +func (a *Client) FindConfigCrossNodeTimeout(params *FindConfigCrossNodeTimeoutParams) (*FindConfigCrossNodeTimeoutOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigCrossNodeTimeoutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_cross_node_timeout", + Method: "GET", + PathPattern: "/config/cross_node_timeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigCrossNodeTimeoutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigCrossNodeTimeoutOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigCrossNodeTimeoutDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDataFileDirectories The directory location where table data (SSTables) is stored +*/ +func (a *Client) FindConfigDataFileDirectories(params *FindConfigDataFileDirectoriesParams) (*FindConfigDataFileDirectoriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDataFileDirectoriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_data_file_directories", + Method: "GET", + PathPattern: "/config/data_file_directories", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDataFileDirectoriesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDataFileDirectoriesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDataFileDirectoriesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDefaultLogLevel find config default log level API +*/ +func (a *Client) FindConfigDefaultLogLevel(params *FindConfigDefaultLogLevelParams) (*FindConfigDefaultLogLevelOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDefaultLogLevelParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_default_log_level", + Method: "GET", + PathPattern: "/config/default_log_level", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDefaultLogLevelReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDefaultLogLevelOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDefaultLogLevelDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDefragmentMemoryOnIdle When set to true, will defragment memory when the cpu is idle. This reduces the amount of work Scylla performs when processing client requests. +*/ +func (a *Client) FindConfigDefragmentMemoryOnIdle(params *FindConfigDefragmentMemoryOnIdleParams) (*FindConfigDefragmentMemoryOnIdleOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDefragmentMemoryOnIdleParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_defragment_memory_on_idle", + Method: "GET", + PathPattern: "/config/defragment_memory_on_idle", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDefragmentMemoryOnIdleReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDefragmentMemoryOnIdleOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDefragmentMemoryOnIdleDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDeveloperMode Relax environment checks. Setting to true can reduce performance and reliability significantly. +*/ +func (a *Client) FindConfigDeveloperMode(params *FindConfigDeveloperModeParams) (*FindConfigDeveloperModeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDeveloperModeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_developer_mode", + Method: "GET", + PathPattern: "/config/developer_mode", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDeveloperModeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDeveloperModeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDeveloperModeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDiskFailurePolicy Sets how Scylla responds to disk failure. Recommend settings are stop or best_effort. + + die Shut down gossip and Thrift and kill the JVM for any file system errors or single SSTable errors, so the node can be replaced. + stop_paranoid Shut down gossip and Thrift even for single SSTable errors. + stop Shut down gossip and Thrift, leaving the node effectively dead, but available for inspection using JMX. + best_effort Stop using the failed disk and respond to requests based on the remaining available SSTables. This means you will see obsolete data at consistency level of ONE. + ignore Ignores fatal errors and lets the requests fail; all file system errors are logged but otherwise ignored. Scylla acts as in versions prior to Cassandra 1.2. + +Related information: Handling Disk Failures In Cassandra 1.2 blog and Recovering from a single disk failure using JBOD. + +*/ +func (a *Client) FindConfigDiskFailurePolicy(params *FindConfigDiskFailurePolicyParams) (*FindConfigDiskFailurePolicyOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDiskFailurePolicyParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_disk_failure_policy", + Method: "GET", + PathPattern: "/config/disk_failure_policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDiskFailurePolicyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDiskFailurePolicyOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDiskFailurePolicyDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDynamicSnitchBadnessThreshold Sets the performance threshold for dynamically routing requests away from a poorly performing node. A value of 0.2 means Cassandra continues to prefer the static snitch values until the node response time is 20% worse than the best performing node. Until the threshold is reached, incoming client requests are statically routed to the closest replica (as determined by the snitch). Having requests consistently routed to a given replica can help keep a working set of data hot when read repair is less than 1. +*/ +func (a *Client) FindConfigDynamicSnitchBadnessThreshold(params *FindConfigDynamicSnitchBadnessThresholdParams) (*FindConfigDynamicSnitchBadnessThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDynamicSnitchBadnessThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_dynamic_snitch_badness_threshold", + Method: "GET", + PathPattern: "/config/dynamic_snitch_badness_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDynamicSnitchBadnessThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDynamicSnitchBadnessThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDynamicSnitchBadnessThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDynamicSnitchResetIntervalInMs Time interval in milliseconds to reset all node scores, which allows a bad node to recover. +*/ +func (a *Client) FindConfigDynamicSnitchResetIntervalInMs(params *FindConfigDynamicSnitchResetIntervalInMsParams) (*FindConfigDynamicSnitchResetIntervalInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDynamicSnitchResetIntervalInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_dynamic_snitch_reset_interval_in_ms", + Method: "GET", + PathPattern: "/config/dynamic_snitch_reset_interval_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDynamicSnitchResetIntervalInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDynamicSnitchResetIntervalInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDynamicSnitchResetIntervalInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigDynamicSnitchUpdateIntervalInMs The time interval for how often the snitch calculates node scores. Because score calculation is CPU intensive, be careful when reducing this interval. +*/ +func (a *Client) FindConfigDynamicSnitchUpdateIntervalInMs(params *FindConfigDynamicSnitchUpdateIntervalInMsParams) (*FindConfigDynamicSnitchUpdateIntervalInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigDynamicSnitchUpdateIntervalInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_dynamic_snitch_update_interval_in_ms", + Method: "GET", + PathPattern: "/config/dynamic_snitch_update_interval_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigDynamicSnitchUpdateIntervalInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigDynamicSnitchUpdateIntervalInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigDynamicSnitchUpdateIntervalInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableCache Enable cache +*/ +func (a *Client) FindConfigEnableCache(params *FindConfigEnableCacheParams) (*FindConfigEnableCacheOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableCacheParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_cache", + Method: "GET", + PathPattern: "/config/enable_cache", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableCacheReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableCacheOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableCacheDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableCommitlog Enable commitlog +*/ +func (a *Client) FindConfigEnableCommitlog(params *FindConfigEnableCommitlogParams) (*FindConfigEnableCommitlogOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableCommitlogParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_commitlog", + Method: "GET", + PathPattern: "/config/enable_commitlog", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableCommitlogReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableCommitlogOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableCommitlogDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableDangerousDirectImportOfCassandraCounters Only turn this option on if you want to import tables from Cassandra containing counters, and you are SURE that no counters in that table were created in a version earlier than Cassandra 2.1. It is not enough to have ever since upgraded to newer versions of Cassandra. If you EVER used a version earlier than 2.1 in the cluster where these SSTables come from, DO NOT TURN ON THIS OPTION! You will corrupt your data. You have been warned. +*/ +func (a *Client) FindConfigEnableDangerousDirectImportOfCassandraCounters(params *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) (*FindConfigEnableDangerousDirectImportOfCassandraCountersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableDangerousDirectImportOfCassandraCountersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_dangerous_direct_import_of_cassandra_counters", + Method: "GET", + PathPattern: "/config/enable_dangerous_direct_import_of_cassandra_counters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableDangerousDirectImportOfCassandraCountersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableDangerousDirectImportOfCassandraCountersOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableDangerousDirectImportOfCassandraCountersDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableDeprecatedPartitioners Enable the byteordered and murmurs partitioners. These partitioners are deprecated and will be removed in a future version. +*/ +func (a *Client) FindConfigEnableDeprecatedPartitioners(params *FindConfigEnableDeprecatedPartitionersParams) (*FindConfigEnableDeprecatedPartitionersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableDeprecatedPartitionersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_deprecated_partitioners", + Method: "GET", + PathPattern: "/config/enable_deprecated_partitioners", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableDeprecatedPartitionersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableDeprecatedPartitionersOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableDeprecatedPartitionersDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableInMemoryDataStore Enable in memory mode (system tables are always persisted) +*/ +func (a *Client) FindConfigEnableInMemoryDataStore(params *FindConfigEnableInMemoryDataStoreParams) (*FindConfigEnableInMemoryDataStoreOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableInMemoryDataStoreParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_in_memory_data_store", + Method: "GET", + PathPattern: "/config/enable_in_memory_data_store", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableInMemoryDataStoreReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableInMemoryDataStoreOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableInMemoryDataStoreDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableKeyspaceColumnFamilyMetrics Enable per keyspace and per column family metrics reporting +*/ +func (a *Client) FindConfigEnableKeyspaceColumnFamilyMetrics(params *FindConfigEnableKeyspaceColumnFamilyMetricsParams) (*FindConfigEnableKeyspaceColumnFamilyMetricsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableKeyspaceColumnFamilyMetricsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_keyspace_column_family_metrics", + Method: "GET", + PathPattern: "/config/enable_keyspace_column_family_metrics", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableKeyspaceColumnFamilyMetricsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableKeyspaceColumnFamilyMetricsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableKeyspaceColumnFamilyMetricsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableShardAwareDrivers Enable native transport drivers to use connection-per-shard for better performance +*/ +func (a *Client) FindConfigEnableShardAwareDrivers(params *FindConfigEnableShardAwareDriversParams) (*FindConfigEnableShardAwareDriversOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableShardAwareDriversParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_shard_aware_drivers", + Method: "GET", + PathPattern: "/config/enable_shard_aware_drivers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableShardAwareDriversReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableShardAwareDriversOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableShardAwareDriversDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableSstableDataIntegrityCheck Enable interposer which checks for integrity of every sstable write. Performance is affected to some extent as a result. Useful to help debugging problems that may arise at another layers. +*/ +func (a *Client) FindConfigEnableSstableDataIntegrityCheck(params *FindConfigEnableSstableDataIntegrityCheckParams) (*FindConfigEnableSstableDataIntegrityCheckOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableSstableDataIntegrityCheckParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_sstable_data_integrity_check", + Method: "GET", + PathPattern: "/config/enable_sstable_data_integrity_check", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableSstableDataIntegrityCheckReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableSstableDataIntegrityCheckOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableSstableDataIntegrityCheckDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEnableSstablesMcFormat Enable SSTables 'mc' format to be used as the default file format +*/ +func (a *Client) FindConfigEnableSstablesMcFormat(params *FindConfigEnableSstablesMcFormatParams) (*FindConfigEnableSstablesMcFormatOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEnableSstablesMcFormatParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_enable_sstables_mc_format", + Method: "GET", + PathPattern: "/config/enable_sstables_mc_format", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEnableSstablesMcFormatReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEnableSstablesMcFormatOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEnableSstablesMcFormatDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigEndpointSnitch Set to a class that implements the IEndpointSnitch. Scylla uses snitches for locating nodes and routing requests. + + SimpleSnitch: Use for single-data center deployments or single-zone in public clouds. Does not recognize data center or rack information. It treats strategy order as proximity, which can improve cache locality when disabling read repair. + + GossipingPropertyFileSnitch: Recommended for production. The rack and data center for the local node are defined in the cassandra-rackdc.properties file and propagated to other nodes via gossip. To allow migration from the PropertyFileSnitch, it uses the cassandra-topology.properties file if it is present. + + Ec2Snitch: For EC2 deployments in a single region. Loads region and availability zone information from the EC2 API. The region is treated as the data center and the availability zone as the rack. Uses only private IPs. Subsequently it does not work across multiple regions. + + Ec2MultiRegionSnitch: Uses public IPs as the broadcast_address to allow cross-region connectivity. This means you must also set seed addresses to the public IP and open the storage_port or ssl_storage_port on the public IP firewall. For intra-region traffic, Scylla switches to the private IP after establishing a connection. + + GoogleCloudSnitch: For deployments on Google Cloud Platform across one or more regions. The region is treated as a datacenter and the availability zone is treated as a rack within the datacenter. The communication should occur over private IPs within the same logical network. + + RackInferringSnitch: Proximity is determined by rack and data center, which are assumed to correspond to the 3rd and 2nd octet of each node's IP address, respectively. This snitch is best used as an example for writing a custom snitch class (unless this happens to match your deployment conventions). + +Related information: Snitches + +*/ +func (a *Client) FindConfigEndpointSnitch(params *FindConfigEndpointSnitchParams) (*FindConfigEndpointSnitchOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigEndpointSnitchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_endpoint_snitch", + Method: "GET", + PathPattern: "/config/endpoint_snitch", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigEndpointSnitchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigEndpointSnitchOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigEndpointSnitchDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigExperimental Set to true to unlock experimental features. +*/ +func (a *Client) FindConfigExperimental(params *FindConfigExperimentalParams) (*FindConfigExperimentalOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigExperimentalParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_experimental", + Method: "GET", + PathPattern: "/config/experimental", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigExperimentalReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigExperimentalOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigExperimentalDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigFdInitialValueMs The initial failure_detector interval time in milliseconds. +*/ +func (a *Client) FindConfigFdInitialValueMs(params *FindConfigFdInitialValueMsParams) (*FindConfigFdInitialValueMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigFdInitialValueMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_fd_initial_value_ms", + Method: "GET", + PathPattern: "/config/fd_initial_value_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigFdInitialValueMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigFdInitialValueMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigFdInitialValueMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigFdMaxIntervalMs The maximum failure_detector interval time in milliseconds. Interval larger than the maximum will be ignored. Larger cluster may need to increase the default. +*/ +func (a *Client) FindConfigFdMaxIntervalMs(params *FindConfigFdMaxIntervalMsParams) (*FindConfigFdMaxIntervalMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigFdMaxIntervalMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_fd_max_interval_ms", + Method: "GET", + PathPattern: "/config/fd_max_interval_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigFdMaxIntervalMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigFdMaxIntervalMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigFdMaxIntervalMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigFileCacheSizeInMb Total memory to use for SSTable-reading buffers. +*/ +func (a *Client) FindConfigFileCacheSizeInMb(params *FindConfigFileCacheSizeInMbParams) (*FindConfigFileCacheSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigFileCacheSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_file_cache_size_in_mb", + Method: "GET", + PathPattern: "/config/file_cache_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigFileCacheSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigFileCacheSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigFileCacheSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigHintedHandoffEnabled Enable or disable hinted handoff. To enable per data center, add data center list. For example: hinted_handoff_enabled: DC1,DC2. A hint indicates that the write needs to be replayed to an unavailable node. Related information: About hinted handoff writes +*/ +func (a *Client) FindConfigHintedHandoffEnabled(params *FindConfigHintedHandoffEnabledParams) (*FindConfigHintedHandoffEnabledOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigHintedHandoffEnabledParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_hinted_handoff_enabled", + Method: "GET", + PathPattern: "/config/hinted_handoff_enabled", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigHintedHandoffEnabledReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigHintedHandoffEnabledOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigHintedHandoffEnabledDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigHintedHandoffThrottleInKb Maximum throttle per delivery thread in kilobytes per second. This rate reduces proportionally to the number of nodes in the cluster. For example, if there are two nodes in the cluster, each delivery thread will use the maximum rate. If there are three, each node will throttle to half of the maximum, since the two nodes are expected to deliver hints simultaneously. +*/ +func (a *Client) FindConfigHintedHandoffThrottleInKb(params *FindConfigHintedHandoffThrottleInKbParams) (*FindConfigHintedHandoffThrottleInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigHintedHandoffThrottleInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_hinted_handoff_throttle_in_kb", + Method: "GET", + PathPattern: "/config/hinted_handoff_throttle_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigHintedHandoffThrottleInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigHintedHandoffThrottleInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigHintedHandoffThrottleInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigHintsDirectory The directory where hints files are stored if hinted handoff is enabled. +*/ +func (a *Client) FindConfigHintsDirectory(params *FindConfigHintsDirectoryParams) (*FindConfigHintsDirectoryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigHintsDirectoryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_hints_directory", + Method: "GET", + PathPattern: "/config/hints_directory", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigHintsDirectoryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigHintsDirectoryOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigHintsDirectoryDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInMemoryCompactionLimitInMb Size limit for rows being compacted in memory. Larger rows spill to disk and use a slower two-pass compaction process. When this occurs, a message is logged specifying the row key. The recommended value is 5 to 10 percent of the available Java heap size. +*/ +func (a *Client) FindConfigInMemoryCompactionLimitInMb(params *FindConfigInMemoryCompactionLimitInMbParams) (*FindConfigInMemoryCompactionLimitInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInMemoryCompactionLimitInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_in_memory_compaction_limit_in_mb", + Method: "GET", + PathPattern: "/config/in_memory_compaction_limit_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInMemoryCompactionLimitInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInMemoryCompactionLimitInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInMemoryCompactionLimitInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigIncrementalBackups Backs up data updated since the last snapshot was taken. When enabled, Scylla creates a hard link to each SSTable flushed or streamed locally in a backups/ subdirectory of the keyspace data. Removing these links is the operator's responsibility. +Related information: Enabling incremental backups +*/ +func (a *Client) FindConfigIncrementalBackups(params *FindConfigIncrementalBackupsParams) (*FindConfigIncrementalBackupsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigIncrementalBackupsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_incremental_backups", + Method: "GET", + PathPattern: "/config/incremental_backups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigIncrementalBackupsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigIncrementalBackupsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigIncrementalBackupsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigIndexSummaryCapacityInMb Fixed memory pool size in MB for SSTable index summaries. If the memory usage of all index summaries exceeds this limit, any SSTables with low read rates shrink their index summaries to meet this limit. This is a best-effort process. In extreme conditions, Cassandra may need to use more than this amount of memory. +*/ +func (a *Client) FindConfigIndexSummaryCapacityInMb(params *FindConfigIndexSummaryCapacityInMbParams) (*FindConfigIndexSummaryCapacityInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigIndexSummaryCapacityInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_index_summary_capacity_in_mb", + Method: "GET", + PathPattern: "/config/index_summary_capacity_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigIndexSummaryCapacityInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigIndexSummaryCapacityInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigIndexSummaryCapacityInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigIndexSummaryResizeIntervalInMinutes How frequently index summaries should be re-sampled. This is done periodically to redistribute memory from the fixed-size pool to SSTables proportional their recent read rates. To disable, set to -1. This leaves existing index summaries at their current sampling level. +*/ +func (a *Client) FindConfigIndexSummaryResizeIntervalInMinutes(params *FindConfigIndexSummaryResizeIntervalInMinutesParams) (*FindConfigIndexSummaryResizeIntervalInMinutesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigIndexSummaryResizeIntervalInMinutesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_index_summary_resize_interval_in_minutes", + Method: "GET", + PathPattern: "/config/index_summary_resize_interval_in_minutes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigIndexSummaryResizeIntervalInMinutesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigIndexSummaryResizeIntervalInMinutesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigIndexSummaryResizeIntervalInMinutesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInitialToken Used in the single-node-per-token architecture, where a node owns exactly one contiguous range in the ring space. Setting this property overrides num_tokens. +If you not using vnodes or have num_tokens set it to 1 or unspecified (#num_tokens), you should always specify this parameter when setting up a production cluster for the first time and when adding capacity. For more information, see this parameter in the Cassandra 1.1 Node and Cluster Configuration documentation. +This parameter can be used with num_tokens (vnodes ) in special cases such as Restoring from a snapshot. +*/ +func (a *Client) FindConfigInitialToken(params *FindConfigInitialTokenParams) (*FindConfigInitialTokenOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInitialTokenParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_initial_token", + Method: "GET", + PathPattern: "/config/initial_token", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInitialTokenReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInitialTokenOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInitialTokenDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInterDcStreamThroughputOutboundMegabitsPerSec Throttles all streaming file transfer between the data centers. This setting allows throttles streaming throughput betweens data centers in addition to throttling all network stream traffic as configured with stream_throughput_outbound_megabits_per_sec. +*/ +func (a *Client) FindConfigInterDcStreamThroughputOutboundMegabitsPerSec(params *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) (*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_inter_dc_stream_throughput_outbound_megabits_per_sec", + Method: "GET", + PathPattern: "/config/inter_dc_stream_throughput_outbound_megabits_per_sec", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInterDcTCPNodelay Enable or disable tcp_nodelay for inter-data center communication. When disabled larger, but fewer, network packets are sent. This reduces overhead from the TCP protocol itself. However, if cross data-center responses are blocked, it will increase latency. +*/ +func (a *Client) FindConfigInterDcTCPNodelay(params *FindConfigInterDcTCPNodelayParams) (*FindConfigInterDcTCPNodelayOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInterDcTCPNodelayParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_inter_dc_tcp_nodelay", + Method: "GET", + PathPattern: "/config/inter_dc_tcp_nodelay", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInterDcTCPNodelayReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInterDcTCPNodelayOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInterDcTCPNodelayDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInternodeAuthenticator Internode authentication backend. It implements org.apache.cassandra.auth.AllowAllInternodeAuthenticator to allows or disallow connections from peer nodes. +*/ +func (a *Client) FindConfigInternodeAuthenticator(params *FindConfigInternodeAuthenticatorParams) (*FindConfigInternodeAuthenticatorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInternodeAuthenticatorParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_internode_authenticator", + Method: "GET", + PathPattern: "/config/internode_authenticator", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInternodeAuthenticatorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInternodeAuthenticatorOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInternodeAuthenticatorDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInternodeCompression Controls whether traffic between nodes is compressed. The valid values are: + + all: All traffic is compressed. + dc : Traffic between data centers is compressed. + none : No compression. +*/ +func (a *Client) FindConfigInternodeCompression(params *FindConfigInternodeCompressionParams) (*FindConfigInternodeCompressionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInternodeCompressionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_internode_compression", + Method: "GET", + PathPattern: "/config/internode_compression", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInternodeCompressionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInternodeCompressionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInternodeCompressionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInternodeRecvBuffSizeInBytes Sets the receiving socket buffer size in bytes for inter-node calls. +*/ +func (a *Client) FindConfigInternodeRecvBuffSizeInBytes(params *FindConfigInternodeRecvBuffSizeInBytesParams) (*FindConfigInternodeRecvBuffSizeInBytesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInternodeRecvBuffSizeInBytesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_internode_recv_buff_size_in_bytes", + Method: "GET", + PathPattern: "/config/internode_recv_buff_size_in_bytes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInternodeRecvBuffSizeInBytesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInternodeRecvBuffSizeInBytesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInternodeRecvBuffSizeInBytesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigInternodeSendBuffSizeInBytes Sets the sending socket buffer size in bytes for inter-node calls. +When setting this parameter and internode_recv_buff_size_in_bytes, the buffer size is limited by net.core.wmem_max. When unset, buffer size is defined by net.ipv4.tcp_wmem. See man tcp and: + + /proc/sys/net/core/wmem_max + /proc/sys/net/core/rmem_max + /proc/sys/net/ipv4/tcp_wmem + /proc/sys/net/ipv4/tcp_wmem + +*/ +func (a *Client) FindConfigInternodeSendBuffSizeInBytes(params *FindConfigInternodeSendBuffSizeInBytesParams) (*FindConfigInternodeSendBuffSizeInBytesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigInternodeSendBuffSizeInBytesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_internode_send_buff_size_in_bytes", + Method: "GET", + PathPattern: "/config/internode_send_buff_size_in_bytes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigInternodeSendBuffSizeInBytesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigInternodeSendBuffSizeInBytesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigInternodeSendBuffSizeInBytesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigJoinRing When set to true, a node will join the token ring. When set to false, a node will not join the token ring. User can use nodetool join to initiate ring joinging later. Same as -Dcassandra.join_ring in cassandra. +*/ +func (a *Client) FindConfigJoinRing(params *FindConfigJoinRingParams) (*FindConfigJoinRingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigJoinRingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_join_ring", + Method: "GET", + PathPattern: "/config/join_ring", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigJoinRingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigJoinRingOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigJoinRingDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigKeyCacheKeysToSave Number of keys from the key cache to save. (0: all) +*/ +func (a *Client) FindConfigKeyCacheKeysToSave(params *FindConfigKeyCacheKeysToSaveParams) (*FindConfigKeyCacheKeysToSaveOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigKeyCacheKeysToSaveParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_key_cache_keys_to_save", + Method: "GET", + PathPattern: "/config/key_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigKeyCacheKeysToSaveReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigKeyCacheKeysToSaveOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigKeyCacheKeysToSaveDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigKeyCacheSavePeriod Duration in seconds that keys are saved in cache. Caches are saved to saved_caches_directory. Saved caches greatly improve cold-start speeds and has relatively little effect on I/O. +*/ +func (a *Client) FindConfigKeyCacheSavePeriod(params *FindConfigKeyCacheSavePeriodParams) (*FindConfigKeyCacheSavePeriodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigKeyCacheSavePeriodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_key_cache_save_period", + Method: "GET", + PathPattern: "/config/key_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigKeyCacheSavePeriodReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigKeyCacheSavePeriodOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigKeyCacheSavePeriodDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigKeyCacheSizeInMb A global cache setting for tables. It is the maximum size of the key cache in memory. To disable set to 0. +Related information: nodetool setcachecapacity. +*/ +func (a *Client) FindConfigKeyCacheSizeInMb(params *FindConfigKeyCacheSizeInMbParams) (*FindConfigKeyCacheSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigKeyCacheSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_key_cache_size_in_mb", + Method: "GET", + PathPattern: "/config/key_cache_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigKeyCacheSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigKeyCacheSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigKeyCacheSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLargeMemoryAllocationWarningThreshold Warn about memory allocations above this size; set to zero to disable +*/ +func (a *Client) FindConfigLargeMemoryAllocationWarningThreshold(params *FindConfigLargeMemoryAllocationWarningThresholdParams) (*FindConfigLargeMemoryAllocationWarningThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLargeMemoryAllocationWarningThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_large_memory_allocation_warning_threshold", + Method: "GET", + PathPattern: "/config/large_memory_allocation_warning_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLargeMemoryAllocationWarningThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLargeMemoryAllocationWarningThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLargeMemoryAllocationWarningThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigListenAddress The IP address or hostname that Scylla binds to for connecting to other Scylla nodes. Set this parameter or listen_interface, not both. You must change the default setting for multiple nodes to communicate: + +Generally set to empty. If the node is properly configured (host name, name resolution, and so on), Scylla uses InetAddress.getLocalHost() to get the local address from the system. +For a single node cluster, you can use the default setting (localhost). +If Scylla can't find the correct address, you must specify the IP address or host name. +Never specify 0.0.0.0; it is always wrong. +*/ +func (a *Client) FindConfigListenAddress(params *FindConfigListenAddressParams) (*FindConfigListenAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigListenAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_listen_address", + Method: "GET", + PathPattern: "/config/listen_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigListenAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigListenAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigListenAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigListenInterface The interface that Scylla binds to for connecting to other Scylla nodes. Interfaces must correspond to a single address, IP aliasing is not supported. See listen_address. +*/ +func (a *Client) FindConfigListenInterface(params *FindConfigListenInterfaceParams) (*FindConfigListenInterfaceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigListenInterfaceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_listen_interface", + Method: "GET", + PathPattern: "/config/listen_interface", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigListenInterfaceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigListenInterfaceOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigListenInterfaceDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigListenOnBroadcastAddress When using multiple physical network interfaces, set this to true to listen on broadcast_address in addition to the listen_address, allowing nodes to communicate in both interfaces. Ignore this property if the network configuration automatically routes between the public and private networks such as EC2. +*/ +func (a *Client) FindConfigListenOnBroadcastAddress(params *FindConfigListenOnBroadcastAddressParams) (*FindConfigListenOnBroadcastAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigListenOnBroadcastAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_listen_on_broadcast_address", + Method: "GET", + PathPattern: "/config/listen_on_broadcast_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigListenOnBroadcastAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigListenOnBroadcastAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigListenOnBroadcastAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLoadBalance CQL request load balancing: 'none' or round-robin' +*/ +func (a *Client) FindConfigLoadBalance(params *FindConfigLoadBalanceParams) (*FindConfigLoadBalanceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLoadBalanceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_load_balance", + Method: "GET", + PathPattern: "/config/load_balance", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLoadBalanceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLoadBalanceOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLoadBalanceDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLoadRingState When set to true, load tokens and host_ids previously saved. Same as -Dcassandra.load_ring_state in cassandra. +*/ +func (a *Client) FindConfigLoadRingState(params *FindConfigLoadRingStateParams) (*FindConfigLoadRingStateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLoadRingStateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_load_ring_state", + Method: "GET", + PathPattern: "/config/load_ring_state", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLoadRingStateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLoadRingStateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLoadRingStateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLogToStdout find config log to stdout API +*/ +func (a *Client) FindConfigLogToStdout(params *FindConfigLogToStdoutParams) (*FindConfigLogToStdoutOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLogToStdoutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_log_to_stdout", + Method: "GET", + PathPattern: "/config/log_to_stdout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLogToStdoutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLogToStdoutOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLogToStdoutDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLogToSyslog find config log to syslog API +*/ +func (a *Client) FindConfigLogToSyslog(params *FindConfigLogToSyslogParams) (*FindConfigLogToSyslogOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLogToSyslogParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_log_to_syslog", + Method: "GET", + PathPattern: "/config/log_to_syslog", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLogToSyslogReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLogToSyslogOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLogToSyslogDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLoggerLogLevel find config logger log level API +*/ +func (a *Client) FindConfigLoggerLogLevel(params *FindConfigLoggerLogLevelParams) (*FindConfigLoggerLogLevelOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLoggerLogLevelParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_logger_log_level", + Method: "GET", + PathPattern: "/config/logger_log_level", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLoggerLogLevelReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLoggerLogLevelOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLoggerLogLevelDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigLsaReclamationStep Minimum number of segments to reclaim in a single step +*/ +func (a *Client) FindConfigLsaReclamationStep(params *FindConfigLsaReclamationStepParams) (*FindConfigLsaReclamationStepOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigLsaReclamationStepParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_lsa_reclamation_step", + Method: "GET", + PathPattern: "/config/lsa_reclamation_step", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigLsaReclamationStepReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigLsaReclamationStepOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigLsaReclamationStepDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMaxHintWindowInMs Maximum amount of time that hints are generates hints for an unresponsive node. After this interval, new hints are no longer generated until the node is back up and responsive. If the node goes down again, a new interval begins. This setting can prevent a sudden demand for resources when a node is brought back online and the rest of the cluster attempts to replay a large volume of hinted writes. +Related information: Failure detection and recovery +*/ +func (a *Client) FindConfigMaxHintWindowInMs(params *FindConfigMaxHintWindowInMsParams) (*FindConfigMaxHintWindowInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMaxHintWindowInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_max_hint_window_in_ms", + Method: "GET", + PathPattern: "/config/max_hint_window_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMaxHintWindowInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMaxHintWindowInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMaxHintWindowInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMaxHintsDeliveryThreads Number of threads with which to deliver hints. In multiple data-center deployments, consider increasing this number because cross data-center handoff is generally slower. +*/ +func (a *Client) FindConfigMaxHintsDeliveryThreads(params *FindConfigMaxHintsDeliveryThreadsParams) (*FindConfigMaxHintsDeliveryThreadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMaxHintsDeliveryThreadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_max_hints_delivery_threads", + Method: "GET", + PathPattern: "/config/max_hints_delivery_threads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMaxHintsDeliveryThreadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMaxHintsDeliveryThreadsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMaxHintsDeliveryThreadsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemoryAllocator The off-heap memory allocator. In addition to caches, this property affects storage engine meta data. Supported values: + NativeAllocator + JEMallocAllocator + +Experiments show that jemalloc saves some memory compared to the native allocator because it is more fragmentation resistant. To use, install jemalloc as a library and modify cassandra-env.sh (instructions in file). +*/ +func (a *Client) FindConfigMemoryAllocator(params *FindConfigMemoryAllocatorParams) (*FindConfigMemoryAllocatorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemoryAllocatorParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memory_allocator", + Method: "GET", + PathPattern: "/config/memory_allocator", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemoryAllocatorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemoryAllocatorOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemoryAllocatorDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableAllocationType Specify the way Cassandra allocates and manages memtable memory. See Off-heap memtables in Cassandra 2.1. Options are: + heap_buffers On heap NIO (non-blocking I/O) buffers. + offheap_buffers Off heap (direct) NIO buffers. + offheap_objects Native memory, eliminating NIO buffer heap overhead. +*/ +func (a *Client) FindConfigMemtableAllocationType(params *FindConfigMemtableAllocationTypeParams) (*FindConfigMemtableAllocationTypeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableAllocationTypeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_allocation_type", + Method: "GET", + PathPattern: "/config/memtable_allocation_type", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableAllocationTypeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableAllocationTypeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableAllocationTypeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableCleanupThreshold Ratio of occupied non-flushing memtable size to total permitted size for triggering a flush of the largest memtable. Larger values mean larger flushes and less compaction, but also less concurrent flush activity, which can make it difficult to keep your disks saturated under heavy write load. +*/ +func (a *Client) FindConfigMemtableCleanupThreshold(params *FindConfigMemtableCleanupThresholdParams) (*FindConfigMemtableCleanupThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableCleanupThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_cleanup_threshold", + Method: "GET", + PathPattern: "/config/memtable_cleanup_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableCleanupThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableCleanupThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableCleanupThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableFlushQueueSize The number of full memtables to allow pending flush (memtables waiting for a write thread). At a minimum, set to the maximum number of indexes created on a single table. +Related information: Flushing data from the memtable +*/ +func (a *Client) FindConfigMemtableFlushQueueSize(params *FindConfigMemtableFlushQueueSizeParams) (*FindConfigMemtableFlushQueueSizeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableFlushQueueSizeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_flush_queue_size", + Method: "GET", + PathPattern: "/config/memtable_flush_queue_size", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableFlushQueueSizeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableFlushQueueSizeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableFlushQueueSizeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableFlushStaticShares If set to higher than 0, ignore the controller's output and set the memtable shares statically. Do not set this unless you know what you are doing and suspect a problem in the controller. This option will be retired when the controller reaches more maturity +*/ +func (a *Client) FindConfigMemtableFlushStaticShares(params *FindConfigMemtableFlushStaticSharesParams) (*FindConfigMemtableFlushStaticSharesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableFlushStaticSharesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_flush_static_shares", + Method: "GET", + PathPattern: "/config/memtable_flush_static_shares", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableFlushStaticSharesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableFlushStaticSharesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableFlushStaticSharesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableFlushWriters Sets the number of memtable flush writer threads. These threads are blocked by disk I/O, and each one holds a memtable in memory while blocked. If you have a large Java heap size and many data directories, you can increase the value for better flush performance. +*/ +func (a *Client) FindConfigMemtableFlushWriters(params *FindConfigMemtableFlushWritersParams) (*FindConfigMemtableFlushWritersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableFlushWritersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_flush_writers", + Method: "GET", + PathPattern: "/config/memtable_flush_writers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableFlushWritersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableFlushWritersOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableFlushWritersDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableHeapSpaceInMb Total permitted memory to use for memtables. Triggers a flush based on memtable_cleanup_threshold. Cassandra stops accepting writes when the limit is exceeded until a flush completes. If unset, sets to default. +*/ +func (a *Client) FindConfigMemtableHeapSpaceInMb(params *FindConfigMemtableHeapSpaceInMbParams) (*FindConfigMemtableHeapSpaceInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableHeapSpaceInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_heap_space_in_mb", + Method: "GET", + PathPattern: "/config/memtable_heap_space_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableHeapSpaceInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableHeapSpaceInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableHeapSpaceInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableOffheapSpaceInMb See memtable_heap_space_in_mb +*/ +func (a *Client) FindConfigMemtableOffheapSpaceInMb(params *FindConfigMemtableOffheapSpaceInMbParams) (*FindConfigMemtableOffheapSpaceInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableOffheapSpaceInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_offheap_space_in_mb", + Method: "GET", + PathPattern: "/config/memtable_offheap_space_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableOffheapSpaceInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableOffheapSpaceInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableOffheapSpaceInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMemtableTotalSpaceInMb Specifies the total memory used for all memtables on a node. This replaces the per-table storage settings memtable_operations_in_millions and memtable_throughput_in_mb. +*/ +func (a *Client) FindConfigMemtableTotalSpaceInMb(params *FindConfigMemtableTotalSpaceInMbParams) (*FindConfigMemtableTotalSpaceInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMemtableTotalSpaceInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_memtable_total_space_in_mb", + Method: "GET", + PathPattern: "/config/memtable_total_space_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMemtableTotalSpaceInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMemtableTotalSpaceInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMemtableTotalSpaceInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigMurmur3PartitionerIgnoreMsbBits Number of most siginificant token bits to ignore in murmur3 partitioner; increase for very large clusters +*/ +func (a *Client) FindConfigMurmur3PartitionerIgnoreMsbBits(params *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) (*FindConfigMurmur3PartitionerIgnoreMsbBitsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigMurmur3PartitionerIgnoreMsbBitsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_murmur3_partitioner_ignore_msb_bits", + Method: "GET", + PathPattern: "/config/murmur3_partitioner_ignore_msb_bits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigMurmur3PartitionerIgnoreMsbBitsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigMurmur3PartitionerIgnoreMsbBitsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigMurmur3PartitionerIgnoreMsbBitsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigNativeTransportMaxFrameSizeInMb The maximum size of allowed frame. Frame (requests) larger than this are rejected as invalid. +*/ +func (a *Client) FindConfigNativeTransportMaxFrameSizeInMb(params *FindConfigNativeTransportMaxFrameSizeInMbParams) (*FindConfigNativeTransportMaxFrameSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigNativeTransportMaxFrameSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_native_transport_max_frame_size_in_mb", + Method: "GET", + PathPattern: "/config/native_transport_max_frame_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigNativeTransportMaxFrameSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigNativeTransportMaxFrameSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigNativeTransportMaxFrameSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigNativeTransportMaxThreads The maximum number of thread handling requests. The meaning is the same as rpc_max_threads. +Default is different (128 versus unlimited). +No corresponding native_transport_min_threads. +Idle threads are stopped after 30 seconds. + +*/ +func (a *Client) FindConfigNativeTransportMaxThreads(params *FindConfigNativeTransportMaxThreadsParams) (*FindConfigNativeTransportMaxThreadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigNativeTransportMaxThreadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_native_transport_max_threads", + Method: "GET", + PathPattern: "/config/native_transport_max_threads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigNativeTransportMaxThreadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigNativeTransportMaxThreadsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigNativeTransportMaxThreadsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigNativeTransportPort Port on which the CQL native transport listens for clients. +*/ +func (a *Client) FindConfigNativeTransportPort(params *FindConfigNativeTransportPortParams) (*FindConfigNativeTransportPortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigNativeTransportPortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_native_transport_port", + Method: "GET", + PathPattern: "/config/native_transport_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigNativeTransportPortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigNativeTransportPortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigNativeTransportPortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigNativeTransportPortSsl Port on which the CQL TLS native transport listens for clients.Enabling client encryption and keeping native_transport_port_ssl disabled will use encryptionfor native_transport_port. Setting native_transport_port_ssl to a different valuefrom native_transport_port will use encryption for native_transport_port_ssl whilekeeping native_transport_port unencrypted +*/ +func (a *Client) FindConfigNativeTransportPortSsl(params *FindConfigNativeTransportPortSslParams) (*FindConfigNativeTransportPortSslOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigNativeTransportPortSslParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_native_transport_port_ssl", + Method: "GET", + PathPattern: "/config/native_transport_port_ssl", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigNativeTransportPortSslReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigNativeTransportPortSslOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigNativeTransportPortSslDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigNumTokens Defines the number of tokens randomly assigned to this node on the ring when using virtual nodes (vnodes). The more tokens, relative to other nodes, the larger the proportion of data that the node stores. Generally all nodes should have the same number of tokens assuming equal hardware capability. The recommended value is 256. If unspecified (#num_tokens), Scylla uses 1 (equivalent to #num_tokens : 1) for legacy compatibility and uses the initial_token setting. +If not using vnodes, comment #num_tokens : 256 or set num_tokens : 1 and use initial_token. If you already have an existing cluster with one token per node and wish to migrate to vnodes, see Enabling virtual nodes on an existing production cluster. +Note: If using DataStax Enterprise, the default setting of this property depends on the type of node and type of install. +*/ +func (a *Client) FindConfigNumTokens(params *FindConfigNumTokensParams) (*FindConfigNumTokensOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigNumTokensParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_num_tokens", + Method: "GET", + PathPattern: "/config/num_tokens", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigNumTokensReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigNumTokensOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigNumTokensDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigOverrideDecommission Set true to force a decommissioned node to join the cluster +*/ +func (a *Client) FindConfigOverrideDecommission(params *FindConfigOverrideDecommissionParams) (*FindConfigOverrideDecommissionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigOverrideDecommissionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_override_decommission", + Method: "GET", + PathPattern: "/config/override_decommission", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigOverrideDecommissionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigOverrideDecommissionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigOverrideDecommissionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPartitioner Distributes rows (by partition key) across all nodes in the cluster. Any IPartitioner may be used, including your own as long as it is in the class path. For new clusters use the default partitioner. +Scylla provides the following partitioners for backwards compatibility: + + RandomPartitioner + ByteOrderedPartitioner + OrderPreservingPartitioner (deprecated) + +Related information: Partitioners +*/ +func (a *Client) FindConfigPartitioner(params *FindConfigPartitionerParams) (*FindConfigPartitionerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPartitionerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_partitioner", + Method: "GET", + PathPattern: "/config/partitioner", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPartitionerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPartitionerOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPartitionerDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPermissionsCacheMaxEntries Maximum cached permission entries. Must have a non-zero value if permissions caching is enabled (see a permissions_validity_in_ms description). +*/ +func (a *Client) FindConfigPermissionsCacheMaxEntries(params *FindConfigPermissionsCacheMaxEntriesParams) (*FindConfigPermissionsCacheMaxEntriesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPermissionsCacheMaxEntriesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_permissions_cache_max_entries", + Method: "GET", + PathPattern: "/config/permissions_cache_max_entries", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPermissionsCacheMaxEntriesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPermissionsCacheMaxEntriesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPermissionsCacheMaxEntriesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPermissionsUpdateIntervalInMs Refresh interval for permissions cache (if enabled). After this interval, cache entries become eligible for refresh. An async reload is scheduled every permissions_update_interval_in_ms time period and the old value is returned until it completes. If permissions_validity_in_ms has a non-zero value, then this property must also have a non-zero value. It's recommended to set this value to be at least 3 times smaller than the permissions_validity_in_ms. +*/ +func (a *Client) FindConfigPermissionsUpdateIntervalInMs(params *FindConfigPermissionsUpdateIntervalInMsParams) (*FindConfigPermissionsUpdateIntervalInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPermissionsUpdateIntervalInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_permissions_update_interval_in_ms", + Method: "GET", + PathPattern: "/config/permissions_update_interval_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPermissionsUpdateIntervalInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPermissionsUpdateIntervalInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPermissionsUpdateIntervalInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPermissionsValidityInMs How long permissions in cache remain valid. Depending on the authorizer, such as CassandraAuthorizer, fetching permissions can be resource intensive. Permissions caching is disabled when this property is set to 0 or when AllowAllAuthorizer is used. The cached value is considered valid as long as both its value is not older than the permissions_validity_in_ms and the cached value has been read at least once during the permissions_validity_in_ms time frame. If any of these two conditions doesn't hold the cached value is going to be evicted from the cache. +Related information: Object permissions +*/ +func (a *Client) FindConfigPermissionsValidityInMs(params *FindConfigPermissionsValidityInMsParams) (*FindConfigPermissionsValidityInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPermissionsValidityInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_permissions_validity_in_ms", + Method: "GET", + PathPattern: "/config/permissions_validity_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPermissionsValidityInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPermissionsValidityInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPermissionsValidityInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPhiConvictThreshold Adjusts the sensitivity of the failure detector on an exponential scale. Generally this setting never needs adjusting. +Related information: Failure detection and recovery +*/ +func (a *Client) FindConfigPhiConvictThreshold(params *FindConfigPhiConvictThresholdParams) (*FindConfigPhiConvictThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPhiConvictThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_phi_convict_threshold", + Method: "GET", + PathPattern: "/config/phi_convict_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPhiConvictThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPhiConvictThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPhiConvictThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPreheatKernelPageCache Enable or disable kernel page cache preheating from contents of the key cache after compaction. When enabled it preheats only first page (4KB) of each row to optimize for sequential access. It can be harmful for fat rows, see CASSANDRA-4937 for more details. +*/ +func (a *Client) FindConfigPreheatKernelPageCache(params *FindConfigPreheatKernelPageCacheParams) (*FindConfigPreheatKernelPageCacheOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPreheatKernelPageCacheParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_preheat_kernel_page_cache", + Method: "GET", + PathPattern: "/config/preheat_kernel_page_cache", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPreheatKernelPageCacheReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPreheatKernelPageCacheOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPreheatKernelPageCacheDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPrometheusAddress Prometheus listening address +*/ +func (a *Client) FindConfigPrometheusAddress(params *FindConfigPrometheusAddressParams) (*FindConfigPrometheusAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPrometheusAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_prometheus_address", + Method: "GET", + PathPattern: "/config/prometheus_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPrometheusAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPrometheusAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPrometheusAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPrometheusPort Prometheus port, set to zero to disable +*/ +func (a *Client) FindConfigPrometheusPort(params *FindConfigPrometheusPortParams) (*FindConfigPrometheusPortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPrometheusPortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_prometheus_port", + Method: "GET", + PathPattern: "/config/prometheus_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPrometheusPortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPrometheusPortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPrometheusPortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigPrometheusPrefix Set the prefix of the exported Prometheus metrics. Changing this will break Scylla's dashboard compatibility, do not change unless you know what you are doing. +*/ +func (a *Client) FindConfigPrometheusPrefix(params *FindConfigPrometheusPrefixParams) (*FindConfigPrometheusPrefixOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigPrometheusPrefixParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_prometheus_prefix", + Method: "GET", + PathPattern: "/config/prometheus_prefix", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigPrometheusPrefixReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigPrometheusPrefixOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigPrometheusPrefixDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRangeRequestTimeoutInMs The time in milliseconds that the coordinator waits for sequential or index scans to complete. +*/ +func (a *Client) FindConfigRangeRequestTimeoutInMs(params *FindConfigRangeRequestTimeoutInMsParams) (*FindConfigRangeRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRangeRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_range_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/range_request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRangeRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRangeRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRangeRequestTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReadRequestTimeoutInMs The time that the coordinator waits for read operations to complete +*/ +func (a *Client) FindConfigReadRequestTimeoutInMs(params *FindConfigReadRequestTimeoutInMsParams) (*FindConfigReadRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReadRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_read_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/read_request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReadRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReadRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReadRequestTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReduceCacheCapacityTo Sets the size percentage to which maximum cache capacity is reduced when Java heap usage reaches the threshold defined by reduce_cache_sizes_at. Together with flush_largest_memtables_at, these properties constitute an emergency measure for preventing sudden out-of-memory (OOM) errors. +*/ +func (a *Client) FindConfigReduceCacheCapacityTo(params *FindConfigReduceCacheCapacityToParams) (*FindConfigReduceCacheCapacityToOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReduceCacheCapacityToParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_reduce_cache_capacity_to", + Method: "GET", + PathPattern: "/config/reduce_cache_capacity_to", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReduceCacheCapacityToReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReduceCacheCapacityToOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReduceCacheCapacityToDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReduceCacheSizesAt When Java heap usage (after a full concurrent mark sweep (CMS) garbage collection) exceeds this percentage, Cassandra reduces the cache capacity to the fraction of the current size as specified by reduce_cache_capacity_to. To disable, set the value to 1.0. +*/ +func (a *Client) FindConfigReduceCacheSizesAt(params *FindConfigReduceCacheSizesAtParams) (*FindConfigReduceCacheSizesAtOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReduceCacheSizesAtParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_reduce_cache_sizes_at", + Method: "GET", + PathPattern: "/config/reduce_cache_sizes_at", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReduceCacheSizesAtReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReduceCacheSizesAtOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReduceCacheSizesAtDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReplaceAddress The listen_address or broadcast_address of the dead node to replace. Same as -Dcassandra.replace_address. +*/ +func (a *Client) FindConfigReplaceAddress(params *FindConfigReplaceAddressParams) (*FindConfigReplaceAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReplaceAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_replace_address", + Method: "GET", + PathPattern: "/config/replace_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReplaceAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReplaceAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReplaceAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReplaceAddressFirstBoot Like replace_address option, but if the node has been bootstrapped successfully it will be ignored. Same as -Dcassandra.replace_address_first_boot. +*/ +func (a *Client) FindConfigReplaceAddressFirstBoot(params *FindConfigReplaceAddressFirstBootParams) (*FindConfigReplaceAddressFirstBootOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReplaceAddressFirstBootParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_replace_address_first_boot", + Method: "GET", + PathPattern: "/config/replace_address_first_boot", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReplaceAddressFirstBootReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReplaceAddressFirstBootOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReplaceAddressFirstBootDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReplaceNode The UUID of the node to replace. Same as -Dcassandra.replace_node in cssandra. +*/ +func (a *Client) FindConfigReplaceNode(params *FindConfigReplaceNodeParams) (*FindConfigReplaceNodeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReplaceNodeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_replace_node", + Method: "GET", + PathPattern: "/config/replace_node", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReplaceNodeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReplaceNodeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReplaceNodeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigReplaceToken The tokens of the node to replace. Same as -Dcassandra.replace_token in cassandra. +*/ +func (a *Client) FindConfigReplaceToken(params *FindConfigReplaceTokenParams) (*FindConfigReplaceTokenOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigReplaceTokenParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_replace_token", + Method: "GET", + PathPattern: "/config/replace_token", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigReplaceTokenReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigReplaceTokenOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigReplaceTokenDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRequestScheduler Defines a scheduler to handle incoming client requests according to a defined policy. This scheduler is useful for throttling client requests in single clusters containing multiple keyspaces. This parameter is specifically for requests from the client and does not affect inter-node communication. Valid values are: + + org.apache.cassandra.scheduler.NoScheduler No scheduling takes place. + org.apache.cassandra.scheduler.RoundRobinScheduler Round robin of client requests to a node with a separate queue for each request_scheduler_id property. + A Java class that implements the RequestScheduler interface. +*/ +func (a *Client) FindConfigRequestScheduler(params *FindConfigRequestSchedulerParams) (*FindConfigRequestSchedulerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRequestSchedulerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_request_scheduler", + Method: "GET", + PathPattern: "/config/request_scheduler", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRequestSchedulerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRequestSchedulerOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRequestSchedulerDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRequestSchedulerID An identifier on which to perform request scheduling. Currently the only valid value is keyspace. See weights. +*/ +func (a *Client) FindConfigRequestSchedulerID(params *FindConfigRequestSchedulerIDParams) (*FindConfigRequestSchedulerIDOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRequestSchedulerIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_request_scheduler_id", + Method: "GET", + PathPattern: "/config/request_scheduler_id", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRequestSchedulerIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRequestSchedulerIDOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRequestSchedulerIDDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRequestSchedulerOptions Contains a list of properties that define configuration options for request_scheduler: + + throttle_limit: The number of in-flight requests per client. Requests beyond this limit are queued up until running requests complete. Recommended value is ((concurrent_reads + concurrent_writes) × 2) + default_weight: (Default: 1 **) How many requests are handled during each turn of the RoundRobin. + weights: (Default: Keyspace: 1) Takes a list of keyspaces. It sets how many requests are handled during each turn of the RoundRobin, based on the request_scheduler_id. +*/ +func (a *Client) FindConfigRequestSchedulerOptions(params *FindConfigRequestSchedulerOptionsParams) (*FindConfigRequestSchedulerOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRequestSchedulerOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_request_scheduler_options", + Method: "GET", + PathPattern: "/config/request_scheduler_options", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRequestSchedulerOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRequestSchedulerOptionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRequestSchedulerOptionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRequestTimeoutInMs The default timeout for other, miscellaneous operations. +Related information: About hinted handoff writes +*/ +func (a *Client) FindConfigRequestTimeoutInMs(params *FindConfigRequestTimeoutInMsParams) (*FindConfigRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRequestTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRingDelayMs Time a node waits to hear from other nodes before joining the ring in milliseconds. Same as -Dcassandra.ring_delay_ms in cassandra. +*/ +func (a *Client) FindConfigRingDelayMs(params *FindConfigRingDelayMsParams) (*FindConfigRingDelayMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRingDelayMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_ring_delay_ms", + Method: "GET", + PathPattern: "/config/ring_delay_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRingDelayMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRingDelayMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRingDelayMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRoleManager The role-management backend, used to maintain grantts and memberships between roles. +The available role-managers are: + CassandraRoleManager : Stores role data in the system_auth keyspace. +*/ +func (a *Client) FindConfigRoleManager(params *FindConfigRoleManagerParams) (*FindConfigRoleManagerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRoleManagerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_role_manager", + Method: "GET", + PathPattern: "/config/role_manager", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRoleManagerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRoleManagerOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRoleManagerDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRowCacheKeysToSave Number of keys from the row cache to save. +*/ +func (a *Client) FindConfigRowCacheKeysToSave(params *FindConfigRowCacheKeysToSaveParams) (*FindConfigRowCacheKeysToSaveOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRowCacheKeysToSaveParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_row_cache_keys_to_save", + Method: "GET", + PathPattern: "/config/row_cache_keys_to_save", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRowCacheKeysToSaveReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRowCacheKeysToSaveOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRowCacheKeysToSaveDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRowCacheSavePeriod Duration in seconds that rows are saved in cache. Caches are saved to saved_caches_directory. +*/ +func (a *Client) FindConfigRowCacheSavePeriod(params *FindConfigRowCacheSavePeriodParams) (*FindConfigRowCacheSavePeriodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRowCacheSavePeriodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_row_cache_save_period", + Method: "GET", + PathPattern: "/config/row_cache_save_period", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRowCacheSavePeriodReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRowCacheSavePeriodOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRowCacheSavePeriodDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRowCacheSizeInMb Maximum size of the row cache in memory. Row cache can save more time than key_cache_size_in_mb, but is space-intensive because it contains the entire row. Use the row cache only for hot rows or static rows. If you reduce the size, you may not get you hottest keys loaded on start up. +*/ +func (a *Client) FindConfigRowCacheSizeInMb(params *FindConfigRowCacheSizeInMbParams) (*FindConfigRowCacheSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRowCacheSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_row_cache_size_in_mb", + Method: "GET", + PathPattern: "/config/row_cache_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRowCacheSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRowCacheSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRowCacheSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCAddress The listen address for client connections (Thrift RPC service and native transport).Valid values are: + + unset: Resolves the address using the hostname configuration of the node. If left unset, the hostname must resolve to the IP address of this node using /etc/hostname, /etc/hosts, or DNS. + 0.0.0.0 : Listens on all configured interfaces, but you must set the broadcast_rpc_address to a value other than 0.0.0.0. + IP address + hostname +Related information: Network + +*/ +func (a *Client) FindConfigRPCAddress(params *FindConfigRPCAddressParams) (*FindConfigRPCAddressOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_address", + Method: "GET", + PathPattern: "/config/rpc_address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCAddressOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCAddressDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCInterface The listen address for client connections. Interfaces must correspond to a single address, IP aliasing is not supported. See rpc_address. +*/ +func (a *Client) FindConfigRPCInterface(params *FindConfigRPCInterfaceParams) (*FindConfigRPCInterfaceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCInterfaceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_interface", + Method: "GET", + PathPattern: "/config/rpc_interface", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCInterfaceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCInterfaceOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCInterfaceDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCKeepalive Enable or disable keepalive on client connections (RPC or native). +*/ +func (a *Client) FindConfigRPCKeepalive(params *FindConfigRPCKeepaliveParams) (*FindConfigRPCKeepaliveOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCKeepaliveParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_keepalive", + Method: "GET", + PathPattern: "/config/rpc_keepalive", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCKeepaliveReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCKeepaliveOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCKeepaliveDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCMaxThreads Regardless of your choice of RPC server (rpc_server_type), the number of maximum requests in the RPC thread pool dictates how many concurrent requests are possible. However, if you are using the parameter sync in the rpc_server_type, it also dictates the number of clients that can be connected. For a large number of client connections, this could cause excessive memory usage for the thread stack. Connection pooling on the client side is highly recommended. Setting a maximum thread pool size acts as a safeguard against misbehaved clients. If the maximum is reached, Cassandra blocks additional connections until a client disconnects. +*/ +func (a *Client) FindConfigRPCMaxThreads(params *FindConfigRPCMaxThreadsParams) (*FindConfigRPCMaxThreadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCMaxThreadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_max_threads", + Method: "GET", + PathPattern: "/config/rpc_max_threads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCMaxThreadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCMaxThreadsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCMaxThreadsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCMinThreads Sets the minimum thread pool size for remote procedure calls. +*/ +func (a *Client) FindConfigRPCMinThreads(params *FindConfigRPCMinThreadsParams) (*FindConfigRPCMinThreadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCMinThreadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_min_threads", + Method: "GET", + PathPattern: "/config/rpc_min_threads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCMinThreadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCMinThreadsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCMinThreadsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCPort Thrift port for client connections. +*/ +func (a *Client) FindConfigRPCPort(params *FindConfigRPCPortParams) (*FindConfigRPCPortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCPortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_port", + Method: "GET", + PathPattern: "/config/rpc_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCPortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCPortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCPortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCRecvBuffSizeInBytes Sets the receiving socket buffer size for remote procedure calls. +*/ +func (a *Client) FindConfigRPCRecvBuffSizeInBytes(params *FindConfigRPCRecvBuffSizeInBytesParams) (*FindConfigRPCRecvBuffSizeInBytesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCRecvBuffSizeInBytesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_recv_buff_size_in_bytes", + Method: "GET", + PathPattern: "/config/rpc_recv_buff_size_in_bytes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCRecvBuffSizeInBytesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCRecvBuffSizeInBytesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCRecvBuffSizeInBytesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCSendBuffSizeInBytes Sets the sending socket buffer size in bytes for remote procedure calls. +*/ +func (a *Client) FindConfigRPCSendBuffSizeInBytes(params *FindConfigRPCSendBuffSizeInBytesParams) (*FindConfigRPCSendBuffSizeInBytesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCSendBuffSizeInBytesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_send_buff_size_in_bytes", + Method: "GET", + PathPattern: "/config/rpc_send_buff_size_in_bytes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCSendBuffSizeInBytesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCSendBuffSizeInBytesOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCSendBuffSizeInBytesDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigRPCServerType Cassandra provides three options for the RPC server. On Windows, sync is about 30% slower than hsha. On Linux, sync and hsha performance is about the same, but hsha uses less memory. + + sync (Default One thread per Thrift connection.) For a very large number of clients, memory is the limiting factor. On a 64-bit JVM, 180KB is the minimum stack size per thread and corresponds to your use of virtual memory. Physical memory may be limited depending on use of stack space. + hsh Half synchronous, half asynchronous. All Thrift clients are handled asynchronously using a small number of threads that does not vary with the number of clients and thus scales well to many clients. The RPC requests are synchronous (one thread per active request). + Note: When selecting this option, you must change the default value (unlimited) of rpc_max_threads. + Your own RPC server: You must provide a fully-qualified class name of an o.a.c.t.TServerFactory that can create a server instance. +*/ +func (a *Client) FindConfigRPCServerType(params *FindConfigRPCServerTypeParams) (*FindConfigRPCServerTypeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigRPCServerTypeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_rpc_server_type", + Method: "GET", + PathPattern: "/config/rpc_server_type", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigRPCServerTypeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigRPCServerTypeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigRPCServerTypeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSavedCachesDirectory The directory location where table key and row caches are stored. +*/ +func (a *Client) FindConfigSavedCachesDirectory(params *FindConfigSavedCachesDirectoryParams) (*FindConfigSavedCachesDirectoryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSavedCachesDirectoryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_saved_caches_directory", + Method: "GET", + PathPattern: "/config/saved_caches_directory", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSavedCachesDirectoryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSavedCachesDirectoryOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSavedCachesDirectoryDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSeedProvider The addresses of hosts deemed contact points. Scylla nodes use the -seeds list to find each other and learn the topology of the ring. + + class_name (Default: org.apache.cassandra.locator.SimpleSeedProvider) + The class within Scylla that handles the seed logic. It can be customized, but this is typically not required. + - seeds (Default: 127.0.0.1) A comma-delimited list of IP addresses used by gossip for bootstrapping new nodes joining a cluster. When running multiple nodes, you must change the list from the default value. In multiple data-center clusters, the seed list should include at least one node from each data center (replication group). More than a single seed node per data center is recommended for fault tolerance. Otherwise, gossip has to communicate with another data center when bootstrapping a node. Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance. Gossip optimization is not critical, but it is recommended to use a small seed list (approximately three nodes per data center). + +Related information: Initializing a multiple node cluster (single data center) and Initializing a multiple node cluster (multiple data centers). +*/ +func (a *Client) FindConfigSeedProvider(params *FindConfigSeedProviderParams) (*FindConfigSeedProviderOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSeedProviderParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_seed_provider", + Method: "GET", + PathPattern: "/config/seed_provider", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSeedProviderReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSeedProviderOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSeedProviderDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigServerEncryptionOptions Enable or disable inter-node encryption. You must also generate keys and provide the appropriate key and trust store locations and passwords. No custom encryption options are currently enabled. The available options are: + +internode_encryption : (Default: none ) Enable or disable encryption of inter-node communication using the TLS_RSA_WITH_AES_128_CBC_SHA cipher suite for authentication, key exchange, and encryption of data transfers. The available inter-node options are: + all : Encrypt all inter-node communications. + none : No encryption. + dc : Encrypt the traffic between the data centers (server only). + rack : Encrypt the traffic between the racks(server only). +certificate : (Default: conf/scylla.crt) The location of a PEM-encoded x509 certificate used to identify and encrypt the internode communication. +keyfile : (Default: conf/scylla.key) PEM Key file associated with certificate. +truststore : (Default: ) Location of the truststore containing the trusted certificate for authenticating remote servers. + +The advanced settings are: + + priority_string : GnuTLS priority string controlling TLS algorithms used/allowed. + require_client_auth : (Default: false ) Enables or disables certificate authentication. +Related information: Node-to-node encryption +*/ +func (a *Client) FindConfigServerEncryptionOptions(params *FindConfigServerEncryptionOptionsParams) (*FindConfigServerEncryptionOptionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigServerEncryptionOptionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_server_encryption_options", + Method: "GET", + PathPattern: "/config/server_encryption_options", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigServerEncryptionOptionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigServerEncryptionOptionsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigServerEncryptionOptionsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigShadowRoundMs The maximum gossip shadow round time. Can be used to reduce the gossip feature check time during node boot up. +*/ +func (a *Client) FindConfigShadowRoundMs(params *FindConfigShadowRoundMsParams) (*FindConfigShadowRoundMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigShadowRoundMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_shadow_round_ms", + Method: "GET", + PathPattern: "/config/shadow_round_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigShadowRoundMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigShadowRoundMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigShadowRoundMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigShutdownAnnounceInMs Time a node waits after sending gossip shutdown message in milliseconds. Same as -Dcassandra.shutdown_announce_in_ms in cassandra. +*/ +func (a *Client) FindConfigShutdownAnnounceInMs(params *FindConfigShutdownAnnounceInMsParams) (*FindConfigShutdownAnnounceInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigShutdownAnnounceInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_shutdown_announce_in_ms", + Method: "GET", + PathPattern: "/config/shutdown_announce_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigShutdownAnnounceInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigShutdownAnnounceInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigShutdownAnnounceInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSkipWaitForGossipToSettle An integer to configure the wait for gossip to settle. -1: wait normally, 0: do not wait at all, n: wait for at most n polls. Same as -Dcassandra.skip_wait_for_gossip_to_settle in cassandra. +*/ +func (a *Client) FindConfigSkipWaitForGossipToSettle(params *FindConfigSkipWaitForGossipToSettleParams) (*FindConfigSkipWaitForGossipToSettleOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSkipWaitForGossipToSettleParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_skip_wait_for_gossip_to_settle", + Method: "GET", + PathPattern: "/config/skip_wait_for_gossip_to_settle", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSkipWaitForGossipToSettleReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSkipWaitForGossipToSettleOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSkipWaitForGossipToSettleDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSnapshotBeforeCompaction Enable or disable taking a snapshot before each compaction. This option is useful to back up data when there is a data format change. Be careful using this option because Cassandra does not clean up older snapshots automatically. +Related information: Configuring compaction +*/ +func (a *Client) FindConfigSnapshotBeforeCompaction(params *FindConfigSnapshotBeforeCompactionParams) (*FindConfigSnapshotBeforeCompactionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSnapshotBeforeCompactionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_snapshot_before_compaction", + Method: "GET", + PathPattern: "/config/snapshot_before_compaction", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSnapshotBeforeCompactionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSnapshotBeforeCompactionOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSnapshotBeforeCompactionDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSslStoragePort The SSL port for encrypted communication. Unused unless enabled in encryption_options. +*/ +func (a *Client) FindConfigSslStoragePort(params *FindConfigSslStoragePortParams) (*FindConfigSslStoragePortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSslStoragePortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_ssl_storage_port", + Method: "GET", + PathPattern: "/config/ssl_storage_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSslStoragePortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSslStoragePortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSslStoragePortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSstablePreemptiveOpenIntervalInMb When compacting, the replacement opens SSTables before they are completely written and uses in place of the prior SSTables for any range previously written. This setting helps to smoothly transfer reads between the SSTables by reducing page cache churn and keeps hot rows hot. +*/ +func (a *Client) FindConfigSstablePreemptiveOpenIntervalInMb(params *FindConfigSstablePreemptiveOpenIntervalInMbParams) (*FindConfigSstablePreemptiveOpenIntervalInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSstablePreemptiveOpenIntervalInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_sstable_preemptive_open_interval_in_mb", + Method: "GET", + PathPattern: "/config/sstable_preemptive_open_interval_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSstablePreemptiveOpenIntervalInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSstablePreemptiveOpenIntervalInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSstablePreemptiveOpenIntervalInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigSstableSummaryRatio Enforces that 1 byte of summary is written for every N (2000 by default) bytes written to data file. Value must be between 0 and 1. +*/ +func (a *Client) FindConfigSstableSummaryRatio(params *FindConfigSstableSummaryRatioParams) (*FindConfigSstableSummaryRatioOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigSstableSummaryRatioParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_sstable_summary_ratio", + Method: "GET", + PathPattern: "/config/sstable_summary_ratio", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigSstableSummaryRatioReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigSstableSummaryRatioOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigSstableSummaryRatioDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigStartNativeTransport Enable or disable the native transport server. Uses the same address as the rpc_address, but the port is different from the rpc_port. See native_transport_port. +*/ +func (a *Client) FindConfigStartNativeTransport(params *FindConfigStartNativeTransportParams) (*FindConfigStartNativeTransportOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigStartNativeTransportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_start_native_transport", + Method: "GET", + PathPattern: "/config/start_native_transport", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigStartNativeTransportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigStartNativeTransportOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigStartNativeTransportDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigStartRPC Starts the Thrift RPC server +*/ +func (a *Client) FindConfigStartRPC(params *FindConfigStartRPCParams) (*FindConfigStartRPCOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigStartRPCParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_start_rpc", + Method: "GET", + PathPattern: "/config/start_rpc", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigStartRPCReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigStartRPCOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigStartRPCDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigStoragePort The port for inter-node communication. +*/ +func (a *Client) FindConfigStoragePort(params *FindConfigStoragePortParams) (*FindConfigStoragePortOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigStoragePortParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_storage_port", + Method: "GET", + PathPattern: "/config/storage_port", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigStoragePortReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigStoragePortOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigStoragePortDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigStreamThroughputOutboundMegabitsPerSec Throttles all outbound streaming file transfers on a node to the specified throughput. Cassandra does mostly sequential I/O when streaming data during bootstrap or repair, which can lead to saturating the network connection and degrading client (RPC) performance. +*/ +func (a *Client) FindConfigStreamThroughputOutboundMegabitsPerSec(params *FindConfigStreamThroughputOutboundMegabitsPerSecParams) (*FindConfigStreamThroughputOutboundMegabitsPerSecOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigStreamThroughputOutboundMegabitsPerSecParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_stream_throughput_outbound_megabits_per_sec", + Method: "GET", + PathPattern: "/config/stream_throughput_outbound_megabits_per_sec", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigStreamThroughputOutboundMegabitsPerSecReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigStreamThroughputOutboundMegabitsPerSecOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigStreamThroughputOutboundMegabitsPerSecDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigStreamingSocketTimeoutInMs Enable or disable socket timeout for streaming operations. When a timeout occurs during streaming, streaming is retried from the start of the current file. Avoid setting this value too low, as it can result in a significant amount of data re-streaming. +*/ +func (a *Client) FindConfigStreamingSocketTimeoutInMs(params *FindConfigStreamingSocketTimeoutInMsParams) (*FindConfigStreamingSocketTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigStreamingSocketTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_streaming_socket_timeout_in_ms", + Method: "GET", + PathPattern: "/config/streaming_socket_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigStreamingSocketTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigStreamingSocketTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigStreamingSocketTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigThriftFramedTransportSizeInMb Frame size (maximum field length) for Thrift. The frame is the row or part of the row the application is inserting. +*/ +func (a *Client) FindConfigThriftFramedTransportSizeInMb(params *FindConfigThriftFramedTransportSizeInMbParams) (*FindConfigThriftFramedTransportSizeInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigThriftFramedTransportSizeInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_thrift_framed_transport_size_in_mb", + Method: "GET", + PathPattern: "/config/thrift_framed_transport_size_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigThriftFramedTransportSizeInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigThriftFramedTransportSizeInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigThriftFramedTransportSizeInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigThriftMaxMessageLengthInMb The maximum length of a Thrift message in megabytes, including all fields and internal Thrift overhead (1 byte of overhead for each frame). Message length is usually used in conjunction with batches. A frame length greater than or equal to 24 accommodates a batch with four inserts, each of which is 24 bytes. The required message length is greater than or equal to 24+24+24+24+4 (number of frames). +*/ +func (a *Client) FindConfigThriftMaxMessageLengthInMb(params *FindConfigThriftMaxMessageLengthInMbParams) (*FindConfigThriftMaxMessageLengthInMbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigThriftMaxMessageLengthInMbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_thrift_max_message_length_in_mb", + Method: "GET", + PathPattern: "/config/thrift_max_message_length_in_mb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigThriftMaxMessageLengthInMbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigThriftMaxMessageLengthInMbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigThriftMaxMessageLengthInMbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigTombstoneFailureThreshold The maximum number of tombstones a query can scan before aborting. +*/ +func (a *Client) FindConfigTombstoneFailureThreshold(params *FindConfigTombstoneFailureThresholdParams) (*FindConfigTombstoneFailureThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigTombstoneFailureThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_tombstone_failure_threshold", + Method: "GET", + PathPattern: "/config/tombstone_failure_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigTombstoneFailureThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigTombstoneFailureThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigTombstoneFailureThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigTombstoneWarnThreshold The maximum number of tombstones a query can scan before warning. +*/ +func (a *Client) FindConfigTombstoneWarnThreshold(params *FindConfigTombstoneWarnThresholdParams) (*FindConfigTombstoneWarnThresholdOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigTombstoneWarnThresholdParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_tombstone_warn_threshold", + Method: "GET", + PathPattern: "/config/tombstone_warn_threshold", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigTombstoneWarnThresholdReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigTombstoneWarnThresholdOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigTombstoneWarnThresholdDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigTrickleFsync When doing sequential writing, enabling this option tells fsync to force the operating system to flush the dirty buffers at a set interval trickle_fsync_interval_in_kb. Enable this parameter to avoid sudden dirty buffer flushing from impacting read latencies. Recommended to use on SSDs, but not on HDDs. +*/ +func (a *Client) FindConfigTrickleFsync(params *FindConfigTrickleFsyncParams) (*FindConfigTrickleFsyncOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigTrickleFsyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_trickle_fsync", + Method: "GET", + PathPattern: "/config/trickle_fsync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigTrickleFsyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigTrickleFsyncOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigTrickleFsyncDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigTrickleFsyncIntervalInKb Sets the size of the fsync in kilobytes. +*/ +func (a *Client) FindConfigTrickleFsyncIntervalInKb(params *FindConfigTrickleFsyncIntervalInKbParams) (*FindConfigTrickleFsyncIntervalInKbOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigTrickleFsyncIntervalInKbParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_trickle_fsync_interval_in_kb", + Method: "GET", + PathPattern: "/config/trickle_fsync_interval_in_kb", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigTrickleFsyncIntervalInKbReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigTrickleFsyncIntervalInKbOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigTrickleFsyncIntervalInKbDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigTruncateRequestTimeoutInMs The time that the coordinator waits for truncates (remove all data from a table) to complete. The long default value allows for a snapshot to be taken before removing the data. If auto_snapshot is disabled (not recommended), you can reduce this time. +*/ +func (a *Client) FindConfigTruncateRequestTimeoutInMs(params *FindConfigTruncateRequestTimeoutInMsParams) (*FindConfigTruncateRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigTruncateRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_truncate_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/truncate_request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigTruncateRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigTruncateRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigTruncateRequestTimeoutInMsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigViewBuilding Enable view building; should only be set to false when the node is experience issues due to view building +*/ +func (a *Client) FindConfigViewBuilding(params *FindConfigViewBuildingParams) (*FindConfigViewBuildingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigViewBuildingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_view_building", + Method: "GET", + PathPattern: "/config/view_building", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigViewBuildingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigViewBuildingOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigViewBuildingDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigViewHintsDirectory The directory where materialized-view updates are stored while a view replica is unreachable. +*/ +func (a *Client) FindConfigViewHintsDirectory(params *FindConfigViewHintsDirectoryParams) (*FindConfigViewHintsDirectoryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigViewHintsDirectoryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_view_hints_directory", + Method: "GET", + PathPattern: "/config/view_hints_directory", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigViewHintsDirectoryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigViewHintsDirectoryOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigViewHintsDirectoryDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigVirtualDirtySoftLimit Soft limit of virtual dirty memory expressed as a portion of the hard limit +*/ +func (a *Client) FindConfigVirtualDirtySoftLimit(params *FindConfigVirtualDirtySoftLimitParams) (*FindConfigVirtualDirtySoftLimitOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigVirtualDirtySoftLimitParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_virtual_dirty_soft_limit", + Method: "GET", + PathPattern: "/config/virtual_dirty_soft_limit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigVirtualDirtySoftLimitReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigVirtualDirtySoftLimitOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigVirtualDirtySoftLimitDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigVolatileSystemKeyspaceForTesting Don't persist system keyspace - testing only! +*/ +func (a *Client) FindConfigVolatileSystemKeyspaceForTesting(params *FindConfigVolatileSystemKeyspaceForTestingParams) (*FindConfigVolatileSystemKeyspaceForTestingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigVolatileSystemKeyspaceForTestingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_volatile_system_keyspace_for_testing", + Method: "GET", + PathPattern: "/config/volatile_system_keyspace_for_testing", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigVolatileSystemKeyspaceForTestingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigVolatileSystemKeyspaceForTestingOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigVolatileSystemKeyspaceForTestingDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +FindConfigWriteRequestTimeoutInMs The time in milliseconds that the coordinator waits for write operations to complete. +Related information: About hinted handoff writes +*/ +func (a *Client) FindConfigWriteRequestTimeoutInMs(params *FindConfigWriteRequestTimeoutInMsParams) (*FindConfigWriteRequestTimeoutInMsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewFindConfigWriteRequestTimeoutInMsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "find_config_write_request_timeout_in_ms", + Method: "GET", + PathPattern: "/config/write_request_timeout_in_ms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &FindConfigWriteRequestTimeoutInMsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*FindConfigWriteRequestTimeoutInMsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*FindConfigWriteRequestTimeoutInMsDefault) + 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_parameters.go new file mode 100644 index 00000000000..7566536eb49 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAbortOnLsaBadAllocParams creates a new FindConfigAbortOnLsaBadAllocParams object +// with the default values initialized. +func NewFindConfigAbortOnLsaBadAllocParams() *FindConfigAbortOnLsaBadAllocParams { + + return &FindConfigAbortOnLsaBadAllocParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAbortOnLsaBadAllocParamsWithTimeout creates a new FindConfigAbortOnLsaBadAllocParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAbortOnLsaBadAllocParamsWithTimeout(timeout time.Duration) *FindConfigAbortOnLsaBadAllocParams { + + return &FindConfigAbortOnLsaBadAllocParams{ + + timeout: timeout, + } +} + +// NewFindConfigAbortOnLsaBadAllocParamsWithContext creates a new FindConfigAbortOnLsaBadAllocParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAbortOnLsaBadAllocParamsWithContext(ctx context.Context) *FindConfigAbortOnLsaBadAllocParams { + + return &FindConfigAbortOnLsaBadAllocParams{ + + Context: ctx, + } +} + +// NewFindConfigAbortOnLsaBadAllocParamsWithHTTPClient creates a new FindConfigAbortOnLsaBadAllocParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAbortOnLsaBadAllocParamsWithHTTPClient(client *http.Client) *FindConfigAbortOnLsaBadAllocParams { + + return &FindConfigAbortOnLsaBadAllocParams{ + HTTPClient: client, + } +} + +/*FindConfigAbortOnLsaBadAllocParams contains all the parameters to send to the API endpoint +for the find config abort on lsa bad alloc operation typically these are written to a http.Request +*/ +type FindConfigAbortOnLsaBadAllocParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) WithTimeout(timeout time.Duration) *FindConfigAbortOnLsaBadAllocParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) WithContext(ctx context.Context) *FindConfigAbortOnLsaBadAllocParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) WithHTTPClient(client *http.Client) *FindConfigAbortOnLsaBadAllocParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config abort on lsa bad alloc params +func (o *FindConfigAbortOnLsaBadAllocParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAbortOnLsaBadAllocParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_responses.go new file mode 100644 index 00000000000..0381505cb6e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_abort_on_lsa_bad_alloc_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAbortOnLsaBadAllocReader is a Reader for the FindConfigAbortOnLsaBadAlloc structure. +type FindConfigAbortOnLsaBadAllocReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAbortOnLsaBadAllocReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAbortOnLsaBadAllocOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAbortOnLsaBadAllocDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAbortOnLsaBadAllocOK creates a FindConfigAbortOnLsaBadAllocOK with default headers values +func NewFindConfigAbortOnLsaBadAllocOK() *FindConfigAbortOnLsaBadAllocOK { + return &FindConfigAbortOnLsaBadAllocOK{} +} + +/*FindConfigAbortOnLsaBadAllocOK handles this case with default header values. + +Config value +*/ +type FindConfigAbortOnLsaBadAllocOK struct { + Payload bool +} + +func (o *FindConfigAbortOnLsaBadAllocOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigAbortOnLsaBadAllocOK) 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 +} + +// NewFindConfigAbortOnLsaBadAllocDefault creates a FindConfigAbortOnLsaBadAllocDefault with default headers values +func NewFindConfigAbortOnLsaBadAllocDefault(code int) *FindConfigAbortOnLsaBadAllocDefault { + return &FindConfigAbortOnLsaBadAllocDefault{ + _statusCode: code, + } +} + +/*FindConfigAbortOnLsaBadAllocDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAbortOnLsaBadAllocDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config abort on lsa bad alloc default response +func (o *FindConfigAbortOnLsaBadAllocDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAbortOnLsaBadAllocDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAbortOnLsaBadAllocDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAbortOnLsaBadAllocDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_parameters.go new file mode 100644 index 00000000000..64fd78413e9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAPIAddressParams creates a new FindConfigAPIAddressParams object +// with the default values initialized. +func NewFindConfigAPIAddressParams() *FindConfigAPIAddressParams { + + return &FindConfigAPIAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAPIAddressParamsWithTimeout creates a new FindConfigAPIAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAPIAddressParamsWithTimeout(timeout time.Duration) *FindConfigAPIAddressParams { + + return &FindConfigAPIAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigAPIAddressParamsWithContext creates a new FindConfigAPIAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAPIAddressParamsWithContext(ctx context.Context) *FindConfigAPIAddressParams { + + return &FindConfigAPIAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigAPIAddressParamsWithHTTPClient creates a new FindConfigAPIAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAPIAddressParamsWithHTTPClient(client *http.Client) *FindConfigAPIAddressParams { + + return &FindConfigAPIAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigAPIAddressParams contains all the parameters to send to the API endpoint +for the find config api address operation typically these are written to a http.Request +*/ +type FindConfigAPIAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config api address params +func (o *FindConfigAPIAddressParams) WithTimeout(timeout time.Duration) *FindConfigAPIAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config api address params +func (o *FindConfigAPIAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config api address params +func (o *FindConfigAPIAddressParams) WithContext(ctx context.Context) *FindConfigAPIAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config api address params +func (o *FindConfigAPIAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config api address params +func (o *FindConfigAPIAddressParams) WithHTTPClient(client *http.Client) *FindConfigAPIAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config api address params +func (o *FindConfigAPIAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAPIAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_responses.go new file mode 100644 index 00000000000..94d861f64cb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAPIAddressReader is a Reader for the FindConfigAPIAddress structure. +type FindConfigAPIAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAPIAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAPIAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAPIAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAPIAddressOK creates a FindConfigAPIAddressOK with default headers values +func NewFindConfigAPIAddressOK() *FindConfigAPIAddressOK { + return &FindConfigAPIAddressOK{} +} + +/*FindConfigAPIAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigAPIAddressOK struct { + Payload string +} + +func (o *FindConfigAPIAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigAPIAddressOK) 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 +} + +// NewFindConfigAPIAddressDefault creates a FindConfigAPIAddressDefault with default headers values +func NewFindConfigAPIAddressDefault(code int) *FindConfigAPIAddressDefault { + return &FindConfigAPIAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigAPIAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAPIAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config api address default response +func (o *FindConfigAPIAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAPIAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAPIAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAPIAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_parameters.go new file mode 100644 index 00000000000..220047e8f40 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAPIDocDirParams creates a new FindConfigAPIDocDirParams object +// with the default values initialized. +func NewFindConfigAPIDocDirParams() *FindConfigAPIDocDirParams { + + return &FindConfigAPIDocDirParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAPIDocDirParamsWithTimeout creates a new FindConfigAPIDocDirParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAPIDocDirParamsWithTimeout(timeout time.Duration) *FindConfigAPIDocDirParams { + + return &FindConfigAPIDocDirParams{ + + timeout: timeout, + } +} + +// NewFindConfigAPIDocDirParamsWithContext creates a new FindConfigAPIDocDirParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAPIDocDirParamsWithContext(ctx context.Context) *FindConfigAPIDocDirParams { + + return &FindConfigAPIDocDirParams{ + + Context: ctx, + } +} + +// NewFindConfigAPIDocDirParamsWithHTTPClient creates a new FindConfigAPIDocDirParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAPIDocDirParamsWithHTTPClient(client *http.Client) *FindConfigAPIDocDirParams { + + return &FindConfigAPIDocDirParams{ + HTTPClient: client, + } +} + +/*FindConfigAPIDocDirParams contains all the parameters to send to the API endpoint +for the find config api doc dir operation typically these are written to a http.Request +*/ +type FindConfigAPIDocDirParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) WithTimeout(timeout time.Duration) *FindConfigAPIDocDirParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) WithContext(ctx context.Context) *FindConfigAPIDocDirParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) WithHTTPClient(client *http.Client) *FindConfigAPIDocDirParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config api doc dir params +func (o *FindConfigAPIDocDirParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAPIDocDirParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_responses.go new file mode 100644 index 00000000000..e9a7606cfeb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_doc_dir_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAPIDocDirReader is a Reader for the FindConfigAPIDocDir structure. +type FindConfigAPIDocDirReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAPIDocDirReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAPIDocDirOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAPIDocDirDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAPIDocDirOK creates a FindConfigAPIDocDirOK with default headers values +func NewFindConfigAPIDocDirOK() *FindConfigAPIDocDirOK { + return &FindConfigAPIDocDirOK{} +} + +/*FindConfigAPIDocDirOK handles this case with default header values. + +Config value +*/ +type FindConfigAPIDocDirOK struct { + Payload string +} + +func (o *FindConfigAPIDocDirOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigAPIDocDirOK) 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 +} + +// NewFindConfigAPIDocDirDefault creates a FindConfigAPIDocDirDefault with default headers values +func NewFindConfigAPIDocDirDefault(code int) *FindConfigAPIDocDirDefault { + return &FindConfigAPIDocDirDefault{ + _statusCode: code, + } +} + +/*FindConfigAPIDocDirDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAPIDocDirDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config api doc dir default response +func (o *FindConfigAPIDocDirDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAPIDocDirDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAPIDocDirDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAPIDocDirDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_parameters.go new file mode 100644 index 00000000000..0edd3c59f0d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAPIPortParams creates a new FindConfigAPIPortParams object +// with the default values initialized. +func NewFindConfigAPIPortParams() *FindConfigAPIPortParams { + + return &FindConfigAPIPortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAPIPortParamsWithTimeout creates a new FindConfigAPIPortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAPIPortParamsWithTimeout(timeout time.Duration) *FindConfigAPIPortParams { + + return &FindConfigAPIPortParams{ + + timeout: timeout, + } +} + +// NewFindConfigAPIPortParamsWithContext creates a new FindConfigAPIPortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAPIPortParamsWithContext(ctx context.Context) *FindConfigAPIPortParams { + + return &FindConfigAPIPortParams{ + + Context: ctx, + } +} + +// NewFindConfigAPIPortParamsWithHTTPClient creates a new FindConfigAPIPortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAPIPortParamsWithHTTPClient(client *http.Client) *FindConfigAPIPortParams { + + return &FindConfigAPIPortParams{ + HTTPClient: client, + } +} + +/*FindConfigAPIPortParams contains all the parameters to send to the API endpoint +for the find config api port operation typically these are written to a http.Request +*/ +type FindConfigAPIPortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config api port params +func (o *FindConfigAPIPortParams) WithTimeout(timeout time.Duration) *FindConfigAPIPortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config api port params +func (o *FindConfigAPIPortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config api port params +func (o *FindConfigAPIPortParams) WithContext(ctx context.Context) *FindConfigAPIPortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config api port params +func (o *FindConfigAPIPortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config api port params +func (o *FindConfigAPIPortParams) WithHTTPClient(client *http.Client) *FindConfigAPIPortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config api port params +func (o *FindConfigAPIPortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAPIPortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_responses.go new file mode 100644 index 00000000000..1429b2de8eb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAPIPortReader is a Reader for the FindConfigAPIPort structure. +type FindConfigAPIPortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAPIPortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAPIPortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAPIPortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAPIPortOK creates a FindConfigAPIPortOK with default headers values +func NewFindConfigAPIPortOK() *FindConfigAPIPortOK { + return &FindConfigAPIPortOK{} +} + +/*FindConfigAPIPortOK handles this case with default header values. + +Config value +*/ +type FindConfigAPIPortOK struct { + Payload int64 +} + +func (o *FindConfigAPIPortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigAPIPortOK) 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 +} + +// NewFindConfigAPIPortDefault creates a FindConfigAPIPortDefault with default headers values +func NewFindConfigAPIPortDefault(code int) *FindConfigAPIPortDefault { + return &FindConfigAPIPortDefault{ + _statusCode: code, + } +} + +/*FindConfigAPIPortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAPIPortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config api port default response +func (o *FindConfigAPIPortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAPIPortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAPIPortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAPIPortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_parameters.go new file mode 100644 index 00000000000..b082b04c022 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAPIUIDirParams creates a new FindConfigAPIUIDirParams object +// with the default values initialized. +func NewFindConfigAPIUIDirParams() *FindConfigAPIUIDirParams { + + return &FindConfigAPIUIDirParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAPIUIDirParamsWithTimeout creates a new FindConfigAPIUIDirParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAPIUIDirParamsWithTimeout(timeout time.Duration) *FindConfigAPIUIDirParams { + + return &FindConfigAPIUIDirParams{ + + timeout: timeout, + } +} + +// NewFindConfigAPIUIDirParamsWithContext creates a new FindConfigAPIUIDirParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAPIUIDirParamsWithContext(ctx context.Context) *FindConfigAPIUIDirParams { + + return &FindConfigAPIUIDirParams{ + + Context: ctx, + } +} + +// NewFindConfigAPIUIDirParamsWithHTTPClient creates a new FindConfigAPIUIDirParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAPIUIDirParamsWithHTTPClient(client *http.Client) *FindConfigAPIUIDirParams { + + return &FindConfigAPIUIDirParams{ + HTTPClient: client, + } +} + +/*FindConfigAPIUIDirParams contains all the parameters to send to the API endpoint +for the find config api ui dir operation typically these are written to a http.Request +*/ +type FindConfigAPIUIDirParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) WithTimeout(timeout time.Duration) *FindConfigAPIUIDirParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) WithContext(ctx context.Context) *FindConfigAPIUIDirParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) WithHTTPClient(client *http.Client) *FindConfigAPIUIDirParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config api ui dir params +func (o *FindConfigAPIUIDirParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAPIUIDirParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_responses.go new file mode 100644 index 00000000000..53d941c9ce1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_api_ui_dir_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAPIUIDirReader is a Reader for the FindConfigAPIUIDir structure. +type FindConfigAPIUIDirReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAPIUIDirReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAPIUIDirOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAPIUIDirDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAPIUIDirOK creates a FindConfigAPIUIDirOK with default headers values +func NewFindConfigAPIUIDirOK() *FindConfigAPIUIDirOK { + return &FindConfigAPIUIDirOK{} +} + +/*FindConfigAPIUIDirOK handles this case with default header values. + +Config value +*/ +type FindConfigAPIUIDirOK struct { + Payload string +} + +func (o *FindConfigAPIUIDirOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigAPIUIDirOK) 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 +} + +// NewFindConfigAPIUIDirDefault creates a FindConfigAPIUIDirDefault with default headers values +func NewFindConfigAPIUIDirDefault(code int) *FindConfigAPIUIDirDefault { + return &FindConfigAPIUIDirDefault{ + _statusCode: code, + } +} + +/*FindConfigAPIUIDirDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAPIUIDirDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config api ui dir default response +func (o *FindConfigAPIUIDirDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAPIUIDirDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAPIUIDirDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAPIUIDirDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_parameters.go new file mode 100644 index 00000000000..89706883e14 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAuthenticatorParams creates a new FindConfigAuthenticatorParams object +// with the default values initialized. +func NewFindConfigAuthenticatorParams() *FindConfigAuthenticatorParams { + + return &FindConfigAuthenticatorParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAuthenticatorParamsWithTimeout creates a new FindConfigAuthenticatorParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAuthenticatorParamsWithTimeout(timeout time.Duration) *FindConfigAuthenticatorParams { + + return &FindConfigAuthenticatorParams{ + + timeout: timeout, + } +} + +// NewFindConfigAuthenticatorParamsWithContext creates a new FindConfigAuthenticatorParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAuthenticatorParamsWithContext(ctx context.Context) *FindConfigAuthenticatorParams { + + return &FindConfigAuthenticatorParams{ + + Context: ctx, + } +} + +// NewFindConfigAuthenticatorParamsWithHTTPClient creates a new FindConfigAuthenticatorParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAuthenticatorParamsWithHTTPClient(client *http.Client) *FindConfigAuthenticatorParams { + + return &FindConfigAuthenticatorParams{ + HTTPClient: client, + } +} + +/*FindConfigAuthenticatorParams contains all the parameters to send to the API endpoint +for the find config authenticator operation typically these are written to a http.Request +*/ +type FindConfigAuthenticatorParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config authenticator params +func (o *FindConfigAuthenticatorParams) WithTimeout(timeout time.Duration) *FindConfigAuthenticatorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config authenticator params +func (o *FindConfigAuthenticatorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config authenticator params +func (o *FindConfigAuthenticatorParams) WithContext(ctx context.Context) *FindConfigAuthenticatorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config authenticator params +func (o *FindConfigAuthenticatorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config authenticator params +func (o *FindConfigAuthenticatorParams) WithHTTPClient(client *http.Client) *FindConfigAuthenticatorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config authenticator params +func (o *FindConfigAuthenticatorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAuthenticatorParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_responses.go new file mode 100644 index 00000000000..ca9713a113d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authenticator_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAuthenticatorReader is a Reader for the FindConfigAuthenticator structure. +type FindConfigAuthenticatorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAuthenticatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAuthenticatorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAuthenticatorDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAuthenticatorOK creates a FindConfigAuthenticatorOK with default headers values +func NewFindConfigAuthenticatorOK() *FindConfigAuthenticatorOK { + return &FindConfigAuthenticatorOK{} +} + +/*FindConfigAuthenticatorOK handles this case with default header values. + +Config value +*/ +type FindConfigAuthenticatorOK struct { + Payload string +} + +func (o *FindConfigAuthenticatorOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigAuthenticatorOK) 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 +} + +// NewFindConfigAuthenticatorDefault creates a FindConfigAuthenticatorDefault with default headers values +func NewFindConfigAuthenticatorDefault(code int) *FindConfigAuthenticatorDefault { + return &FindConfigAuthenticatorDefault{ + _statusCode: code, + } +} + +/*FindConfigAuthenticatorDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAuthenticatorDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config authenticator default response +func (o *FindConfigAuthenticatorDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAuthenticatorDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAuthenticatorDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAuthenticatorDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_parameters.go new file mode 100644 index 00000000000..a6c04390759 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAuthorizerParams creates a new FindConfigAuthorizerParams object +// with the default values initialized. +func NewFindConfigAuthorizerParams() *FindConfigAuthorizerParams { + + return &FindConfigAuthorizerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAuthorizerParamsWithTimeout creates a new FindConfigAuthorizerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAuthorizerParamsWithTimeout(timeout time.Duration) *FindConfigAuthorizerParams { + + return &FindConfigAuthorizerParams{ + + timeout: timeout, + } +} + +// NewFindConfigAuthorizerParamsWithContext creates a new FindConfigAuthorizerParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAuthorizerParamsWithContext(ctx context.Context) *FindConfigAuthorizerParams { + + return &FindConfigAuthorizerParams{ + + Context: ctx, + } +} + +// NewFindConfigAuthorizerParamsWithHTTPClient creates a new FindConfigAuthorizerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAuthorizerParamsWithHTTPClient(client *http.Client) *FindConfigAuthorizerParams { + + return &FindConfigAuthorizerParams{ + HTTPClient: client, + } +} + +/*FindConfigAuthorizerParams contains all the parameters to send to the API endpoint +for the find config authorizer operation typically these are written to a http.Request +*/ +type FindConfigAuthorizerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config authorizer params +func (o *FindConfigAuthorizerParams) WithTimeout(timeout time.Duration) *FindConfigAuthorizerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config authorizer params +func (o *FindConfigAuthorizerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config authorizer params +func (o *FindConfigAuthorizerParams) WithContext(ctx context.Context) *FindConfigAuthorizerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config authorizer params +func (o *FindConfigAuthorizerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config authorizer params +func (o *FindConfigAuthorizerParams) WithHTTPClient(client *http.Client) *FindConfigAuthorizerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config authorizer params +func (o *FindConfigAuthorizerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAuthorizerParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_responses.go new file mode 100644 index 00000000000..5588744693f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_authorizer_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAuthorizerReader is a Reader for the FindConfigAuthorizer structure. +type FindConfigAuthorizerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAuthorizerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAuthorizerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAuthorizerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAuthorizerOK creates a FindConfigAuthorizerOK with default headers values +func NewFindConfigAuthorizerOK() *FindConfigAuthorizerOK { + return &FindConfigAuthorizerOK{} +} + +/*FindConfigAuthorizerOK handles this case with default header values. + +Config value +*/ +type FindConfigAuthorizerOK struct { + Payload string +} + +func (o *FindConfigAuthorizerOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigAuthorizerOK) 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 +} + +// NewFindConfigAuthorizerDefault creates a FindConfigAuthorizerDefault with default headers values +func NewFindConfigAuthorizerDefault(code int) *FindConfigAuthorizerDefault { + return &FindConfigAuthorizerDefault{ + _statusCode: code, + } +} + +/*FindConfigAuthorizerDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAuthorizerDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config authorizer default response +func (o *FindConfigAuthorizerDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAuthorizerDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAuthorizerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAuthorizerDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_parameters.go new file mode 100644 index 00000000000..6ce0c641ed5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAutoAdjustFlushQuotaParams creates a new FindConfigAutoAdjustFlushQuotaParams object +// with the default values initialized. +func NewFindConfigAutoAdjustFlushQuotaParams() *FindConfigAutoAdjustFlushQuotaParams { + + return &FindConfigAutoAdjustFlushQuotaParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAutoAdjustFlushQuotaParamsWithTimeout creates a new FindConfigAutoAdjustFlushQuotaParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAutoAdjustFlushQuotaParamsWithTimeout(timeout time.Duration) *FindConfigAutoAdjustFlushQuotaParams { + + return &FindConfigAutoAdjustFlushQuotaParams{ + + timeout: timeout, + } +} + +// NewFindConfigAutoAdjustFlushQuotaParamsWithContext creates a new FindConfigAutoAdjustFlushQuotaParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAutoAdjustFlushQuotaParamsWithContext(ctx context.Context) *FindConfigAutoAdjustFlushQuotaParams { + + return &FindConfigAutoAdjustFlushQuotaParams{ + + Context: ctx, + } +} + +// NewFindConfigAutoAdjustFlushQuotaParamsWithHTTPClient creates a new FindConfigAutoAdjustFlushQuotaParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAutoAdjustFlushQuotaParamsWithHTTPClient(client *http.Client) *FindConfigAutoAdjustFlushQuotaParams { + + return &FindConfigAutoAdjustFlushQuotaParams{ + HTTPClient: client, + } +} + +/*FindConfigAutoAdjustFlushQuotaParams contains all the parameters to send to the API endpoint +for the find config auto adjust flush quota operation typically these are written to a http.Request +*/ +type FindConfigAutoAdjustFlushQuotaParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) WithTimeout(timeout time.Duration) *FindConfigAutoAdjustFlushQuotaParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) WithContext(ctx context.Context) *FindConfigAutoAdjustFlushQuotaParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) WithHTTPClient(client *http.Client) *FindConfigAutoAdjustFlushQuotaParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config auto adjust flush quota params +func (o *FindConfigAutoAdjustFlushQuotaParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAutoAdjustFlushQuotaParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_responses.go new file mode 100644 index 00000000000..4f00c832dc1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_adjust_flush_quota_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAutoAdjustFlushQuotaReader is a Reader for the FindConfigAutoAdjustFlushQuota structure. +type FindConfigAutoAdjustFlushQuotaReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAutoAdjustFlushQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAutoAdjustFlushQuotaOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAutoAdjustFlushQuotaDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAutoAdjustFlushQuotaOK creates a FindConfigAutoAdjustFlushQuotaOK with default headers values +func NewFindConfigAutoAdjustFlushQuotaOK() *FindConfigAutoAdjustFlushQuotaOK { + return &FindConfigAutoAdjustFlushQuotaOK{} +} + +/*FindConfigAutoAdjustFlushQuotaOK handles this case with default header values. + +Config value +*/ +type FindConfigAutoAdjustFlushQuotaOK struct { + Payload bool +} + +func (o *FindConfigAutoAdjustFlushQuotaOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigAutoAdjustFlushQuotaOK) 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 +} + +// NewFindConfigAutoAdjustFlushQuotaDefault creates a FindConfigAutoAdjustFlushQuotaDefault with default headers values +func NewFindConfigAutoAdjustFlushQuotaDefault(code int) *FindConfigAutoAdjustFlushQuotaDefault { + return &FindConfigAutoAdjustFlushQuotaDefault{ + _statusCode: code, + } +} + +/*FindConfigAutoAdjustFlushQuotaDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAutoAdjustFlushQuotaDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config auto adjust flush quota default response +func (o *FindConfigAutoAdjustFlushQuotaDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAutoAdjustFlushQuotaDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAutoAdjustFlushQuotaDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAutoAdjustFlushQuotaDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_parameters.go new file mode 100644 index 00000000000..4ec53eeee3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAutoBootstrapParams creates a new FindConfigAutoBootstrapParams object +// with the default values initialized. +func NewFindConfigAutoBootstrapParams() *FindConfigAutoBootstrapParams { + + return &FindConfigAutoBootstrapParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAutoBootstrapParamsWithTimeout creates a new FindConfigAutoBootstrapParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAutoBootstrapParamsWithTimeout(timeout time.Duration) *FindConfigAutoBootstrapParams { + + return &FindConfigAutoBootstrapParams{ + + timeout: timeout, + } +} + +// NewFindConfigAutoBootstrapParamsWithContext creates a new FindConfigAutoBootstrapParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAutoBootstrapParamsWithContext(ctx context.Context) *FindConfigAutoBootstrapParams { + + return &FindConfigAutoBootstrapParams{ + + Context: ctx, + } +} + +// NewFindConfigAutoBootstrapParamsWithHTTPClient creates a new FindConfigAutoBootstrapParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAutoBootstrapParamsWithHTTPClient(client *http.Client) *FindConfigAutoBootstrapParams { + + return &FindConfigAutoBootstrapParams{ + HTTPClient: client, + } +} + +/*FindConfigAutoBootstrapParams contains all the parameters to send to the API endpoint +for the find config auto bootstrap operation typically these are written to a http.Request +*/ +type FindConfigAutoBootstrapParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) WithTimeout(timeout time.Duration) *FindConfigAutoBootstrapParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) WithContext(ctx context.Context) *FindConfigAutoBootstrapParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) WithHTTPClient(client *http.Client) *FindConfigAutoBootstrapParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config auto bootstrap params +func (o *FindConfigAutoBootstrapParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAutoBootstrapParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_responses.go new file mode 100644 index 00000000000..68cec774814 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_bootstrap_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAutoBootstrapReader is a Reader for the FindConfigAutoBootstrap structure. +type FindConfigAutoBootstrapReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAutoBootstrapReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAutoBootstrapOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAutoBootstrapDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAutoBootstrapOK creates a FindConfigAutoBootstrapOK with default headers values +func NewFindConfigAutoBootstrapOK() *FindConfigAutoBootstrapOK { + return &FindConfigAutoBootstrapOK{} +} + +/*FindConfigAutoBootstrapOK handles this case with default header values. + +Config value +*/ +type FindConfigAutoBootstrapOK struct { + Payload bool +} + +func (o *FindConfigAutoBootstrapOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigAutoBootstrapOK) 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 +} + +// NewFindConfigAutoBootstrapDefault creates a FindConfigAutoBootstrapDefault with default headers values +func NewFindConfigAutoBootstrapDefault(code int) *FindConfigAutoBootstrapDefault { + return &FindConfigAutoBootstrapDefault{ + _statusCode: code, + } +} + +/*FindConfigAutoBootstrapDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAutoBootstrapDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config auto bootstrap default response +func (o *FindConfigAutoBootstrapDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAutoBootstrapDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAutoBootstrapDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAutoBootstrapDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_parameters.go new file mode 100644 index 00000000000..9d8abe88c11 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigAutoSnapshotParams creates a new FindConfigAutoSnapshotParams object +// with the default values initialized. +func NewFindConfigAutoSnapshotParams() *FindConfigAutoSnapshotParams { + + return &FindConfigAutoSnapshotParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigAutoSnapshotParamsWithTimeout creates a new FindConfigAutoSnapshotParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigAutoSnapshotParamsWithTimeout(timeout time.Duration) *FindConfigAutoSnapshotParams { + + return &FindConfigAutoSnapshotParams{ + + timeout: timeout, + } +} + +// NewFindConfigAutoSnapshotParamsWithContext creates a new FindConfigAutoSnapshotParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigAutoSnapshotParamsWithContext(ctx context.Context) *FindConfigAutoSnapshotParams { + + return &FindConfigAutoSnapshotParams{ + + Context: ctx, + } +} + +// NewFindConfigAutoSnapshotParamsWithHTTPClient creates a new FindConfigAutoSnapshotParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigAutoSnapshotParamsWithHTTPClient(client *http.Client) *FindConfigAutoSnapshotParams { + + return &FindConfigAutoSnapshotParams{ + HTTPClient: client, + } +} + +/*FindConfigAutoSnapshotParams contains all the parameters to send to the API endpoint +for the find config auto snapshot operation typically these are written to a http.Request +*/ +type FindConfigAutoSnapshotParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) WithTimeout(timeout time.Duration) *FindConfigAutoSnapshotParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) WithContext(ctx context.Context) *FindConfigAutoSnapshotParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) WithHTTPClient(client *http.Client) *FindConfigAutoSnapshotParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config auto snapshot params +func (o *FindConfigAutoSnapshotParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigAutoSnapshotParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_responses.go new file mode 100644 index 00000000000..5d03795c8b1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_auto_snapshot_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigAutoSnapshotReader is a Reader for the FindConfigAutoSnapshot structure. +type FindConfigAutoSnapshotReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigAutoSnapshotReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigAutoSnapshotOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigAutoSnapshotDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigAutoSnapshotOK creates a FindConfigAutoSnapshotOK with default headers values +func NewFindConfigAutoSnapshotOK() *FindConfigAutoSnapshotOK { + return &FindConfigAutoSnapshotOK{} +} + +/*FindConfigAutoSnapshotOK handles this case with default header values. + +Config value +*/ +type FindConfigAutoSnapshotOK struct { + Payload bool +} + +func (o *FindConfigAutoSnapshotOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigAutoSnapshotOK) 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 +} + +// NewFindConfigAutoSnapshotDefault creates a FindConfigAutoSnapshotDefault with default headers values +func NewFindConfigAutoSnapshotDefault(code int) *FindConfigAutoSnapshotDefault { + return &FindConfigAutoSnapshotDefault{ + _statusCode: code, + } +} + +/*FindConfigAutoSnapshotDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigAutoSnapshotDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config auto snapshot default response +func (o *FindConfigAutoSnapshotDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigAutoSnapshotDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigAutoSnapshotDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigAutoSnapshotDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_parameters.go new file mode 100644 index 00000000000..25179e62556 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBackgroundWriterSchedulingQuotaParams creates a new FindConfigBackgroundWriterSchedulingQuotaParams object +// with the default values initialized. +func NewFindConfigBackgroundWriterSchedulingQuotaParams() *FindConfigBackgroundWriterSchedulingQuotaParams { + + return &FindConfigBackgroundWriterSchedulingQuotaParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBackgroundWriterSchedulingQuotaParamsWithTimeout creates a new FindConfigBackgroundWriterSchedulingQuotaParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBackgroundWriterSchedulingQuotaParamsWithTimeout(timeout time.Duration) *FindConfigBackgroundWriterSchedulingQuotaParams { + + return &FindConfigBackgroundWriterSchedulingQuotaParams{ + + timeout: timeout, + } +} + +// NewFindConfigBackgroundWriterSchedulingQuotaParamsWithContext creates a new FindConfigBackgroundWriterSchedulingQuotaParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBackgroundWriterSchedulingQuotaParamsWithContext(ctx context.Context) *FindConfigBackgroundWriterSchedulingQuotaParams { + + return &FindConfigBackgroundWriterSchedulingQuotaParams{ + + Context: ctx, + } +} + +// NewFindConfigBackgroundWriterSchedulingQuotaParamsWithHTTPClient creates a new FindConfigBackgroundWriterSchedulingQuotaParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBackgroundWriterSchedulingQuotaParamsWithHTTPClient(client *http.Client) *FindConfigBackgroundWriterSchedulingQuotaParams { + + return &FindConfigBackgroundWriterSchedulingQuotaParams{ + HTTPClient: client, + } +} + +/*FindConfigBackgroundWriterSchedulingQuotaParams contains all the parameters to send to the API endpoint +for the find config background writer scheduling quota operation typically these are written to a http.Request +*/ +type FindConfigBackgroundWriterSchedulingQuotaParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) WithTimeout(timeout time.Duration) *FindConfigBackgroundWriterSchedulingQuotaParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) WithContext(ctx context.Context) *FindConfigBackgroundWriterSchedulingQuotaParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) WithHTTPClient(client *http.Client) *FindConfigBackgroundWriterSchedulingQuotaParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config background writer scheduling quota params +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBackgroundWriterSchedulingQuotaParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_responses.go new file mode 100644 index 00000000000..070b3d6db62 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_background_writer_scheduling_quota_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBackgroundWriterSchedulingQuotaReader is a Reader for the FindConfigBackgroundWriterSchedulingQuota structure. +type FindConfigBackgroundWriterSchedulingQuotaReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBackgroundWriterSchedulingQuotaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBackgroundWriterSchedulingQuotaOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBackgroundWriterSchedulingQuotaDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBackgroundWriterSchedulingQuotaOK creates a FindConfigBackgroundWriterSchedulingQuotaOK with default headers values +func NewFindConfigBackgroundWriterSchedulingQuotaOK() *FindConfigBackgroundWriterSchedulingQuotaOK { + return &FindConfigBackgroundWriterSchedulingQuotaOK{} +} + +/*FindConfigBackgroundWriterSchedulingQuotaOK handles this case with default header values. + +Config value +*/ +type FindConfigBackgroundWriterSchedulingQuotaOK struct { + Payload float64 +} + +func (o *FindConfigBackgroundWriterSchedulingQuotaOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigBackgroundWriterSchedulingQuotaOK) 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 +} + +// NewFindConfigBackgroundWriterSchedulingQuotaDefault creates a FindConfigBackgroundWriterSchedulingQuotaDefault with default headers values +func NewFindConfigBackgroundWriterSchedulingQuotaDefault(code int) *FindConfigBackgroundWriterSchedulingQuotaDefault { + return &FindConfigBackgroundWriterSchedulingQuotaDefault{ + _statusCode: code, + } +} + +/*FindConfigBackgroundWriterSchedulingQuotaDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBackgroundWriterSchedulingQuotaDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config background writer scheduling quota default response +func (o *FindConfigBackgroundWriterSchedulingQuotaDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBackgroundWriterSchedulingQuotaDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBackgroundWriterSchedulingQuotaDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBackgroundWriterSchedulingQuotaDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_parameters.go new file mode 100644 index 00000000000..92b56a8eb0a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBatchSizeFailThresholdInKbParams creates a new FindConfigBatchSizeFailThresholdInKbParams object +// with the default values initialized. +func NewFindConfigBatchSizeFailThresholdInKbParams() *FindConfigBatchSizeFailThresholdInKbParams { + + return &FindConfigBatchSizeFailThresholdInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBatchSizeFailThresholdInKbParamsWithTimeout creates a new FindConfigBatchSizeFailThresholdInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBatchSizeFailThresholdInKbParamsWithTimeout(timeout time.Duration) *FindConfigBatchSizeFailThresholdInKbParams { + + return &FindConfigBatchSizeFailThresholdInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigBatchSizeFailThresholdInKbParamsWithContext creates a new FindConfigBatchSizeFailThresholdInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBatchSizeFailThresholdInKbParamsWithContext(ctx context.Context) *FindConfigBatchSizeFailThresholdInKbParams { + + return &FindConfigBatchSizeFailThresholdInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigBatchSizeFailThresholdInKbParamsWithHTTPClient creates a new FindConfigBatchSizeFailThresholdInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBatchSizeFailThresholdInKbParamsWithHTTPClient(client *http.Client) *FindConfigBatchSizeFailThresholdInKbParams { + + return &FindConfigBatchSizeFailThresholdInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigBatchSizeFailThresholdInKbParams contains all the parameters to send to the API endpoint +for the find config batch size fail threshold in kb operation typically these are written to a http.Request +*/ +type FindConfigBatchSizeFailThresholdInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) WithTimeout(timeout time.Duration) *FindConfigBatchSizeFailThresholdInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) WithContext(ctx context.Context) *FindConfigBatchSizeFailThresholdInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) WithHTTPClient(client *http.Client) *FindConfigBatchSizeFailThresholdInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config batch size fail threshold in kb params +func (o *FindConfigBatchSizeFailThresholdInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBatchSizeFailThresholdInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_responses.go new file mode 100644 index 00000000000..3480f9c6cc6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_fail_threshold_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBatchSizeFailThresholdInKbReader is a Reader for the FindConfigBatchSizeFailThresholdInKb structure. +type FindConfigBatchSizeFailThresholdInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBatchSizeFailThresholdInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBatchSizeFailThresholdInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBatchSizeFailThresholdInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBatchSizeFailThresholdInKbOK creates a FindConfigBatchSizeFailThresholdInKbOK with default headers values +func NewFindConfigBatchSizeFailThresholdInKbOK() *FindConfigBatchSizeFailThresholdInKbOK { + return &FindConfigBatchSizeFailThresholdInKbOK{} +} + +/*FindConfigBatchSizeFailThresholdInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigBatchSizeFailThresholdInKbOK struct { + Payload int64 +} + +func (o *FindConfigBatchSizeFailThresholdInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigBatchSizeFailThresholdInKbOK) 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 +} + +// NewFindConfigBatchSizeFailThresholdInKbDefault creates a FindConfigBatchSizeFailThresholdInKbDefault with default headers values +func NewFindConfigBatchSizeFailThresholdInKbDefault(code int) *FindConfigBatchSizeFailThresholdInKbDefault { + return &FindConfigBatchSizeFailThresholdInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigBatchSizeFailThresholdInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBatchSizeFailThresholdInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config batch size fail threshold in kb default response +func (o *FindConfigBatchSizeFailThresholdInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBatchSizeFailThresholdInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBatchSizeFailThresholdInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBatchSizeFailThresholdInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_parameters.go new file mode 100644 index 00000000000..dc224e7b636 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBatchSizeWarnThresholdInKbParams creates a new FindConfigBatchSizeWarnThresholdInKbParams object +// with the default values initialized. +func NewFindConfigBatchSizeWarnThresholdInKbParams() *FindConfigBatchSizeWarnThresholdInKbParams { + + return &FindConfigBatchSizeWarnThresholdInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBatchSizeWarnThresholdInKbParamsWithTimeout creates a new FindConfigBatchSizeWarnThresholdInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBatchSizeWarnThresholdInKbParamsWithTimeout(timeout time.Duration) *FindConfigBatchSizeWarnThresholdInKbParams { + + return &FindConfigBatchSizeWarnThresholdInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigBatchSizeWarnThresholdInKbParamsWithContext creates a new FindConfigBatchSizeWarnThresholdInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBatchSizeWarnThresholdInKbParamsWithContext(ctx context.Context) *FindConfigBatchSizeWarnThresholdInKbParams { + + return &FindConfigBatchSizeWarnThresholdInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigBatchSizeWarnThresholdInKbParamsWithHTTPClient creates a new FindConfigBatchSizeWarnThresholdInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBatchSizeWarnThresholdInKbParamsWithHTTPClient(client *http.Client) *FindConfigBatchSizeWarnThresholdInKbParams { + + return &FindConfigBatchSizeWarnThresholdInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigBatchSizeWarnThresholdInKbParams contains all the parameters to send to the API endpoint +for the find config batch size warn threshold in kb operation typically these are written to a http.Request +*/ +type FindConfigBatchSizeWarnThresholdInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) WithTimeout(timeout time.Duration) *FindConfigBatchSizeWarnThresholdInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) WithContext(ctx context.Context) *FindConfigBatchSizeWarnThresholdInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) WithHTTPClient(client *http.Client) *FindConfigBatchSizeWarnThresholdInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config batch size warn threshold in kb params +func (o *FindConfigBatchSizeWarnThresholdInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBatchSizeWarnThresholdInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_responses.go new file mode 100644 index 00000000000..482287909d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batch_size_warn_threshold_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBatchSizeWarnThresholdInKbReader is a Reader for the FindConfigBatchSizeWarnThresholdInKb structure. +type FindConfigBatchSizeWarnThresholdInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBatchSizeWarnThresholdInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBatchSizeWarnThresholdInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBatchSizeWarnThresholdInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBatchSizeWarnThresholdInKbOK creates a FindConfigBatchSizeWarnThresholdInKbOK with default headers values +func NewFindConfigBatchSizeWarnThresholdInKbOK() *FindConfigBatchSizeWarnThresholdInKbOK { + return &FindConfigBatchSizeWarnThresholdInKbOK{} +} + +/*FindConfigBatchSizeWarnThresholdInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigBatchSizeWarnThresholdInKbOK struct { + Payload int64 +} + +func (o *FindConfigBatchSizeWarnThresholdInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigBatchSizeWarnThresholdInKbOK) 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 +} + +// NewFindConfigBatchSizeWarnThresholdInKbDefault creates a FindConfigBatchSizeWarnThresholdInKbDefault with default headers values +func NewFindConfigBatchSizeWarnThresholdInKbDefault(code int) *FindConfigBatchSizeWarnThresholdInKbDefault { + return &FindConfigBatchSizeWarnThresholdInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigBatchSizeWarnThresholdInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBatchSizeWarnThresholdInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config batch size warn threshold in kb default response +func (o *FindConfigBatchSizeWarnThresholdInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBatchSizeWarnThresholdInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBatchSizeWarnThresholdInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBatchSizeWarnThresholdInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_parameters.go new file mode 100644 index 00000000000..10dc99a0d10 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBatchlogReplayThrottleInKbParams creates a new FindConfigBatchlogReplayThrottleInKbParams object +// with the default values initialized. +func NewFindConfigBatchlogReplayThrottleInKbParams() *FindConfigBatchlogReplayThrottleInKbParams { + + return &FindConfigBatchlogReplayThrottleInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBatchlogReplayThrottleInKbParamsWithTimeout creates a new FindConfigBatchlogReplayThrottleInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBatchlogReplayThrottleInKbParamsWithTimeout(timeout time.Duration) *FindConfigBatchlogReplayThrottleInKbParams { + + return &FindConfigBatchlogReplayThrottleInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigBatchlogReplayThrottleInKbParamsWithContext creates a new FindConfigBatchlogReplayThrottleInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBatchlogReplayThrottleInKbParamsWithContext(ctx context.Context) *FindConfigBatchlogReplayThrottleInKbParams { + + return &FindConfigBatchlogReplayThrottleInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigBatchlogReplayThrottleInKbParamsWithHTTPClient creates a new FindConfigBatchlogReplayThrottleInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBatchlogReplayThrottleInKbParamsWithHTTPClient(client *http.Client) *FindConfigBatchlogReplayThrottleInKbParams { + + return &FindConfigBatchlogReplayThrottleInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigBatchlogReplayThrottleInKbParams contains all the parameters to send to the API endpoint +for the find config batchlog replay throttle in kb operation typically these are written to a http.Request +*/ +type FindConfigBatchlogReplayThrottleInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) WithTimeout(timeout time.Duration) *FindConfigBatchlogReplayThrottleInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) WithContext(ctx context.Context) *FindConfigBatchlogReplayThrottleInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) WithHTTPClient(client *http.Client) *FindConfigBatchlogReplayThrottleInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config batchlog replay throttle in kb params +func (o *FindConfigBatchlogReplayThrottleInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBatchlogReplayThrottleInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_responses.go new file mode 100644 index 00000000000..145eba161ee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_batchlog_replay_throttle_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBatchlogReplayThrottleInKbReader is a Reader for the FindConfigBatchlogReplayThrottleInKb structure. +type FindConfigBatchlogReplayThrottleInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBatchlogReplayThrottleInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBatchlogReplayThrottleInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBatchlogReplayThrottleInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBatchlogReplayThrottleInKbOK creates a FindConfigBatchlogReplayThrottleInKbOK with default headers values +func NewFindConfigBatchlogReplayThrottleInKbOK() *FindConfigBatchlogReplayThrottleInKbOK { + return &FindConfigBatchlogReplayThrottleInKbOK{} +} + +/*FindConfigBatchlogReplayThrottleInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigBatchlogReplayThrottleInKbOK struct { + Payload int64 +} + +func (o *FindConfigBatchlogReplayThrottleInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigBatchlogReplayThrottleInKbOK) 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 +} + +// NewFindConfigBatchlogReplayThrottleInKbDefault creates a FindConfigBatchlogReplayThrottleInKbDefault with default headers values +func NewFindConfigBatchlogReplayThrottleInKbDefault(code int) *FindConfigBatchlogReplayThrottleInKbDefault { + return &FindConfigBatchlogReplayThrottleInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigBatchlogReplayThrottleInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBatchlogReplayThrottleInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config batchlog replay throttle in kb default response +func (o *FindConfigBatchlogReplayThrottleInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBatchlogReplayThrottleInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBatchlogReplayThrottleInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBatchlogReplayThrottleInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_parameters.go new file mode 100644 index 00000000000..1978726b1a5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBroadcastAddressParams creates a new FindConfigBroadcastAddressParams object +// with the default values initialized. +func NewFindConfigBroadcastAddressParams() *FindConfigBroadcastAddressParams { + + return &FindConfigBroadcastAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBroadcastAddressParamsWithTimeout creates a new FindConfigBroadcastAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBroadcastAddressParamsWithTimeout(timeout time.Duration) *FindConfigBroadcastAddressParams { + + return &FindConfigBroadcastAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigBroadcastAddressParamsWithContext creates a new FindConfigBroadcastAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBroadcastAddressParamsWithContext(ctx context.Context) *FindConfigBroadcastAddressParams { + + return &FindConfigBroadcastAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigBroadcastAddressParamsWithHTTPClient creates a new FindConfigBroadcastAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBroadcastAddressParamsWithHTTPClient(client *http.Client) *FindConfigBroadcastAddressParams { + + return &FindConfigBroadcastAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigBroadcastAddressParams contains all the parameters to send to the API endpoint +for the find config broadcast address operation typically these are written to a http.Request +*/ +type FindConfigBroadcastAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) WithTimeout(timeout time.Duration) *FindConfigBroadcastAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) WithContext(ctx context.Context) *FindConfigBroadcastAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) WithHTTPClient(client *http.Client) *FindConfigBroadcastAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config broadcast address params +func (o *FindConfigBroadcastAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBroadcastAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_responses.go new file mode 100644 index 00000000000..b3af1b4cb3f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBroadcastAddressReader is a Reader for the FindConfigBroadcastAddress structure. +type FindConfigBroadcastAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBroadcastAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBroadcastAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBroadcastAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBroadcastAddressOK creates a FindConfigBroadcastAddressOK with default headers values +func NewFindConfigBroadcastAddressOK() *FindConfigBroadcastAddressOK { + return &FindConfigBroadcastAddressOK{} +} + +/*FindConfigBroadcastAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigBroadcastAddressOK struct { + Payload string +} + +func (o *FindConfigBroadcastAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigBroadcastAddressOK) 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 +} + +// NewFindConfigBroadcastAddressDefault creates a FindConfigBroadcastAddressDefault with default headers values +func NewFindConfigBroadcastAddressDefault(code int) *FindConfigBroadcastAddressDefault { + return &FindConfigBroadcastAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigBroadcastAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBroadcastAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config broadcast address default response +func (o *FindConfigBroadcastAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBroadcastAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBroadcastAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBroadcastAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_parameters.go new file mode 100644 index 00000000000..bb4f4015b4b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigBroadcastRPCAddressParams creates a new FindConfigBroadcastRPCAddressParams object +// with the default values initialized. +func NewFindConfigBroadcastRPCAddressParams() *FindConfigBroadcastRPCAddressParams { + + return &FindConfigBroadcastRPCAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigBroadcastRPCAddressParamsWithTimeout creates a new FindConfigBroadcastRPCAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigBroadcastRPCAddressParamsWithTimeout(timeout time.Duration) *FindConfigBroadcastRPCAddressParams { + + return &FindConfigBroadcastRPCAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigBroadcastRPCAddressParamsWithContext creates a new FindConfigBroadcastRPCAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigBroadcastRPCAddressParamsWithContext(ctx context.Context) *FindConfigBroadcastRPCAddressParams { + + return &FindConfigBroadcastRPCAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigBroadcastRPCAddressParamsWithHTTPClient creates a new FindConfigBroadcastRPCAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigBroadcastRPCAddressParamsWithHTTPClient(client *http.Client) *FindConfigBroadcastRPCAddressParams { + + return &FindConfigBroadcastRPCAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigBroadcastRPCAddressParams contains all the parameters to send to the API endpoint +for the find config broadcast rpc address operation typically these are written to a http.Request +*/ +type FindConfigBroadcastRPCAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) WithTimeout(timeout time.Duration) *FindConfigBroadcastRPCAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) WithContext(ctx context.Context) *FindConfigBroadcastRPCAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) WithHTTPClient(client *http.Client) *FindConfigBroadcastRPCAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config broadcast rpc address params +func (o *FindConfigBroadcastRPCAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigBroadcastRPCAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_responses.go new file mode 100644 index 00000000000..1e6372c0e6a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_broadcast_rpc_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigBroadcastRPCAddressReader is a Reader for the FindConfigBroadcastRPCAddress structure. +type FindConfigBroadcastRPCAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigBroadcastRPCAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigBroadcastRPCAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigBroadcastRPCAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigBroadcastRPCAddressOK creates a FindConfigBroadcastRPCAddressOK with default headers values +func NewFindConfigBroadcastRPCAddressOK() *FindConfigBroadcastRPCAddressOK { + return &FindConfigBroadcastRPCAddressOK{} +} + +/*FindConfigBroadcastRPCAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigBroadcastRPCAddressOK struct { + Payload string +} + +func (o *FindConfigBroadcastRPCAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigBroadcastRPCAddressOK) 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 +} + +// NewFindConfigBroadcastRPCAddressDefault creates a FindConfigBroadcastRPCAddressDefault with default headers values +func NewFindConfigBroadcastRPCAddressDefault(code int) *FindConfigBroadcastRPCAddressDefault { + return &FindConfigBroadcastRPCAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigBroadcastRPCAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigBroadcastRPCAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config broadcast rpc address default response +func (o *FindConfigBroadcastRPCAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigBroadcastRPCAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigBroadcastRPCAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigBroadcastRPCAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_parameters.go new file mode 100644 index 00000000000..6ff6fa8c19a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCacheHitRateReadBalancingParams creates a new FindConfigCacheHitRateReadBalancingParams object +// with the default values initialized. +func NewFindConfigCacheHitRateReadBalancingParams() *FindConfigCacheHitRateReadBalancingParams { + + return &FindConfigCacheHitRateReadBalancingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCacheHitRateReadBalancingParamsWithTimeout creates a new FindConfigCacheHitRateReadBalancingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCacheHitRateReadBalancingParamsWithTimeout(timeout time.Duration) *FindConfigCacheHitRateReadBalancingParams { + + return &FindConfigCacheHitRateReadBalancingParams{ + + timeout: timeout, + } +} + +// NewFindConfigCacheHitRateReadBalancingParamsWithContext creates a new FindConfigCacheHitRateReadBalancingParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCacheHitRateReadBalancingParamsWithContext(ctx context.Context) *FindConfigCacheHitRateReadBalancingParams { + + return &FindConfigCacheHitRateReadBalancingParams{ + + Context: ctx, + } +} + +// NewFindConfigCacheHitRateReadBalancingParamsWithHTTPClient creates a new FindConfigCacheHitRateReadBalancingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCacheHitRateReadBalancingParamsWithHTTPClient(client *http.Client) *FindConfigCacheHitRateReadBalancingParams { + + return &FindConfigCacheHitRateReadBalancingParams{ + HTTPClient: client, + } +} + +/*FindConfigCacheHitRateReadBalancingParams contains all the parameters to send to the API endpoint +for the find config cache hit rate read balancing operation typically these are written to a http.Request +*/ +type FindConfigCacheHitRateReadBalancingParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) WithTimeout(timeout time.Duration) *FindConfigCacheHitRateReadBalancingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) WithContext(ctx context.Context) *FindConfigCacheHitRateReadBalancingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) WithHTTPClient(client *http.Client) *FindConfigCacheHitRateReadBalancingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config cache hit rate read balancing params +func (o *FindConfigCacheHitRateReadBalancingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCacheHitRateReadBalancingParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_responses.go new file mode 100644 index 00000000000..cdd0dbef265 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cache_hit_rate_read_balancing_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCacheHitRateReadBalancingReader is a Reader for the FindConfigCacheHitRateReadBalancing structure. +type FindConfigCacheHitRateReadBalancingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCacheHitRateReadBalancingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCacheHitRateReadBalancingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCacheHitRateReadBalancingDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCacheHitRateReadBalancingOK creates a FindConfigCacheHitRateReadBalancingOK with default headers values +func NewFindConfigCacheHitRateReadBalancingOK() *FindConfigCacheHitRateReadBalancingOK { + return &FindConfigCacheHitRateReadBalancingOK{} +} + +/*FindConfigCacheHitRateReadBalancingOK handles this case with default header values. + +Config value +*/ +type FindConfigCacheHitRateReadBalancingOK struct { + Payload bool +} + +func (o *FindConfigCacheHitRateReadBalancingOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCacheHitRateReadBalancingOK) 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 +} + +// NewFindConfigCacheHitRateReadBalancingDefault creates a FindConfigCacheHitRateReadBalancingDefault with default headers values +func NewFindConfigCacheHitRateReadBalancingDefault(code int) *FindConfigCacheHitRateReadBalancingDefault { + return &FindConfigCacheHitRateReadBalancingDefault{ + _statusCode: code, + } +} + +/*FindConfigCacheHitRateReadBalancingDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCacheHitRateReadBalancingDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config cache hit rate read balancing default response +func (o *FindConfigCacheHitRateReadBalancingDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCacheHitRateReadBalancingDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCacheHitRateReadBalancingDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCacheHitRateReadBalancingDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..d2b9d09d547 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCasContentionTimeoutInMsParams creates a new FindConfigCasContentionTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigCasContentionTimeoutInMsParams() *FindConfigCasContentionTimeoutInMsParams { + + return &FindConfigCasContentionTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCasContentionTimeoutInMsParamsWithTimeout creates a new FindConfigCasContentionTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCasContentionTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigCasContentionTimeoutInMsParams { + + return &FindConfigCasContentionTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigCasContentionTimeoutInMsParamsWithContext creates a new FindConfigCasContentionTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCasContentionTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigCasContentionTimeoutInMsParams { + + return &FindConfigCasContentionTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigCasContentionTimeoutInMsParamsWithHTTPClient creates a new FindConfigCasContentionTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCasContentionTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigCasContentionTimeoutInMsParams { + + return &FindConfigCasContentionTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigCasContentionTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config cas contention timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigCasContentionTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigCasContentionTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigCasContentionTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigCasContentionTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config cas contention timeout in ms params +func (o *FindConfigCasContentionTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCasContentionTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_responses.go new file mode 100644 index 00000000000..2db830ef68d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cas_contention_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCasContentionTimeoutInMsReader is a Reader for the FindConfigCasContentionTimeoutInMs structure. +type FindConfigCasContentionTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCasContentionTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCasContentionTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCasContentionTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCasContentionTimeoutInMsOK creates a FindConfigCasContentionTimeoutInMsOK with default headers values +func NewFindConfigCasContentionTimeoutInMsOK() *FindConfigCasContentionTimeoutInMsOK { + return &FindConfigCasContentionTimeoutInMsOK{} +} + +/*FindConfigCasContentionTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigCasContentionTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigCasContentionTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCasContentionTimeoutInMsOK) 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 +} + +// NewFindConfigCasContentionTimeoutInMsDefault creates a FindConfigCasContentionTimeoutInMsDefault with default headers values +func NewFindConfigCasContentionTimeoutInMsDefault(code int) *FindConfigCasContentionTimeoutInMsDefault { + return &FindConfigCasContentionTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigCasContentionTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCasContentionTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config cas contention timeout in ms default response +func (o *FindConfigCasContentionTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCasContentionTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCasContentionTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCasContentionTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_parameters.go new file mode 100644 index 00000000000..803ab490256 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigClientEncryptionOptionsParams creates a new FindConfigClientEncryptionOptionsParams object +// with the default values initialized. +func NewFindConfigClientEncryptionOptionsParams() *FindConfigClientEncryptionOptionsParams { + + return &FindConfigClientEncryptionOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigClientEncryptionOptionsParamsWithTimeout creates a new FindConfigClientEncryptionOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigClientEncryptionOptionsParamsWithTimeout(timeout time.Duration) *FindConfigClientEncryptionOptionsParams { + + return &FindConfigClientEncryptionOptionsParams{ + + timeout: timeout, + } +} + +// NewFindConfigClientEncryptionOptionsParamsWithContext creates a new FindConfigClientEncryptionOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigClientEncryptionOptionsParamsWithContext(ctx context.Context) *FindConfigClientEncryptionOptionsParams { + + return &FindConfigClientEncryptionOptionsParams{ + + Context: ctx, + } +} + +// NewFindConfigClientEncryptionOptionsParamsWithHTTPClient creates a new FindConfigClientEncryptionOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigClientEncryptionOptionsParamsWithHTTPClient(client *http.Client) *FindConfigClientEncryptionOptionsParams { + + return &FindConfigClientEncryptionOptionsParams{ + HTTPClient: client, + } +} + +/*FindConfigClientEncryptionOptionsParams contains all the parameters to send to the API endpoint +for the find config client encryption options operation typically these are written to a http.Request +*/ +type FindConfigClientEncryptionOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) WithTimeout(timeout time.Duration) *FindConfigClientEncryptionOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) WithContext(ctx context.Context) *FindConfigClientEncryptionOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) WithHTTPClient(client *http.Client) *FindConfigClientEncryptionOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config client encryption options params +func (o *FindConfigClientEncryptionOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigClientEncryptionOptionsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_responses.go new file mode 100644 index 00000000000..975dabec934 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_client_encryption_options_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigClientEncryptionOptionsReader is a Reader for the FindConfigClientEncryptionOptions structure. +type FindConfigClientEncryptionOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigClientEncryptionOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigClientEncryptionOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigClientEncryptionOptionsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigClientEncryptionOptionsOK creates a FindConfigClientEncryptionOptionsOK with default headers values +func NewFindConfigClientEncryptionOptionsOK() *FindConfigClientEncryptionOptionsOK { + return &FindConfigClientEncryptionOptionsOK{} +} + +/*FindConfigClientEncryptionOptionsOK handles this case with default header values. + +Config value +*/ +type FindConfigClientEncryptionOptionsOK struct { + Payload []string +} + +func (o *FindConfigClientEncryptionOptionsOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigClientEncryptionOptionsOK) 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 +} + +// NewFindConfigClientEncryptionOptionsDefault creates a FindConfigClientEncryptionOptionsDefault with default headers values +func NewFindConfigClientEncryptionOptionsDefault(code int) *FindConfigClientEncryptionOptionsDefault { + return &FindConfigClientEncryptionOptionsDefault{ + _statusCode: code, + } +} + +/*FindConfigClientEncryptionOptionsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigClientEncryptionOptionsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config client encryption options default response +func (o *FindConfigClientEncryptionOptionsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigClientEncryptionOptionsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigClientEncryptionOptionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigClientEncryptionOptionsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_parameters.go new file mode 100644 index 00000000000..aa7933a8993 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigClusterNameParams creates a new FindConfigClusterNameParams object +// with the default values initialized. +func NewFindConfigClusterNameParams() *FindConfigClusterNameParams { + + return &FindConfigClusterNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigClusterNameParamsWithTimeout creates a new FindConfigClusterNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigClusterNameParamsWithTimeout(timeout time.Duration) *FindConfigClusterNameParams { + + return &FindConfigClusterNameParams{ + + timeout: timeout, + } +} + +// NewFindConfigClusterNameParamsWithContext creates a new FindConfigClusterNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigClusterNameParamsWithContext(ctx context.Context) *FindConfigClusterNameParams { + + return &FindConfigClusterNameParams{ + + Context: ctx, + } +} + +// NewFindConfigClusterNameParamsWithHTTPClient creates a new FindConfigClusterNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigClusterNameParamsWithHTTPClient(client *http.Client) *FindConfigClusterNameParams { + + return &FindConfigClusterNameParams{ + HTTPClient: client, + } +} + +/*FindConfigClusterNameParams contains all the parameters to send to the API endpoint +for the find config cluster name operation typically these are written to a http.Request +*/ +type FindConfigClusterNameParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config cluster name params +func (o *FindConfigClusterNameParams) WithTimeout(timeout time.Duration) *FindConfigClusterNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config cluster name params +func (o *FindConfigClusterNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config cluster name params +func (o *FindConfigClusterNameParams) WithContext(ctx context.Context) *FindConfigClusterNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config cluster name params +func (o *FindConfigClusterNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config cluster name params +func (o *FindConfigClusterNameParams) WithHTTPClient(client *http.Client) *FindConfigClusterNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config cluster name params +func (o *FindConfigClusterNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigClusterNameParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_responses.go new file mode 100644 index 00000000000..1b17d713595 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cluster_name_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigClusterNameReader is a Reader for the FindConfigClusterName structure. +type FindConfigClusterNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigClusterNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigClusterNameOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigClusterNameDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigClusterNameOK creates a FindConfigClusterNameOK with default headers values +func NewFindConfigClusterNameOK() *FindConfigClusterNameOK { + return &FindConfigClusterNameOK{} +} + +/*FindConfigClusterNameOK handles this case with default header values. + +Config value +*/ +type FindConfigClusterNameOK struct { + Payload string +} + +func (o *FindConfigClusterNameOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigClusterNameOK) 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 +} + +// NewFindConfigClusterNameDefault creates a FindConfigClusterNameDefault with default headers values +func NewFindConfigClusterNameDefault(code int) *FindConfigClusterNameDefault { + return &FindConfigClusterNameDefault{ + _statusCode: code, + } +} + +/*FindConfigClusterNameDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigClusterNameDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config cluster name default response +func (o *FindConfigClusterNameDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigClusterNameDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigClusterNameDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigClusterNameDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_parameters.go new file mode 100644 index 00000000000..d1e0ed62e80 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigColumnIndexSizeInKbParams creates a new FindConfigColumnIndexSizeInKbParams object +// with the default values initialized. +func NewFindConfigColumnIndexSizeInKbParams() *FindConfigColumnIndexSizeInKbParams { + + return &FindConfigColumnIndexSizeInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigColumnIndexSizeInKbParamsWithTimeout creates a new FindConfigColumnIndexSizeInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigColumnIndexSizeInKbParamsWithTimeout(timeout time.Duration) *FindConfigColumnIndexSizeInKbParams { + + return &FindConfigColumnIndexSizeInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigColumnIndexSizeInKbParamsWithContext creates a new FindConfigColumnIndexSizeInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigColumnIndexSizeInKbParamsWithContext(ctx context.Context) *FindConfigColumnIndexSizeInKbParams { + + return &FindConfigColumnIndexSizeInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigColumnIndexSizeInKbParamsWithHTTPClient creates a new FindConfigColumnIndexSizeInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigColumnIndexSizeInKbParamsWithHTTPClient(client *http.Client) *FindConfigColumnIndexSizeInKbParams { + + return &FindConfigColumnIndexSizeInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigColumnIndexSizeInKbParams contains all the parameters to send to the API endpoint +for the find config column index size in kb operation typically these are written to a http.Request +*/ +type FindConfigColumnIndexSizeInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) WithTimeout(timeout time.Duration) *FindConfigColumnIndexSizeInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) WithContext(ctx context.Context) *FindConfigColumnIndexSizeInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) WithHTTPClient(client *http.Client) *FindConfigColumnIndexSizeInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config column index size in kb params +func (o *FindConfigColumnIndexSizeInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigColumnIndexSizeInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_responses.go new file mode 100644 index 00000000000..af6cd8a2e40 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_column_index_size_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigColumnIndexSizeInKbReader is a Reader for the FindConfigColumnIndexSizeInKb structure. +type FindConfigColumnIndexSizeInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigColumnIndexSizeInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigColumnIndexSizeInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigColumnIndexSizeInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigColumnIndexSizeInKbOK creates a FindConfigColumnIndexSizeInKbOK with default headers values +func NewFindConfigColumnIndexSizeInKbOK() *FindConfigColumnIndexSizeInKbOK { + return &FindConfigColumnIndexSizeInKbOK{} +} + +/*FindConfigColumnIndexSizeInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigColumnIndexSizeInKbOK struct { + Payload int64 +} + +func (o *FindConfigColumnIndexSizeInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigColumnIndexSizeInKbOK) 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 +} + +// NewFindConfigColumnIndexSizeInKbDefault creates a FindConfigColumnIndexSizeInKbDefault with default headers values +func NewFindConfigColumnIndexSizeInKbDefault(code int) *FindConfigColumnIndexSizeInKbDefault { + return &FindConfigColumnIndexSizeInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigColumnIndexSizeInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigColumnIndexSizeInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config column index size in kb default response +func (o *FindConfigColumnIndexSizeInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigColumnIndexSizeInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigColumnIndexSizeInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigColumnIndexSizeInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_parameters.go new file mode 100644 index 00000000000..85f38a78c62 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitFailurePolicyParams creates a new FindConfigCommitFailurePolicyParams object +// with the default values initialized. +func NewFindConfigCommitFailurePolicyParams() *FindConfigCommitFailurePolicyParams { + + return &FindConfigCommitFailurePolicyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitFailurePolicyParamsWithTimeout creates a new FindConfigCommitFailurePolicyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitFailurePolicyParamsWithTimeout(timeout time.Duration) *FindConfigCommitFailurePolicyParams { + + return &FindConfigCommitFailurePolicyParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitFailurePolicyParamsWithContext creates a new FindConfigCommitFailurePolicyParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitFailurePolicyParamsWithContext(ctx context.Context) *FindConfigCommitFailurePolicyParams { + + return &FindConfigCommitFailurePolicyParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitFailurePolicyParamsWithHTTPClient creates a new FindConfigCommitFailurePolicyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitFailurePolicyParamsWithHTTPClient(client *http.Client) *FindConfigCommitFailurePolicyParams { + + return &FindConfigCommitFailurePolicyParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitFailurePolicyParams contains all the parameters to send to the API endpoint +for the find config commit failure policy operation typically these are written to a http.Request +*/ +type FindConfigCommitFailurePolicyParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) WithTimeout(timeout time.Duration) *FindConfigCommitFailurePolicyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) WithContext(ctx context.Context) *FindConfigCommitFailurePolicyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) WithHTTPClient(client *http.Client) *FindConfigCommitFailurePolicyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commit failure policy params +func (o *FindConfigCommitFailurePolicyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitFailurePolicyParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_responses.go new file mode 100644 index 00000000000..d925e82fd7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commit_failure_policy_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitFailurePolicyReader is a Reader for the FindConfigCommitFailurePolicy structure. +type FindConfigCommitFailurePolicyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitFailurePolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitFailurePolicyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitFailurePolicyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitFailurePolicyOK creates a FindConfigCommitFailurePolicyOK with default headers values +func NewFindConfigCommitFailurePolicyOK() *FindConfigCommitFailurePolicyOK { + return &FindConfigCommitFailurePolicyOK{} +} + +/*FindConfigCommitFailurePolicyOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitFailurePolicyOK struct { + Payload string +} + +func (o *FindConfigCommitFailurePolicyOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigCommitFailurePolicyOK) 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 +} + +// NewFindConfigCommitFailurePolicyDefault creates a FindConfigCommitFailurePolicyDefault with default headers values +func NewFindConfigCommitFailurePolicyDefault(code int) *FindConfigCommitFailurePolicyDefault { + return &FindConfigCommitFailurePolicyDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitFailurePolicyDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitFailurePolicyDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commit failure policy default response +func (o *FindConfigCommitFailurePolicyDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitFailurePolicyDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitFailurePolicyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitFailurePolicyDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_parameters.go new file mode 100644 index 00000000000..2b17f41c29c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogDirectoryParams creates a new FindConfigCommitlogDirectoryParams object +// with the default values initialized. +func NewFindConfigCommitlogDirectoryParams() *FindConfigCommitlogDirectoryParams { + + return &FindConfigCommitlogDirectoryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogDirectoryParamsWithTimeout creates a new FindConfigCommitlogDirectoryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogDirectoryParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogDirectoryParams { + + return &FindConfigCommitlogDirectoryParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogDirectoryParamsWithContext creates a new FindConfigCommitlogDirectoryParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogDirectoryParamsWithContext(ctx context.Context) *FindConfigCommitlogDirectoryParams { + + return &FindConfigCommitlogDirectoryParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogDirectoryParamsWithHTTPClient creates a new FindConfigCommitlogDirectoryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogDirectoryParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogDirectoryParams { + + return &FindConfigCommitlogDirectoryParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogDirectoryParams contains all the parameters to send to the API endpoint +for the find config commitlog directory operation typically these are written to a http.Request +*/ +type FindConfigCommitlogDirectoryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogDirectoryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) WithContext(ctx context.Context) *FindConfigCommitlogDirectoryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogDirectoryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog directory params +func (o *FindConfigCommitlogDirectoryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogDirectoryParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_responses.go new file mode 100644 index 00000000000..f6c55bd1aee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_directory_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogDirectoryReader is a Reader for the FindConfigCommitlogDirectory structure. +type FindConfigCommitlogDirectoryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogDirectoryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogDirectoryDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogDirectoryOK creates a FindConfigCommitlogDirectoryOK with default headers values +func NewFindConfigCommitlogDirectoryOK() *FindConfigCommitlogDirectoryOK { + return &FindConfigCommitlogDirectoryOK{} +} + +/*FindConfigCommitlogDirectoryOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogDirectoryOK struct { + Payload string +} + +func (o *FindConfigCommitlogDirectoryOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigCommitlogDirectoryOK) 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 +} + +// NewFindConfigCommitlogDirectoryDefault creates a FindConfigCommitlogDirectoryDefault with default headers values +func NewFindConfigCommitlogDirectoryDefault(code int) *FindConfigCommitlogDirectoryDefault { + return &FindConfigCommitlogDirectoryDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogDirectoryDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogDirectoryDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog directory default response +func (o *FindConfigCommitlogDirectoryDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogDirectoryDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogDirectoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogDirectoryDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_parameters.go new file mode 100644 index 00000000000..90fc2b40942 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogReuseSegmentsParams creates a new FindConfigCommitlogReuseSegmentsParams object +// with the default values initialized. +func NewFindConfigCommitlogReuseSegmentsParams() *FindConfigCommitlogReuseSegmentsParams { + + return &FindConfigCommitlogReuseSegmentsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogReuseSegmentsParamsWithTimeout creates a new FindConfigCommitlogReuseSegmentsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogReuseSegmentsParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogReuseSegmentsParams { + + return &FindConfigCommitlogReuseSegmentsParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogReuseSegmentsParamsWithContext creates a new FindConfigCommitlogReuseSegmentsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogReuseSegmentsParamsWithContext(ctx context.Context) *FindConfigCommitlogReuseSegmentsParams { + + return &FindConfigCommitlogReuseSegmentsParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogReuseSegmentsParamsWithHTTPClient creates a new FindConfigCommitlogReuseSegmentsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogReuseSegmentsParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogReuseSegmentsParams { + + return &FindConfigCommitlogReuseSegmentsParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogReuseSegmentsParams contains all the parameters to send to the API endpoint +for the find config commitlog reuse segments operation typically these are written to a http.Request +*/ +type FindConfigCommitlogReuseSegmentsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogReuseSegmentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) WithContext(ctx context.Context) *FindConfigCommitlogReuseSegmentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogReuseSegmentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog reuse segments params +func (o *FindConfigCommitlogReuseSegmentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogReuseSegmentsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_responses.go new file mode 100644 index 00000000000..9add55bb2de --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_reuse_segments_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogReuseSegmentsReader is a Reader for the FindConfigCommitlogReuseSegments structure. +type FindConfigCommitlogReuseSegmentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogReuseSegmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogReuseSegmentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogReuseSegmentsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogReuseSegmentsOK creates a FindConfigCommitlogReuseSegmentsOK with default headers values +func NewFindConfigCommitlogReuseSegmentsOK() *FindConfigCommitlogReuseSegmentsOK { + return &FindConfigCommitlogReuseSegmentsOK{} +} + +/*FindConfigCommitlogReuseSegmentsOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogReuseSegmentsOK struct { + Payload bool +} + +func (o *FindConfigCommitlogReuseSegmentsOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCommitlogReuseSegmentsOK) 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 +} + +// NewFindConfigCommitlogReuseSegmentsDefault creates a FindConfigCommitlogReuseSegmentsDefault with default headers values +func NewFindConfigCommitlogReuseSegmentsDefault(code int) *FindConfigCommitlogReuseSegmentsDefault { + return &FindConfigCommitlogReuseSegmentsDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogReuseSegmentsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogReuseSegmentsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog reuse segments default response +func (o *FindConfigCommitlogReuseSegmentsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogReuseSegmentsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogReuseSegmentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogReuseSegmentsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_parameters.go new file mode 100644 index 00000000000..3b8c31c756f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogSegmentSizeInMbParams creates a new FindConfigCommitlogSegmentSizeInMbParams object +// with the default values initialized. +func NewFindConfigCommitlogSegmentSizeInMbParams() *FindConfigCommitlogSegmentSizeInMbParams { + + return &FindConfigCommitlogSegmentSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogSegmentSizeInMbParamsWithTimeout creates a new FindConfigCommitlogSegmentSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogSegmentSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogSegmentSizeInMbParams { + + return &FindConfigCommitlogSegmentSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogSegmentSizeInMbParamsWithContext creates a new FindConfigCommitlogSegmentSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogSegmentSizeInMbParamsWithContext(ctx context.Context) *FindConfigCommitlogSegmentSizeInMbParams { + + return &FindConfigCommitlogSegmentSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogSegmentSizeInMbParamsWithHTTPClient creates a new FindConfigCommitlogSegmentSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogSegmentSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogSegmentSizeInMbParams { + + return &FindConfigCommitlogSegmentSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogSegmentSizeInMbParams contains all the parameters to send to the API endpoint +for the find config commitlog segment size in mb operation typically these are written to a http.Request +*/ +type FindConfigCommitlogSegmentSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogSegmentSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) WithContext(ctx context.Context) *FindConfigCommitlogSegmentSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogSegmentSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog segment size in mb params +func (o *FindConfigCommitlogSegmentSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogSegmentSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_responses.go new file mode 100644 index 00000000000..168e07bb326 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_segment_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogSegmentSizeInMbReader is a Reader for the FindConfigCommitlogSegmentSizeInMb structure. +type FindConfigCommitlogSegmentSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogSegmentSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogSegmentSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogSegmentSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogSegmentSizeInMbOK creates a FindConfigCommitlogSegmentSizeInMbOK with default headers values +func NewFindConfigCommitlogSegmentSizeInMbOK() *FindConfigCommitlogSegmentSizeInMbOK { + return &FindConfigCommitlogSegmentSizeInMbOK{} +} + +/*FindConfigCommitlogSegmentSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogSegmentSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigCommitlogSegmentSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCommitlogSegmentSizeInMbOK) 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 +} + +// NewFindConfigCommitlogSegmentSizeInMbDefault creates a FindConfigCommitlogSegmentSizeInMbDefault with default headers values +func NewFindConfigCommitlogSegmentSizeInMbDefault(code int) *FindConfigCommitlogSegmentSizeInMbDefault { + return &FindConfigCommitlogSegmentSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogSegmentSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogSegmentSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog segment size in mb default response +func (o *FindConfigCommitlogSegmentSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogSegmentSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogSegmentSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogSegmentSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_parameters.go new file mode 100644 index 00000000000..ef69ae9bb57 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogSyncBatchWindowInMsParams creates a new FindConfigCommitlogSyncBatchWindowInMsParams object +// with the default values initialized. +func NewFindConfigCommitlogSyncBatchWindowInMsParams() *FindConfigCommitlogSyncBatchWindowInMsParams { + + return &FindConfigCommitlogSyncBatchWindowInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogSyncBatchWindowInMsParamsWithTimeout creates a new FindConfigCommitlogSyncBatchWindowInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogSyncBatchWindowInMsParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogSyncBatchWindowInMsParams { + + return &FindConfigCommitlogSyncBatchWindowInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogSyncBatchWindowInMsParamsWithContext creates a new FindConfigCommitlogSyncBatchWindowInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogSyncBatchWindowInMsParamsWithContext(ctx context.Context) *FindConfigCommitlogSyncBatchWindowInMsParams { + + return &FindConfigCommitlogSyncBatchWindowInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogSyncBatchWindowInMsParamsWithHTTPClient creates a new FindConfigCommitlogSyncBatchWindowInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogSyncBatchWindowInMsParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogSyncBatchWindowInMsParams { + + return &FindConfigCommitlogSyncBatchWindowInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogSyncBatchWindowInMsParams contains all the parameters to send to the API endpoint +for the find config commitlog sync batch window in ms operation typically these are written to a http.Request +*/ +type FindConfigCommitlogSyncBatchWindowInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogSyncBatchWindowInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) WithContext(ctx context.Context) *FindConfigCommitlogSyncBatchWindowInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogSyncBatchWindowInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog sync batch window in ms params +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogSyncBatchWindowInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_responses.go new file mode 100644 index 00000000000..2d08e20cf4e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_batch_window_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogSyncBatchWindowInMsReader is a Reader for the FindConfigCommitlogSyncBatchWindowInMs structure. +type FindConfigCommitlogSyncBatchWindowInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogSyncBatchWindowInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogSyncBatchWindowInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogSyncBatchWindowInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogSyncBatchWindowInMsOK creates a FindConfigCommitlogSyncBatchWindowInMsOK with default headers values +func NewFindConfigCommitlogSyncBatchWindowInMsOK() *FindConfigCommitlogSyncBatchWindowInMsOK { + return &FindConfigCommitlogSyncBatchWindowInMsOK{} +} + +/*FindConfigCommitlogSyncBatchWindowInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogSyncBatchWindowInMsOK struct { + Payload int64 +} + +func (o *FindConfigCommitlogSyncBatchWindowInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCommitlogSyncBatchWindowInMsOK) 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 +} + +// NewFindConfigCommitlogSyncBatchWindowInMsDefault creates a FindConfigCommitlogSyncBatchWindowInMsDefault with default headers values +func NewFindConfigCommitlogSyncBatchWindowInMsDefault(code int) *FindConfigCommitlogSyncBatchWindowInMsDefault { + return &FindConfigCommitlogSyncBatchWindowInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogSyncBatchWindowInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogSyncBatchWindowInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog sync batch window in ms default response +func (o *FindConfigCommitlogSyncBatchWindowInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogSyncBatchWindowInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogSyncBatchWindowInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogSyncBatchWindowInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_parameters.go new file mode 100644 index 00000000000..e1d7b3d802e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogSyncParams creates a new FindConfigCommitlogSyncParams object +// with the default values initialized. +func NewFindConfigCommitlogSyncParams() *FindConfigCommitlogSyncParams { + + return &FindConfigCommitlogSyncParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogSyncParamsWithTimeout creates a new FindConfigCommitlogSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogSyncParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogSyncParams { + + return &FindConfigCommitlogSyncParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogSyncParamsWithContext creates a new FindConfigCommitlogSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogSyncParamsWithContext(ctx context.Context) *FindConfigCommitlogSyncParams { + + return &FindConfigCommitlogSyncParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogSyncParamsWithHTTPClient creates a new FindConfigCommitlogSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogSyncParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogSyncParams { + + return &FindConfigCommitlogSyncParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogSyncParams contains all the parameters to send to the API endpoint +for the find config commitlog sync operation typically these are written to a http.Request +*/ +type FindConfigCommitlogSyncParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) WithContext(ctx context.Context) *FindConfigCommitlogSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog sync params +func (o *FindConfigCommitlogSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogSyncParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_parameters.go new file mode 100644 index 00000000000..cb2f449a0aa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogSyncPeriodInMsParams creates a new FindConfigCommitlogSyncPeriodInMsParams object +// with the default values initialized. +func NewFindConfigCommitlogSyncPeriodInMsParams() *FindConfigCommitlogSyncPeriodInMsParams { + + return &FindConfigCommitlogSyncPeriodInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogSyncPeriodInMsParamsWithTimeout creates a new FindConfigCommitlogSyncPeriodInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogSyncPeriodInMsParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogSyncPeriodInMsParams { + + return &FindConfigCommitlogSyncPeriodInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogSyncPeriodInMsParamsWithContext creates a new FindConfigCommitlogSyncPeriodInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogSyncPeriodInMsParamsWithContext(ctx context.Context) *FindConfigCommitlogSyncPeriodInMsParams { + + return &FindConfigCommitlogSyncPeriodInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogSyncPeriodInMsParamsWithHTTPClient creates a new FindConfigCommitlogSyncPeriodInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogSyncPeriodInMsParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogSyncPeriodInMsParams { + + return &FindConfigCommitlogSyncPeriodInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogSyncPeriodInMsParams contains all the parameters to send to the API endpoint +for the find config commitlog sync period in ms operation typically these are written to a http.Request +*/ +type FindConfigCommitlogSyncPeriodInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogSyncPeriodInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) WithContext(ctx context.Context) *FindConfigCommitlogSyncPeriodInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogSyncPeriodInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog sync period in ms params +func (o *FindConfigCommitlogSyncPeriodInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogSyncPeriodInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_responses.go new file mode 100644 index 00000000000..aad356a8bf4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_period_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogSyncPeriodInMsReader is a Reader for the FindConfigCommitlogSyncPeriodInMs structure. +type FindConfigCommitlogSyncPeriodInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogSyncPeriodInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogSyncPeriodInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogSyncPeriodInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogSyncPeriodInMsOK creates a FindConfigCommitlogSyncPeriodInMsOK with default headers values +func NewFindConfigCommitlogSyncPeriodInMsOK() *FindConfigCommitlogSyncPeriodInMsOK { + return &FindConfigCommitlogSyncPeriodInMsOK{} +} + +/*FindConfigCommitlogSyncPeriodInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogSyncPeriodInMsOK struct { + Payload int64 +} + +func (o *FindConfigCommitlogSyncPeriodInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCommitlogSyncPeriodInMsOK) 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 +} + +// NewFindConfigCommitlogSyncPeriodInMsDefault creates a FindConfigCommitlogSyncPeriodInMsDefault with default headers values +func NewFindConfigCommitlogSyncPeriodInMsDefault(code int) *FindConfigCommitlogSyncPeriodInMsDefault { + return &FindConfigCommitlogSyncPeriodInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogSyncPeriodInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogSyncPeriodInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog sync period in ms default response +func (o *FindConfigCommitlogSyncPeriodInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogSyncPeriodInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogSyncPeriodInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogSyncPeriodInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_responses.go new file mode 100644 index 00000000000..6d984d8ddf4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_sync_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogSyncReader is a Reader for the FindConfigCommitlogSync structure. +type FindConfigCommitlogSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogSyncOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogSyncDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogSyncOK creates a FindConfigCommitlogSyncOK with default headers values +func NewFindConfigCommitlogSyncOK() *FindConfigCommitlogSyncOK { + return &FindConfigCommitlogSyncOK{} +} + +/*FindConfigCommitlogSyncOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogSyncOK struct { + Payload string +} + +func (o *FindConfigCommitlogSyncOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigCommitlogSyncOK) 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 +} + +// NewFindConfigCommitlogSyncDefault creates a FindConfigCommitlogSyncDefault with default headers values +func NewFindConfigCommitlogSyncDefault(code int) *FindConfigCommitlogSyncDefault { + return &FindConfigCommitlogSyncDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogSyncDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogSyncDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog sync default response +func (o *FindConfigCommitlogSyncDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogSyncDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogSyncDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogSyncDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_parameters.go new file mode 100644 index 00000000000..b3010671a4f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogTotalSpaceInMbParams creates a new FindConfigCommitlogTotalSpaceInMbParams object +// with the default values initialized. +func NewFindConfigCommitlogTotalSpaceInMbParams() *FindConfigCommitlogTotalSpaceInMbParams { + + return &FindConfigCommitlogTotalSpaceInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogTotalSpaceInMbParamsWithTimeout creates a new FindConfigCommitlogTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogTotalSpaceInMbParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogTotalSpaceInMbParams { + + return &FindConfigCommitlogTotalSpaceInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogTotalSpaceInMbParamsWithContext creates a new FindConfigCommitlogTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogTotalSpaceInMbParamsWithContext(ctx context.Context) *FindConfigCommitlogTotalSpaceInMbParams { + + return &FindConfigCommitlogTotalSpaceInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogTotalSpaceInMbParamsWithHTTPClient creates a new FindConfigCommitlogTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogTotalSpaceInMbParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogTotalSpaceInMbParams { + + return &FindConfigCommitlogTotalSpaceInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogTotalSpaceInMbParams contains all the parameters to send to the API endpoint +for the find config commitlog total space in mb operation typically these are written to a http.Request +*/ +type FindConfigCommitlogTotalSpaceInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogTotalSpaceInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) WithContext(ctx context.Context) *FindConfigCommitlogTotalSpaceInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogTotalSpaceInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog total space in mb params +func (o *FindConfigCommitlogTotalSpaceInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogTotalSpaceInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_responses.go new file mode 100644 index 00000000000..09989ee8376 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_total_space_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogTotalSpaceInMbReader is a Reader for the FindConfigCommitlogTotalSpaceInMb structure. +type FindConfigCommitlogTotalSpaceInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogTotalSpaceInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogTotalSpaceInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogTotalSpaceInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogTotalSpaceInMbOK creates a FindConfigCommitlogTotalSpaceInMbOK with default headers values +func NewFindConfigCommitlogTotalSpaceInMbOK() *FindConfigCommitlogTotalSpaceInMbOK { + return &FindConfigCommitlogTotalSpaceInMbOK{} +} + +/*FindConfigCommitlogTotalSpaceInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogTotalSpaceInMbOK struct { + Payload int64 +} + +func (o *FindConfigCommitlogTotalSpaceInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCommitlogTotalSpaceInMbOK) 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 +} + +// NewFindConfigCommitlogTotalSpaceInMbDefault creates a FindConfigCommitlogTotalSpaceInMbDefault with default headers values +func NewFindConfigCommitlogTotalSpaceInMbDefault(code int) *FindConfigCommitlogTotalSpaceInMbDefault { + return &FindConfigCommitlogTotalSpaceInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogTotalSpaceInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogTotalSpaceInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog total space in mb default response +func (o *FindConfigCommitlogTotalSpaceInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogTotalSpaceInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogTotalSpaceInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogTotalSpaceInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_parameters.go new file mode 100644 index 00000000000..0003f59aeb0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCommitlogUseoDsyncParams creates a new FindConfigCommitlogUseoDsyncParams object +// with the default values initialized. +func NewFindConfigCommitlogUseoDsyncParams() *FindConfigCommitlogUseoDsyncParams { + + return &FindConfigCommitlogUseoDsyncParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCommitlogUseoDsyncParamsWithTimeout creates a new FindConfigCommitlogUseoDsyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCommitlogUseoDsyncParamsWithTimeout(timeout time.Duration) *FindConfigCommitlogUseoDsyncParams { + + return &FindConfigCommitlogUseoDsyncParams{ + + timeout: timeout, + } +} + +// NewFindConfigCommitlogUseoDsyncParamsWithContext creates a new FindConfigCommitlogUseoDsyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCommitlogUseoDsyncParamsWithContext(ctx context.Context) *FindConfigCommitlogUseoDsyncParams { + + return &FindConfigCommitlogUseoDsyncParams{ + + Context: ctx, + } +} + +// NewFindConfigCommitlogUseoDsyncParamsWithHTTPClient creates a new FindConfigCommitlogUseoDsyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCommitlogUseoDsyncParamsWithHTTPClient(client *http.Client) *FindConfigCommitlogUseoDsyncParams { + + return &FindConfigCommitlogUseoDsyncParams{ + HTTPClient: client, + } +} + +/*FindConfigCommitlogUseoDsyncParams contains all the parameters to send to the API endpoint +for the find config commitlog use o dsync operation typically these are written to a http.Request +*/ +type FindConfigCommitlogUseoDsyncParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) WithTimeout(timeout time.Duration) *FindConfigCommitlogUseoDsyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) WithContext(ctx context.Context) *FindConfigCommitlogUseoDsyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) WithHTTPClient(client *http.Client) *FindConfigCommitlogUseoDsyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config commitlog use o dsync params +func (o *FindConfigCommitlogUseoDsyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCommitlogUseoDsyncParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_responses.go new file mode 100644 index 00000000000..c6ed014fc5b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_commitlog_useo_dsync_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCommitlogUseoDsyncReader is a Reader for the FindConfigCommitlogUseoDsync structure. +type FindConfigCommitlogUseoDsyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCommitlogUseoDsyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCommitlogUseODsyncOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCommitlogUseoDsyncDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCommitlogUseODsyncOK creates a FindConfigCommitlogUseODsyncOK with default headers values +func NewFindConfigCommitlogUseODsyncOK() *FindConfigCommitlogUseODsyncOK { + return &FindConfigCommitlogUseODsyncOK{} +} + +/*FindConfigCommitlogUseODsyncOK handles this case with default header values. + +Config value +*/ +type FindConfigCommitlogUseODsyncOK struct { + Payload bool +} + +func (o *FindConfigCommitlogUseODsyncOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCommitlogUseODsyncOK) 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 +} + +// NewFindConfigCommitlogUseoDsyncDefault creates a FindConfigCommitlogUseoDsyncDefault with default headers values +func NewFindConfigCommitlogUseoDsyncDefault(code int) *FindConfigCommitlogUseoDsyncDefault { + return &FindConfigCommitlogUseoDsyncDefault{ + _statusCode: code, + } +} + +/*FindConfigCommitlogUseoDsyncDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCommitlogUseoDsyncDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config commitlog use o dsync default response +func (o *FindConfigCommitlogUseoDsyncDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCommitlogUseoDsyncDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCommitlogUseoDsyncDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCommitlogUseoDsyncDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_parameters.go new file mode 100644 index 00000000000..90828168749 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionEnforceMinThresholdParams creates a new FindConfigCompactionEnforceMinThresholdParams object +// with the default values initialized. +func NewFindConfigCompactionEnforceMinThresholdParams() *FindConfigCompactionEnforceMinThresholdParams { + + return &FindConfigCompactionEnforceMinThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionEnforceMinThresholdParamsWithTimeout creates a new FindConfigCompactionEnforceMinThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionEnforceMinThresholdParamsWithTimeout(timeout time.Duration) *FindConfigCompactionEnforceMinThresholdParams { + + return &FindConfigCompactionEnforceMinThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionEnforceMinThresholdParamsWithContext creates a new FindConfigCompactionEnforceMinThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionEnforceMinThresholdParamsWithContext(ctx context.Context) *FindConfigCompactionEnforceMinThresholdParams { + + return &FindConfigCompactionEnforceMinThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionEnforceMinThresholdParamsWithHTTPClient creates a new FindConfigCompactionEnforceMinThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionEnforceMinThresholdParamsWithHTTPClient(client *http.Client) *FindConfigCompactionEnforceMinThresholdParams { + + return &FindConfigCompactionEnforceMinThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionEnforceMinThresholdParams contains all the parameters to send to the API endpoint +for the find config compaction enforce min threshold operation typically these are written to a http.Request +*/ +type FindConfigCompactionEnforceMinThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) WithTimeout(timeout time.Duration) *FindConfigCompactionEnforceMinThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) WithContext(ctx context.Context) *FindConfigCompactionEnforceMinThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) WithHTTPClient(client *http.Client) *FindConfigCompactionEnforceMinThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction enforce min threshold params +func (o *FindConfigCompactionEnforceMinThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionEnforceMinThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_responses.go new file mode 100644 index 00000000000..615f186a8e2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_enforce_min_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionEnforceMinThresholdReader is a Reader for the FindConfigCompactionEnforceMinThreshold structure. +type FindConfigCompactionEnforceMinThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionEnforceMinThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionEnforceMinThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionEnforceMinThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionEnforceMinThresholdOK creates a FindConfigCompactionEnforceMinThresholdOK with default headers values +func NewFindConfigCompactionEnforceMinThresholdOK() *FindConfigCompactionEnforceMinThresholdOK { + return &FindConfigCompactionEnforceMinThresholdOK{} +} + +/*FindConfigCompactionEnforceMinThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionEnforceMinThresholdOK struct { + Payload bool +} + +func (o *FindConfigCompactionEnforceMinThresholdOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCompactionEnforceMinThresholdOK) 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 +} + +// NewFindConfigCompactionEnforceMinThresholdDefault creates a FindConfigCompactionEnforceMinThresholdDefault with default headers values +func NewFindConfigCompactionEnforceMinThresholdDefault(code int) *FindConfigCompactionEnforceMinThresholdDefault { + return &FindConfigCompactionEnforceMinThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionEnforceMinThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionEnforceMinThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction enforce min threshold default response +func (o *FindConfigCompactionEnforceMinThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionEnforceMinThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionEnforceMinThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionEnforceMinThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_parameters.go new file mode 100644 index 00000000000..46dddd33cf5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionLargeCellWarningThresholdMbParams creates a new FindConfigCompactionLargeCellWarningThresholdMbParams object +// with the default values initialized. +func NewFindConfigCompactionLargeCellWarningThresholdMbParams() *FindConfigCompactionLargeCellWarningThresholdMbParams { + + return &FindConfigCompactionLargeCellWarningThresholdMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithTimeout creates a new FindConfigCompactionLargeCellWarningThresholdMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithTimeout(timeout time.Duration) *FindConfigCompactionLargeCellWarningThresholdMbParams { + + return &FindConfigCompactionLargeCellWarningThresholdMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithContext creates a new FindConfigCompactionLargeCellWarningThresholdMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithContext(ctx context.Context) *FindConfigCompactionLargeCellWarningThresholdMbParams { + + return &FindConfigCompactionLargeCellWarningThresholdMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithHTTPClient creates a new FindConfigCompactionLargeCellWarningThresholdMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionLargeCellWarningThresholdMbParamsWithHTTPClient(client *http.Client) *FindConfigCompactionLargeCellWarningThresholdMbParams { + + return &FindConfigCompactionLargeCellWarningThresholdMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionLargeCellWarningThresholdMbParams contains all the parameters to send to the API endpoint +for the find config compaction large cell warning threshold mb operation typically these are written to a http.Request +*/ +type FindConfigCompactionLargeCellWarningThresholdMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) WithTimeout(timeout time.Duration) *FindConfigCompactionLargeCellWarningThresholdMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) WithContext(ctx context.Context) *FindConfigCompactionLargeCellWarningThresholdMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) WithHTTPClient(client *http.Client) *FindConfigCompactionLargeCellWarningThresholdMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction large cell warning threshold mb params +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionLargeCellWarningThresholdMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_responses.go new file mode 100644 index 00000000000..d5c9759cba7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_cell_warning_threshold_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionLargeCellWarningThresholdMbReader is a Reader for the FindConfigCompactionLargeCellWarningThresholdMb structure. +type FindConfigCompactionLargeCellWarningThresholdMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionLargeCellWarningThresholdMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionLargeCellWarningThresholdMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionLargeCellWarningThresholdMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionLargeCellWarningThresholdMbOK creates a FindConfigCompactionLargeCellWarningThresholdMbOK with default headers values +func NewFindConfigCompactionLargeCellWarningThresholdMbOK() *FindConfigCompactionLargeCellWarningThresholdMbOK { + return &FindConfigCompactionLargeCellWarningThresholdMbOK{} +} + +/*FindConfigCompactionLargeCellWarningThresholdMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionLargeCellWarningThresholdMbOK struct { + Payload int64 +} + +func (o *FindConfigCompactionLargeCellWarningThresholdMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCompactionLargeCellWarningThresholdMbOK) 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 +} + +// NewFindConfigCompactionLargeCellWarningThresholdMbDefault creates a FindConfigCompactionLargeCellWarningThresholdMbDefault with default headers values +func NewFindConfigCompactionLargeCellWarningThresholdMbDefault(code int) *FindConfigCompactionLargeCellWarningThresholdMbDefault { + return &FindConfigCompactionLargeCellWarningThresholdMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionLargeCellWarningThresholdMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionLargeCellWarningThresholdMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction large cell warning threshold mb default response +func (o *FindConfigCompactionLargeCellWarningThresholdMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionLargeCellWarningThresholdMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionLargeCellWarningThresholdMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionLargeCellWarningThresholdMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_parameters.go new file mode 100644 index 00000000000..37178f33bd7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionLargePartitionWarningThresholdMbParams creates a new FindConfigCompactionLargePartitionWarningThresholdMbParams object +// with the default values initialized. +func NewFindConfigCompactionLargePartitionWarningThresholdMbParams() *FindConfigCompactionLargePartitionWarningThresholdMbParams { + + return &FindConfigCompactionLargePartitionWarningThresholdMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithTimeout creates a new FindConfigCompactionLargePartitionWarningThresholdMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithTimeout(timeout time.Duration) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + + return &FindConfigCompactionLargePartitionWarningThresholdMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithContext creates a new FindConfigCompactionLargePartitionWarningThresholdMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithContext(ctx context.Context) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + + return &FindConfigCompactionLargePartitionWarningThresholdMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithHTTPClient creates a new FindConfigCompactionLargePartitionWarningThresholdMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionLargePartitionWarningThresholdMbParamsWithHTTPClient(client *http.Client) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + + return &FindConfigCompactionLargePartitionWarningThresholdMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionLargePartitionWarningThresholdMbParams contains all the parameters to send to the API endpoint +for the find config compaction large partition warning threshold mb operation typically these are written to a http.Request +*/ +type FindConfigCompactionLargePartitionWarningThresholdMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) WithTimeout(timeout time.Duration) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) WithContext(ctx context.Context) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) WithHTTPClient(client *http.Client) *FindConfigCompactionLargePartitionWarningThresholdMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction large partition warning threshold mb params +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionLargePartitionWarningThresholdMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_responses.go new file mode 100644 index 00000000000..aabe286d29f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_partition_warning_threshold_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionLargePartitionWarningThresholdMbReader is a Reader for the FindConfigCompactionLargePartitionWarningThresholdMb structure. +type FindConfigCompactionLargePartitionWarningThresholdMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionLargePartitionWarningThresholdMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionLargePartitionWarningThresholdMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionLargePartitionWarningThresholdMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionLargePartitionWarningThresholdMbOK creates a FindConfigCompactionLargePartitionWarningThresholdMbOK with default headers values +func NewFindConfigCompactionLargePartitionWarningThresholdMbOK() *FindConfigCompactionLargePartitionWarningThresholdMbOK { + return &FindConfigCompactionLargePartitionWarningThresholdMbOK{} +} + +/*FindConfigCompactionLargePartitionWarningThresholdMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionLargePartitionWarningThresholdMbOK struct { + Payload int64 +} + +func (o *FindConfigCompactionLargePartitionWarningThresholdMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCompactionLargePartitionWarningThresholdMbOK) 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 +} + +// NewFindConfigCompactionLargePartitionWarningThresholdMbDefault creates a FindConfigCompactionLargePartitionWarningThresholdMbDefault with default headers values +func NewFindConfigCompactionLargePartitionWarningThresholdMbDefault(code int) *FindConfigCompactionLargePartitionWarningThresholdMbDefault { + return &FindConfigCompactionLargePartitionWarningThresholdMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionLargePartitionWarningThresholdMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionLargePartitionWarningThresholdMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction large partition warning threshold mb default response +func (o *FindConfigCompactionLargePartitionWarningThresholdMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionLargePartitionWarningThresholdMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionLargePartitionWarningThresholdMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionLargePartitionWarningThresholdMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_parameters.go new file mode 100644 index 00000000000..c8cc926761f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionLargeRowWarningThresholdMbParams creates a new FindConfigCompactionLargeRowWarningThresholdMbParams object +// with the default values initialized. +func NewFindConfigCompactionLargeRowWarningThresholdMbParams() *FindConfigCompactionLargeRowWarningThresholdMbParams { + + return &FindConfigCompactionLargeRowWarningThresholdMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithTimeout creates a new FindConfigCompactionLargeRowWarningThresholdMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithTimeout(timeout time.Duration) *FindConfigCompactionLargeRowWarningThresholdMbParams { + + return &FindConfigCompactionLargeRowWarningThresholdMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithContext creates a new FindConfigCompactionLargeRowWarningThresholdMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithContext(ctx context.Context) *FindConfigCompactionLargeRowWarningThresholdMbParams { + + return &FindConfigCompactionLargeRowWarningThresholdMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithHTTPClient creates a new FindConfigCompactionLargeRowWarningThresholdMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionLargeRowWarningThresholdMbParamsWithHTTPClient(client *http.Client) *FindConfigCompactionLargeRowWarningThresholdMbParams { + + return &FindConfigCompactionLargeRowWarningThresholdMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionLargeRowWarningThresholdMbParams contains all the parameters to send to the API endpoint +for the find config compaction large row warning threshold mb operation typically these are written to a http.Request +*/ +type FindConfigCompactionLargeRowWarningThresholdMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) WithTimeout(timeout time.Duration) *FindConfigCompactionLargeRowWarningThresholdMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) WithContext(ctx context.Context) *FindConfigCompactionLargeRowWarningThresholdMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) WithHTTPClient(client *http.Client) *FindConfigCompactionLargeRowWarningThresholdMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction large row warning threshold mb params +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionLargeRowWarningThresholdMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_responses.go new file mode 100644 index 00000000000..f230c7bdaf2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_large_row_warning_threshold_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionLargeRowWarningThresholdMbReader is a Reader for the FindConfigCompactionLargeRowWarningThresholdMb structure. +type FindConfigCompactionLargeRowWarningThresholdMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionLargeRowWarningThresholdMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionLargeRowWarningThresholdMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionLargeRowWarningThresholdMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionLargeRowWarningThresholdMbOK creates a FindConfigCompactionLargeRowWarningThresholdMbOK with default headers values +func NewFindConfigCompactionLargeRowWarningThresholdMbOK() *FindConfigCompactionLargeRowWarningThresholdMbOK { + return &FindConfigCompactionLargeRowWarningThresholdMbOK{} +} + +/*FindConfigCompactionLargeRowWarningThresholdMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionLargeRowWarningThresholdMbOK struct { + Payload int64 +} + +func (o *FindConfigCompactionLargeRowWarningThresholdMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCompactionLargeRowWarningThresholdMbOK) 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 +} + +// NewFindConfigCompactionLargeRowWarningThresholdMbDefault creates a FindConfigCompactionLargeRowWarningThresholdMbDefault with default headers values +func NewFindConfigCompactionLargeRowWarningThresholdMbDefault(code int) *FindConfigCompactionLargeRowWarningThresholdMbDefault { + return &FindConfigCompactionLargeRowWarningThresholdMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionLargeRowWarningThresholdMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionLargeRowWarningThresholdMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction large row warning threshold mb default response +func (o *FindConfigCompactionLargeRowWarningThresholdMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionLargeRowWarningThresholdMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionLargeRowWarningThresholdMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionLargeRowWarningThresholdMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_parameters.go new file mode 100644 index 00000000000..087e618c717 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionPreheatKeyCacheParams creates a new FindConfigCompactionPreheatKeyCacheParams object +// with the default values initialized. +func NewFindConfigCompactionPreheatKeyCacheParams() *FindConfigCompactionPreheatKeyCacheParams { + + return &FindConfigCompactionPreheatKeyCacheParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionPreheatKeyCacheParamsWithTimeout creates a new FindConfigCompactionPreheatKeyCacheParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionPreheatKeyCacheParamsWithTimeout(timeout time.Duration) *FindConfigCompactionPreheatKeyCacheParams { + + return &FindConfigCompactionPreheatKeyCacheParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionPreheatKeyCacheParamsWithContext creates a new FindConfigCompactionPreheatKeyCacheParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionPreheatKeyCacheParamsWithContext(ctx context.Context) *FindConfigCompactionPreheatKeyCacheParams { + + return &FindConfigCompactionPreheatKeyCacheParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionPreheatKeyCacheParamsWithHTTPClient creates a new FindConfigCompactionPreheatKeyCacheParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionPreheatKeyCacheParamsWithHTTPClient(client *http.Client) *FindConfigCompactionPreheatKeyCacheParams { + + return &FindConfigCompactionPreheatKeyCacheParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionPreheatKeyCacheParams contains all the parameters to send to the API endpoint +for the find config compaction preheat key cache operation typically these are written to a http.Request +*/ +type FindConfigCompactionPreheatKeyCacheParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) WithTimeout(timeout time.Duration) *FindConfigCompactionPreheatKeyCacheParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) WithContext(ctx context.Context) *FindConfigCompactionPreheatKeyCacheParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) WithHTTPClient(client *http.Client) *FindConfigCompactionPreheatKeyCacheParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction preheat key cache params +func (o *FindConfigCompactionPreheatKeyCacheParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionPreheatKeyCacheParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_responses.go new file mode 100644 index 00000000000..dba2475903f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_preheat_key_cache_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionPreheatKeyCacheReader is a Reader for the FindConfigCompactionPreheatKeyCache structure. +type FindConfigCompactionPreheatKeyCacheReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionPreheatKeyCacheReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionPreheatKeyCacheOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionPreheatKeyCacheDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionPreheatKeyCacheOK creates a FindConfigCompactionPreheatKeyCacheOK with default headers values +func NewFindConfigCompactionPreheatKeyCacheOK() *FindConfigCompactionPreheatKeyCacheOK { + return &FindConfigCompactionPreheatKeyCacheOK{} +} + +/*FindConfigCompactionPreheatKeyCacheOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionPreheatKeyCacheOK struct { + Payload bool +} + +func (o *FindConfigCompactionPreheatKeyCacheOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCompactionPreheatKeyCacheOK) 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 +} + +// NewFindConfigCompactionPreheatKeyCacheDefault creates a FindConfigCompactionPreheatKeyCacheDefault with default headers values +func NewFindConfigCompactionPreheatKeyCacheDefault(code int) *FindConfigCompactionPreheatKeyCacheDefault { + return &FindConfigCompactionPreheatKeyCacheDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionPreheatKeyCacheDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionPreheatKeyCacheDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction preheat key cache default response +func (o *FindConfigCompactionPreheatKeyCacheDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionPreheatKeyCacheDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionPreheatKeyCacheDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionPreheatKeyCacheDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_parameters.go new file mode 100644 index 00000000000..43eb3d58e49 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionRowsCountWarningThresholdParams creates a new FindConfigCompactionRowsCountWarningThresholdParams object +// with the default values initialized. +func NewFindConfigCompactionRowsCountWarningThresholdParams() *FindConfigCompactionRowsCountWarningThresholdParams { + + return &FindConfigCompactionRowsCountWarningThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionRowsCountWarningThresholdParamsWithTimeout creates a new FindConfigCompactionRowsCountWarningThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionRowsCountWarningThresholdParamsWithTimeout(timeout time.Duration) *FindConfigCompactionRowsCountWarningThresholdParams { + + return &FindConfigCompactionRowsCountWarningThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionRowsCountWarningThresholdParamsWithContext creates a new FindConfigCompactionRowsCountWarningThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionRowsCountWarningThresholdParamsWithContext(ctx context.Context) *FindConfigCompactionRowsCountWarningThresholdParams { + + return &FindConfigCompactionRowsCountWarningThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionRowsCountWarningThresholdParamsWithHTTPClient creates a new FindConfigCompactionRowsCountWarningThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionRowsCountWarningThresholdParamsWithHTTPClient(client *http.Client) *FindConfigCompactionRowsCountWarningThresholdParams { + + return &FindConfigCompactionRowsCountWarningThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionRowsCountWarningThresholdParams contains all the parameters to send to the API endpoint +for the find config compaction rows count warning threshold operation typically these are written to a http.Request +*/ +type FindConfigCompactionRowsCountWarningThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) WithTimeout(timeout time.Duration) *FindConfigCompactionRowsCountWarningThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) WithContext(ctx context.Context) *FindConfigCompactionRowsCountWarningThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) WithHTTPClient(client *http.Client) *FindConfigCompactionRowsCountWarningThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction rows count warning threshold params +func (o *FindConfigCompactionRowsCountWarningThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionRowsCountWarningThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_responses.go new file mode 100644 index 00000000000..fab791ce2e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_rows_count_warning_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionRowsCountWarningThresholdReader is a Reader for the FindConfigCompactionRowsCountWarningThreshold structure. +type FindConfigCompactionRowsCountWarningThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionRowsCountWarningThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionRowsCountWarningThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionRowsCountWarningThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionRowsCountWarningThresholdOK creates a FindConfigCompactionRowsCountWarningThresholdOK with default headers values +func NewFindConfigCompactionRowsCountWarningThresholdOK() *FindConfigCompactionRowsCountWarningThresholdOK { + return &FindConfigCompactionRowsCountWarningThresholdOK{} +} + +/*FindConfigCompactionRowsCountWarningThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionRowsCountWarningThresholdOK struct { + Payload int64 +} + +func (o *FindConfigCompactionRowsCountWarningThresholdOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCompactionRowsCountWarningThresholdOK) 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 +} + +// NewFindConfigCompactionRowsCountWarningThresholdDefault creates a FindConfigCompactionRowsCountWarningThresholdDefault with default headers values +func NewFindConfigCompactionRowsCountWarningThresholdDefault(code int) *FindConfigCompactionRowsCountWarningThresholdDefault { + return &FindConfigCompactionRowsCountWarningThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionRowsCountWarningThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionRowsCountWarningThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction rows count warning threshold default response +func (o *FindConfigCompactionRowsCountWarningThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionRowsCountWarningThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionRowsCountWarningThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionRowsCountWarningThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_parameters.go new file mode 100644 index 00000000000..bcdd36adc86 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionStaticSharesParams creates a new FindConfigCompactionStaticSharesParams object +// with the default values initialized. +func NewFindConfigCompactionStaticSharesParams() *FindConfigCompactionStaticSharesParams { + + return &FindConfigCompactionStaticSharesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionStaticSharesParamsWithTimeout creates a new FindConfigCompactionStaticSharesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionStaticSharesParamsWithTimeout(timeout time.Duration) *FindConfigCompactionStaticSharesParams { + + return &FindConfigCompactionStaticSharesParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionStaticSharesParamsWithContext creates a new FindConfigCompactionStaticSharesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionStaticSharesParamsWithContext(ctx context.Context) *FindConfigCompactionStaticSharesParams { + + return &FindConfigCompactionStaticSharesParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionStaticSharesParamsWithHTTPClient creates a new FindConfigCompactionStaticSharesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionStaticSharesParamsWithHTTPClient(client *http.Client) *FindConfigCompactionStaticSharesParams { + + return &FindConfigCompactionStaticSharesParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionStaticSharesParams contains all the parameters to send to the API endpoint +for the find config compaction static shares operation typically these are written to a http.Request +*/ +type FindConfigCompactionStaticSharesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) WithTimeout(timeout time.Duration) *FindConfigCompactionStaticSharesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) WithContext(ctx context.Context) *FindConfigCompactionStaticSharesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) WithHTTPClient(client *http.Client) *FindConfigCompactionStaticSharesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction static shares params +func (o *FindConfigCompactionStaticSharesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionStaticSharesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_responses.go new file mode 100644 index 00000000000..e367e109fb6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_static_shares_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionStaticSharesReader is a Reader for the FindConfigCompactionStaticShares structure. +type FindConfigCompactionStaticSharesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionStaticSharesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionStaticSharesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionStaticSharesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionStaticSharesOK creates a FindConfigCompactionStaticSharesOK with default headers values +func NewFindConfigCompactionStaticSharesOK() *FindConfigCompactionStaticSharesOK { + return &FindConfigCompactionStaticSharesOK{} +} + +/*FindConfigCompactionStaticSharesOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionStaticSharesOK struct { + Payload float64 +} + +func (o *FindConfigCompactionStaticSharesOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigCompactionStaticSharesOK) 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 +} + +// NewFindConfigCompactionStaticSharesDefault creates a FindConfigCompactionStaticSharesDefault with default headers values +func NewFindConfigCompactionStaticSharesDefault(code int) *FindConfigCompactionStaticSharesDefault { + return &FindConfigCompactionStaticSharesDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionStaticSharesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionStaticSharesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction static shares default response +func (o *FindConfigCompactionStaticSharesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionStaticSharesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionStaticSharesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionStaticSharesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_parameters.go new file mode 100644 index 00000000000..347981bcc96 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCompactionThroughputMbPerSecParams creates a new FindConfigCompactionThroughputMbPerSecParams object +// with the default values initialized. +func NewFindConfigCompactionThroughputMbPerSecParams() *FindConfigCompactionThroughputMbPerSecParams { + + return &FindConfigCompactionThroughputMbPerSecParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCompactionThroughputMbPerSecParamsWithTimeout creates a new FindConfigCompactionThroughputMbPerSecParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCompactionThroughputMbPerSecParamsWithTimeout(timeout time.Duration) *FindConfigCompactionThroughputMbPerSecParams { + + return &FindConfigCompactionThroughputMbPerSecParams{ + + timeout: timeout, + } +} + +// NewFindConfigCompactionThroughputMbPerSecParamsWithContext creates a new FindConfigCompactionThroughputMbPerSecParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCompactionThroughputMbPerSecParamsWithContext(ctx context.Context) *FindConfigCompactionThroughputMbPerSecParams { + + return &FindConfigCompactionThroughputMbPerSecParams{ + + Context: ctx, + } +} + +// NewFindConfigCompactionThroughputMbPerSecParamsWithHTTPClient creates a new FindConfigCompactionThroughputMbPerSecParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCompactionThroughputMbPerSecParamsWithHTTPClient(client *http.Client) *FindConfigCompactionThroughputMbPerSecParams { + + return &FindConfigCompactionThroughputMbPerSecParams{ + HTTPClient: client, + } +} + +/*FindConfigCompactionThroughputMbPerSecParams contains all the parameters to send to the API endpoint +for the find config compaction throughput mb per sec operation typically these are written to a http.Request +*/ +type FindConfigCompactionThroughputMbPerSecParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) WithTimeout(timeout time.Duration) *FindConfigCompactionThroughputMbPerSecParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) WithContext(ctx context.Context) *FindConfigCompactionThroughputMbPerSecParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) WithHTTPClient(client *http.Client) *FindConfigCompactionThroughputMbPerSecParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config compaction throughput mb per sec params +func (o *FindConfigCompactionThroughputMbPerSecParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCompactionThroughputMbPerSecParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_responses.go new file mode 100644 index 00000000000..85939594e08 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_compaction_throughput_mb_per_sec_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCompactionThroughputMbPerSecReader is a Reader for the FindConfigCompactionThroughputMbPerSec structure. +type FindConfigCompactionThroughputMbPerSecReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCompactionThroughputMbPerSecReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCompactionThroughputMbPerSecOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCompactionThroughputMbPerSecDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCompactionThroughputMbPerSecOK creates a FindConfigCompactionThroughputMbPerSecOK with default headers values +func NewFindConfigCompactionThroughputMbPerSecOK() *FindConfigCompactionThroughputMbPerSecOK { + return &FindConfigCompactionThroughputMbPerSecOK{} +} + +/*FindConfigCompactionThroughputMbPerSecOK handles this case with default header values. + +Config value +*/ +type FindConfigCompactionThroughputMbPerSecOK struct { + Payload int64 +} + +func (o *FindConfigCompactionThroughputMbPerSecOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCompactionThroughputMbPerSecOK) 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 +} + +// NewFindConfigCompactionThroughputMbPerSecDefault creates a FindConfigCompactionThroughputMbPerSecDefault with default headers values +func NewFindConfigCompactionThroughputMbPerSecDefault(code int) *FindConfigCompactionThroughputMbPerSecDefault { + return &FindConfigCompactionThroughputMbPerSecDefault{ + _statusCode: code, + } +} + +/*FindConfigCompactionThroughputMbPerSecDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCompactionThroughputMbPerSecDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config compaction throughput mb per sec default response +func (o *FindConfigCompactionThroughputMbPerSecDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCompactionThroughputMbPerSecDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCompactionThroughputMbPerSecDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCompactionThroughputMbPerSecDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_parameters.go new file mode 100644 index 00000000000..ce9ab02b0ca --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigConcurrentCompactorsParams creates a new FindConfigConcurrentCompactorsParams object +// with the default values initialized. +func NewFindConfigConcurrentCompactorsParams() *FindConfigConcurrentCompactorsParams { + + return &FindConfigConcurrentCompactorsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigConcurrentCompactorsParamsWithTimeout creates a new FindConfigConcurrentCompactorsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigConcurrentCompactorsParamsWithTimeout(timeout time.Duration) *FindConfigConcurrentCompactorsParams { + + return &FindConfigConcurrentCompactorsParams{ + + timeout: timeout, + } +} + +// NewFindConfigConcurrentCompactorsParamsWithContext creates a new FindConfigConcurrentCompactorsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigConcurrentCompactorsParamsWithContext(ctx context.Context) *FindConfigConcurrentCompactorsParams { + + return &FindConfigConcurrentCompactorsParams{ + + Context: ctx, + } +} + +// NewFindConfigConcurrentCompactorsParamsWithHTTPClient creates a new FindConfigConcurrentCompactorsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigConcurrentCompactorsParamsWithHTTPClient(client *http.Client) *FindConfigConcurrentCompactorsParams { + + return &FindConfigConcurrentCompactorsParams{ + HTTPClient: client, + } +} + +/*FindConfigConcurrentCompactorsParams contains all the parameters to send to the API endpoint +for the find config concurrent compactors operation typically these are written to a http.Request +*/ +type FindConfigConcurrentCompactorsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) WithTimeout(timeout time.Duration) *FindConfigConcurrentCompactorsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) WithContext(ctx context.Context) *FindConfigConcurrentCompactorsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) WithHTTPClient(client *http.Client) *FindConfigConcurrentCompactorsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config concurrent compactors params +func (o *FindConfigConcurrentCompactorsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigConcurrentCompactorsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_responses.go new file mode 100644 index 00000000000..19f234b87ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_compactors_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigConcurrentCompactorsReader is a Reader for the FindConfigConcurrentCompactors structure. +type FindConfigConcurrentCompactorsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigConcurrentCompactorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigConcurrentCompactorsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigConcurrentCompactorsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigConcurrentCompactorsOK creates a FindConfigConcurrentCompactorsOK with default headers values +func NewFindConfigConcurrentCompactorsOK() *FindConfigConcurrentCompactorsOK { + return &FindConfigConcurrentCompactorsOK{} +} + +/*FindConfigConcurrentCompactorsOK handles this case with default header values. + +Config value +*/ +type FindConfigConcurrentCompactorsOK struct { + Payload int64 +} + +func (o *FindConfigConcurrentCompactorsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigConcurrentCompactorsOK) 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 +} + +// NewFindConfigConcurrentCompactorsDefault creates a FindConfigConcurrentCompactorsDefault with default headers values +func NewFindConfigConcurrentCompactorsDefault(code int) *FindConfigConcurrentCompactorsDefault { + return &FindConfigConcurrentCompactorsDefault{ + _statusCode: code, + } +} + +/*FindConfigConcurrentCompactorsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigConcurrentCompactorsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config concurrent compactors default response +func (o *FindConfigConcurrentCompactorsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigConcurrentCompactorsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigConcurrentCompactorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigConcurrentCompactorsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_parameters.go new file mode 100644 index 00000000000..2c06f54f1bb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigConcurrentCounterWritesParams creates a new FindConfigConcurrentCounterWritesParams object +// with the default values initialized. +func NewFindConfigConcurrentCounterWritesParams() *FindConfigConcurrentCounterWritesParams { + + return &FindConfigConcurrentCounterWritesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigConcurrentCounterWritesParamsWithTimeout creates a new FindConfigConcurrentCounterWritesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigConcurrentCounterWritesParamsWithTimeout(timeout time.Duration) *FindConfigConcurrentCounterWritesParams { + + return &FindConfigConcurrentCounterWritesParams{ + + timeout: timeout, + } +} + +// NewFindConfigConcurrentCounterWritesParamsWithContext creates a new FindConfigConcurrentCounterWritesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigConcurrentCounterWritesParamsWithContext(ctx context.Context) *FindConfigConcurrentCounterWritesParams { + + return &FindConfigConcurrentCounterWritesParams{ + + Context: ctx, + } +} + +// NewFindConfigConcurrentCounterWritesParamsWithHTTPClient creates a new FindConfigConcurrentCounterWritesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigConcurrentCounterWritesParamsWithHTTPClient(client *http.Client) *FindConfigConcurrentCounterWritesParams { + + return &FindConfigConcurrentCounterWritesParams{ + HTTPClient: client, + } +} + +/*FindConfigConcurrentCounterWritesParams contains all the parameters to send to the API endpoint +for the find config concurrent counter writes operation typically these are written to a http.Request +*/ +type FindConfigConcurrentCounterWritesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) WithTimeout(timeout time.Duration) *FindConfigConcurrentCounterWritesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) WithContext(ctx context.Context) *FindConfigConcurrentCounterWritesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) WithHTTPClient(client *http.Client) *FindConfigConcurrentCounterWritesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config concurrent counter writes params +func (o *FindConfigConcurrentCounterWritesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigConcurrentCounterWritesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_responses.go new file mode 100644 index 00000000000..f5f90d3d770 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_counter_writes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigConcurrentCounterWritesReader is a Reader for the FindConfigConcurrentCounterWrites structure. +type FindConfigConcurrentCounterWritesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigConcurrentCounterWritesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigConcurrentCounterWritesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigConcurrentCounterWritesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigConcurrentCounterWritesOK creates a FindConfigConcurrentCounterWritesOK with default headers values +func NewFindConfigConcurrentCounterWritesOK() *FindConfigConcurrentCounterWritesOK { + return &FindConfigConcurrentCounterWritesOK{} +} + +/*FindConfigConcurrentCounterWritesOK handles this case with default header values. + +Config value +*/ +type FindConfigConcurrentCounterWritesOK struct { + Payload int64 +} + +func (o *FindConfigConcurrentCounterWritesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigConcurrentCounterWritesOK) 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 +} + +// NewFindConfigConcurrentCounterWritesDefault creates a FindConfigConcurrentCounterWritesDefault with default headers values +func NewFindConfigConcurrentCounterWritesDefault(code int) *FindConfigConcurrentCounterWritesDefault { + return &FindConfigConcurrentCounterWritesDefault{ + _statusCode: code, + } +} + +/*FindConfigConcurrentCounterWritesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigConcurrentCounterWritesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config concurrent counter writes default response +func (o *FindConfigConcurrentCounterWritesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigConcurrentCounterWritesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigConcurrentCounterWritesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigConcurrentCounterWritesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_parameters.go new file mode 100644 index 00000000000..0b03770144d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigConcurrentReadsParams creates a new FindConfigConcurrentReadsParams object +// with the default values initialized. +func NewFindConfigConcurrentReadsParams() *FindConfigConcurrentReadsParams { + + return &FindConfigConcurrentReadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigConcurrentReadsParamsWithTimeout creates a new FindConfigConcurrentReadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigConcurrentReadsParamsWithTimeout(timeout time.Duration) *FindConfigConcurrentReadsParams { + + return &FindConfigConcurrentReadsParams{ + + timeout: timeout, + } +} + +// NewFindConfigConcurrentReadsParamsWithContext creates a new FindConfigConcurrentReadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigConcurrentReadsParamsWithContext(ctx context.Context) *FindConfigConcurrentReadsParams { + + return &FindConfigConcurrentReadsParams{ + + Context: ctx, + } +} + +// NewFindConfigConcurrentReadsParamsWithHTTPClient creates a new FindConfigConcurrentReadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigConcurrentReadsParamsWithHTTPClient(client *http.Client) *FindConfigConcurrentReadsParams { + + return &FindConfigConcurrentReadsParams{ + HTTPClient: client, + } +} + +/*FindConfigConcurrentReadsParams contains all the parameters to send to the API endpoint +for the find config concurrent reads operation typically these are written to a http.Request +*/ +type FindConfigConcurrentReadsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) WithTimeout(timeout time.Duration) *FindConfigConcurrentReadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) WithContext(ctx context.Context) *FindConfigConcurrentReadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) WithHTTPClient(client *http.Client) *FindConfigConcurrentReadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config concurrent reads params +func (o *FindConfigConcurrentReadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigConcurrentReadsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_responses.go new file mode 100644 index 00000000000..f416c0b30db --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_reads_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigConcurrentReadsReader is a Reader for the FindConfigConcurrentReads structure. +type FindConfigConcurrentReadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigConcurrentReadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigConcurrentReadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigConcurrentReadsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigConcurrentReadsOK creates a FindConfigConcurrentReadsOK with default headers values +func NewFindConfigConcurrentReadsOK() *FindConfigConcurrentReadsOK { + return &FindConfigConcurrentReadsOK{} +} + +/*FindConfigConcurrentReadsOK handles this case with default header values. + +Config value +*/ +type FindConfigConcurrentReadsOK struct { + Payload int64 +} + +func (o *FindConfigConcurrentReadsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigConcurrentReadsOK) 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 +} + +// NewFindConfigConcurrentReadsDefault creates a FindConfigConcurrentReadsDefault with default headers values +func NewFindConfigConcurrentReadsDefault(code int) *FindConfigConcurrentReadsDefault { + return &FindConfigConcurrentReadsDefault{ + _statusCode: code, + } +} + +/*FindConfigConcurrentReadsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigConcurrentReadsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config concurrent reads default response +func (o *FindConfigConcurrentReadsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigConcurrentReadsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigConcurrentReadsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigConcurrentReadsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_parameters.go new file mode 100644 index 00000000000..1b761c520d5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigConcurrentWritesParams creates a new FindConfigConcurrentWritesParams object +// with the default values initialized. +func NewFindConfigConcurrentWritesParams() *FindConfigConcurrentWritesParams { + + return &FindConfigConcurrentWritesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigConcurrentWritesParamsWithTimeout creates a new FindConfigConcurrentWritesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigConcurrentWritesParamsWithTimeout(timeout time.Duration) *FindConfigConcurrentWritesParams { + + return &FindConfigConcurrentWritesParams{ + + timeout: timeout, + } +} + +// NewFindConfigConcurrentWritesParamsWithContext creates a new FindConfigConcurrentWritesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigConcurrentWritesParamsWithContext(ctx context.Context) *FindConfigConcurrentWritesParams { + + return &FindConfigConcurrentWritesParams{ + + Context: ctx, + } +} + +// NewFindConfigConcurrentWritesParamsWithHTTPClient creates a new FindConfigConcurrentWritesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigConcurrentWritesParamsWithHTTPClient(client *http.Client) *FindConfigConcurrentWritesParams { + + return &FindConfigConcurrentWritesParams{ + HTTPClient: client, + } +} + +/*FindConfigConcurrentWritesParams contains all the parameters to send to the API endpoint +for the find config concurrent writes operation typically these are written to a http.Request +*/ +type FindConfigConcurrentWritesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) WithTimeout(timeout time.Duration) *FindConfigConcurrentWritesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) WithContext(ctx context.Context) *FindConfigConcurrentWritesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) WithHTTPClient(client *http.Client) *FindConfigConcurrentWritesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config concurrent writes params +func (o *FindConfigConcurrentWritesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigConcurrentWritesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_responses.go new file mode 100644 index 00000000000..40ed57e308f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_concurrent_writes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigConcurrentWritesReader is a Reader for the FindConfigConcurrentWrites structure. +type FindConfigConcurrentWritesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigConcurrentWritesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigConcurrentWritesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigConcurrentWritesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigConcurrentWritesOK creates a FindConfigConcurrentWritesOK with default headers values +func NewFindConfigConcurrentWritesOK() *FindConfigConcurrentWritesOK { + return &FindConfigConcurrentWritesOK{} +} + +/*FindConfigConcurrentWritesOK handles this case with default header values. + +Config value +*/ +type FindConfigConcurrentWritesOK struct { + Payload int64 +} + +func (o *FindConfigConcurrentWritesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigConcurrentWritesOK) 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 +} + +// NewFindConfigConcurrentWritesDefault creates a FindConfigConcurrentWritesDefault with default headers values +func NewFindConfigConcurrentWritesDefault(code int) *FindConfigConcurrentWritesDefault { + return &FindConfigConcurrentWritesDefault{ + _statusCode: code, + } +} + +/*FindConfigConcurrentWritesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigConcurrentWritesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config concurrent writes default response +func (o *FindConfigConcurrentWritesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigConcurrentWritesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigConcurrentWritesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigConcurrentWritesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_parameters.go new file mode 100644 index 00000000000..3053a67c495 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigConsistentRangemovementParams creates a new FindConfigConsistentRangemovementParams object +// with the default values initialized. +func NewFindConfigConsistentRangemovementParams() *FindConfigConsistentRangemovementParams { + + return &FindConfigConsistentRangemovementParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigConsistentRangemovementParamsWithTimeout creates a new FindConfigConsistentRangemovementParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigConsistentRangemovementParamsWithTimeout(timeout time.Duration) *FindConfigConsistentRangemovementParams { + + return &FindConfigConsistentRangemovementParams{ + + timeout: timeout, + } +} + +// NewFindConfigConsistentRangemovementParamsWithContext creates a new FindConfigConsistentRangemovementParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigConsistentRangemovementParamsWithContext(ctx context.Context) *FindConfigConsistentRangemovementParams { + + return &FindConfigConsistentRangemovementParams{ + + Context: ctx, + } +} + +// NewFindConfigConsistentRangemovementParamsWithHTTPClient creates a new FindConfigConsistentRangemovementParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigConsistentRangemovementParamsWithHTTPClient(client *http.Client) *FindConfigConsistentRangemovementParams { + + return &FindConfigConsistentRangemovementParams{ + HTTPClient: client, + } +} + +/*FindConfigConsistentRangemovementParams contains all the parameters to send to the API endpoint +for the find config consistent rangemovement operation typically these are written to a http.Request +*/ +type FindConfigConsistentRangemovementParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) WithTimeout(timeout time.Duration) *FindConfigConsistentRangemovementParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) WithContext(ctx context.Context) *FindConfigConsistentRangemovementParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) WithHTTPClient(client *http.Client) *FindConfigConsistentRangemovementParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config consistent rangemovement params +func (o *FindConfigConsistentRangemovementParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigConsistentRangemovementParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_responses.go new file mode 100644 index 00000000000..c693ab6c4e1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_consistent_rangemovement_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigConsistentRangemovementReader is a Reader for the FindConfigConsistentRangemovement structure. +type FindConfigConsistentRangemovementReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigConsistentRangemovementReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigConsistentRangemovementOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigConsistentRangemovementDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigConsistentRangemovementOK creates a FindConfigConsistentRangemovementOK with default headers values +func NewFindConfigConsistentRangemovementOK() *FindConfigConsistentRangemovementOK { + return &FindConfigConsistentRangemovementOK{} +} + +/*FindConfigConsistentRangemovementOK handles this case with default header values. + +Config value +*/ +type FindConfigConsistentRangemovementOK struct { + Payload bool +} + +func (o *FindConfigConsistentRangemovementOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigConsistentRangemovementOK) 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 +} + +// NewFindConfigConsistentRangemovementDefault creates a FindConfigConsistentRangemovementDefault with default headers values +func NewFindConfigConsistentRangemovementDefault(code int) *FindConfigConsistentRangemovementDefault { + return &FindConfigConsistentRangemovementDefault{ + _statusCode: code, + } +} + +/*FindConfigConsistentRangemovementDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigConsistentRangemovementDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config consistent rangemovement default response +func (o *FindConfigConsistentRangemovementDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigConsistentRangemovementDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigConsistentRangemovementDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigConsistentRangemovementDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_parameters.go new file mode 100644 index 00000000000..b57ffde99fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCounterCacheKeysToSaveParams creates a new FindConfigCounterCacheKeysToSaveParams object +// with the default values initialized. +func NewFindConfigCounterCacheKeysToSaveParams() *FindConfigCounterCacheKeysToSaveParams { + + return &FindConfigCounterCacheKeysToSaveParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCounterCacheKeysToSaveParamsWithTimeout creates a new FindConfigCounterCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCounterCacheKeysToSaveParamsWithTimeout(timeout time.Duration) *FindConfigCounterCacheKeysToSaveParams { + + return &FindConfigCounterCacheKeysToSaveParams{ + + timeout: timeout, + } +} + +// NewFindConfigCounterCacheKeysToSaveParamsWithContext creates a new FindConfigCounterCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCounterCacheKeysToSaveParamsWithContext(ctx context.Context) *FindConfigCounterCacheKeysToSaveParams { + + return &FindConfigCounterCacheKeysToSaveParams{ + + Context: ctx, + } +} + +// NewFindConfigCounterCacheKeysToSaveParamsWithHTTPClient creates a new FindConfigCounterCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCounterCacheKeysToSaveParamsWithHTTPClient(client *http.Client) *FindConfigCounterCacheKeysToSaveParams { + + return &FindConfigCounterCacheKeysToSaveParams{ + HTTPClient: client, + } +} + +/*FindConfigCounterCacheKeysToSaveParams contains all the parameters to send to the API endpoint +for the find config counter cache keys to save operation typically these are written to a http.Request +*/ +type FindConfigCounterCacheKeysToSaveParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) WithTimeout(timeout time.Duration) *FindConfigCounterCacheKeysToSaveParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) WithContext(ctx context.Context) *FindConfigCounterCacheKeysToSaveParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) WithHTTPClient(client *http.Client) *FindConfigCounterCacheKeysToSaveParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config counter cache keys to save params +func (o *FindConfigCounterCacheKeysToSaveParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCounterCacheKeysToSaveParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_responses.go new file mode 100644 index 00000000000..ebe25410625 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_keys_to_save_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCounterCacheKeysToSaveReader is a Reader for the FindConfigCounterCacheKeysToSave structure. +type FindConfigCounterCacheKeysToSaveReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCounterCacheKeysToSaveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCounterCacheKeysToSaveOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCounterCacheKeysToSaveDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCounterCacheKeysToSaveOK creates a FindConfigCounterCacheKeysToSaveOK with default headers values +func NewFindConfigCounterCacheKeysToSaveOK() *FindConfigCounterCacheKeysToSaveOK { + return &FindConfigCounterCacheKeysToSaveOK{} +} + +/*FindConfigCounterCacheKeysToSaveOK handles this case with default header values. + +Config value +*/ +type FindConfigCounterCacheKeysToSaveOK struct { + Payload int64 +} + +func (o *FindConfigCounterCacheKeysToSaveOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCounterCacheKeysToSaveOK) 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 +} + +// NewFindConfigCounterCacheKeysToSaveDefault creates a FindConfigCounterCacheKeysToSaveDefault with default headers values +func NewFindConfigCounterCacheKeysToSaveDefault(code int) *FindConfigCounterCacheKeysToSaveDefault { + return &FindConfigCounterCacheKeysToSaveDefault{ + _statusCode: code, + } +} + +/*FindConfigCounterCacheKeysToSaveDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCounterCacheKeysToSaveDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config counter cache keys to save default response +func (o *FindConfigCounterCacheKeysToSaveDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCounterCacheKeysToSaveDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCounterCacheKeysToSaveDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCounterCacheKeysToSaveDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_parameters.go new file mode 100644 index 00000000000..b71c9301719 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCounterCacheSavePeriodParams creates a new FindConfigCounterCacheSavePeriodParams object +// with the default values initialized. +func NewFindConfigCounterCacheSavePeriodParams() *FindConfigCounterCacheSavePeriodParams { + + return &FindConfigCounterCacheSavePeriodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCounterCacheSavePeriodParamsWithTimeout creates a new FindConfigCounterCacheSavePeriodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCounterCacheSavePeriodParamsWithTimeout(timeout time.Duration) *FindConfigCounterCacheSavePeriodParams { + + return &FindConfigCounterCacheSavePeriodParams{ + + timeout: timeout, + } +} + +// NewFindConfigCounterCacheSavePeriodParamsWithContext creates a new FindConfigCounterCacheSavePeriodParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCounterCacheSavePeriodParamsWithContext(ctx context.Context) *FindConfigCounterCacheSavePeriodParams { + + return &FindConfigCounterCacheSavePeriodParams{ + + Context: ctx, + } +} + +// NewFindConfigCounterCacheSavePeriodParamsWithHTTPClient creates a new FindConfigCounterCacheSavePeriodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCounterCacheSavePeriodParamsWithHTTPClient(client *http.Client) *FindConfigCounterCacheSavePeriodParams { + + return &FindConfigCounterCacheSavePeriodParams{ + HTTPClient: client, + } +} + +/*FindConfigCounterCacheSavePeriodParams contains all the parameters to send to the API endpoint +for the find config counter cache save period operation typically these are written to a http.Request +*/ +type FindConfigCounterCacheSavePeriodParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) WithTimeout(timeout time.Duration) *FindConfigCounterCacheSavePeriodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) WithContext(ctx context.Context) *FindConfigCounterCacheSavePeriodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) WithHTTPClient(client *http.Client) *FindConfigCounterCacheSavePeriodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config counter cache save period params +func (o *FindConfigCounterCacheSavePeriodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCounterCacheSavePeriodParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_responses.go new file mode 100644 index 00000000000..1bd692f96c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_save_period_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCounterCacheSavePeriodReader is a Reader for the FindConfigCounterCacheSavePeriod structure. +type FindConfigCounterCacheSavePeriodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCounterCacheSavePeriodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCounterCacheSavePeriodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCounterCacheSavePeriodDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCounterCacheSavePeriodOK creates a FindConfigCounterCacheSavePeriodOK with default headers values +func NewFindConfigCounterCacheSavePeriodOK() *FindConfigCounterCacheSavePeriodOK { + return &FindConfigCounterCacheSavePeriodOK{} +} + +/*FindConfigCounterCacheSavePeriodOK handles this case with default header values. + +Config value +*/ +type FindConfigCounterCacheSavePeriodOK struct { + Payload int64 +} + +func (o *FindConfigCounterCacheSavePeriodOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCounterCacheSavePeriodOK) 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 +} + +// NewFindConfigCounterCacheSavePeriodDefault creates a FindConfigCounterCacheSavePeriodDefault with default headers values +func NewFindConfigCounterCacheSavePeriodDefault(code int) *FindConfigCounterCacheSavePeriodDefault { + return &FindConfigCounterCacheSavePeriodDefault{ + _statusCode: code, + } +} + +/*FindConfigCounterCacheSavePeriodDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCounterCacheSavePeriodDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config counter cache save period default response +func (o *FindConfigCounterCacheSavePeriodDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCounterCacheSavePeriodDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCounterCacheSavePeriodDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCounterCacheSavePeriodDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_parameters.go new file mode 100644 index 00000000000..19be58354b6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCounterCacheSizeInMbParams creates a new FindConfigCounterCacheSizeInMbParams object +// with the default values initialized. +func NewFindConfigCounterCacheSizeInMbParams() *FindConfigCounterCacheSizeInMbParams { + + return &FindConfigCounterCacheSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCounterCacheSizeInMbParamsWithTimeout creates a new FindConfigCounterCacheSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCounterCacheSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigCounterCacheSizeInMbParams { + + return &FindConfigCounterCacheSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigCounterCacheSizeInMbParamsWithContext creates a new FindConfigCounterCacheSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCounterCacheSizeInMbParamsWithContext(ctx context.Context) *FindConfigCounterCacheSizeInMbParams { + + return &FindConfigCounterCacheSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigCounterCacheSizeInMbParamsWithHTTPClient creates a new FindConfigCounterCacheSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCounterCacheSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigCounterCacheSizeInMbParams { + + return &FindConfigCounterCacheSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigCounterCacheSizeInMbParams contains all the parameters to send to the API endpoint +for the find config counter cache size in mb operation typically these are written to a http.Request +*/ +type FindConfigCounterCacheSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigCounterCacheSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) WithContext(ctx context.Context) *FindConfigCounterCacheSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigCounterCacheSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config counter cache size in mb params +func (o *FindConfigCounterCacheSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCounterCacheSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_responses.go new file mode 100644 index 00000000000..cdcb8b6a4ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_cache_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCounterCacheSizeInMbReader is a Reader for the FindConfigCounterCacheSizeInMb structure. +type FindConfigCounterCacheSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCounterCacheSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCounterCacheSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCounterCacheSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCounterCacheSizeInMbOK creates a FindConfigCounterCacheSizeInMbOK with default headers values +func NewFindConfigCounterCacheSizeInMbOK() *FindConfigCounterCacheSizeInMbOK { + return &FindConfigCounterCacheSizeInMbOK{} +} + +/*FindConfigCounterCacheSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigCounterCacheSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigCounterCacheSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCounterCacheSizeInMbOK) 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 +} + +// NewFindConfigCounterCacheSizeInMbDefault creates a FindConfigCounterCacheSizeInMbDefault with default headers values +func NewFindConfigCounterCacheSizeInMbDefault(code int) *FindConfigCounterCacheSizeInMbDefault { + return &FindConfigCounterCacheSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigCounterCacheSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCounterCacheSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config counter cache size in mb default response +func (o *FindConfigCounterCacheSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCounterCacheSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCounterCacheSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCounterCacheSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..3e1ccd6be34 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCounterWriteRequestTimeoutInMsParams creates a new FindConfigCounterWriteRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigCounterWriteRequestTimeoutInMsParams() *FindConfigCounterWriteRequestTimeoutInMsParams { + + return &FindConfigCounterWriteRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCounterWriteRequestTimeoutInMsParamsWithTimeout creates a new FindConfigCounterWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCounterWriteRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigCounterWriteRequestTimeoutInMsParams { + + return &FindConfigCounterWriteRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigCounterWriteRequestTimeoutInMsParamsWithContext creates a new FindConfigCounterWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCounterWriteRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigCounterWriteRequestTimeoutInMsParams { + + return &FindConfigCounterWriteRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigCounterWriteRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigCounterWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCounterWriteRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigCounterWriteRequestTimeoutInMsParams { + + return &FindConfigCounterWriteRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigCounterWriteRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config counter write request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigCounterWriteRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigCounterWriteRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigCounterWriteRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigCounterWriteRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config counter write request timeout in ms params +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCounterWriteRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..978fc5c14e5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_counter_write_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCounterWriteRequestTimeoutInMsReader is a Reader for the FindConfigCounterWriteRequestTimeoutInMs structure. +type FindConfigCounterWriteRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCounterWriteRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCounterWriteRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCounterWriteRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCounterWriteRequestTimeoutInMsOK creates a FindConfigCounterWriteRequestTimeoutInMsOK with default headers values +func NewFindConfigCounterWriteRequestTimeoutInMsOK() *FindConfigCounterWriteRequestTimeoutInMsOK { + return &FindConfigCounterWriteRequestTimeoutInMsOK{} +} + +/*FindConfigCounterWriteRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigCounterWriteRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigCounterWriteRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigCounterWriteRequestTimeoutInMsOK) 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 +} + +// NewFindConfigCounterWriteRequestTimeoutInMsDefault creates a FindConfigCounterWriteRequestTimeoutInMsDefault with default headers values +func NewFindConfigCounterWriteRequestTimeoutInMsDefault(code int) *FindConfigCounterWriteRequestTimeoutInMsDefault { + return &FindConfigCounterWriteRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigCounterWriteRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCounterWriteRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config counter write request timeout in ms default response +func (o *FindConfigCounterWriteRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCounterWriteRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCounterWriteRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCounterWriteRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_parameters.go new file mode 100644 index 00000000000..58ab66c86fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCPUSchedulerParams creates a new FindConfigCPUSchedulerParams object +// with the default values initialized. +func NewFindConfigCPUSchedulerParams() *FindConfigCPUSchedulerParams { + + return &FindConfigCPUSchedulerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCPUSchedulerParamsWithTimeout creates a new FindConfigCPUSchedulerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCPUSchedulerParamsWithTimeout(timeout time.Duration) *FindConfigCPUSchedulerParams { + + return &FindConfigCPUSchedulerParams{ + + timeout: timeout, + } +} + +// NewFindConfigCPUSchedulerParamsWithContext creates a new FindConfigCPUSchedulerParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCPUSchedulerParamsWithContext(ctx context.Context) *FindConfigCPUSchedulerParams { + + return &FindConfigCPUSchedulerParams{ + + Context: ctx, + } +} + +// NewFindConfigCPUSchedulerParamsWithHTTPClient creates a new FindConfigCPUSchedulerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCPUSchedulerParamsWithHTTPClient(client *http.Client) *FindConfigCPUSchedulerParams { + + return &FindConfigCPUSchedulerParams{ + HTTPClient: client, + } +} + +/*FindConfigCPUSchedulerParams contains all the parameters to send to the API endpoint +for the find config cpu scheduler operation typically these are written to a http.Request +*/ +type FindConfigCPUSchedulerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) WithTimeout(timeout time.Duration) *FindConfigCPUSchedulerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) WithContext(ctx context.Context) *FindConfigCPUSchedulerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) WithHTTPClient(client *http.Client) *FindConfigCPUSchedulerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config cpu scheduler params +func (o *FindConfigCPUSchedulerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCPUSchedulerParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_responses.go new file mode 100644 index 00000000000..a75064ac926 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cpu_scheduler_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCPUSchedulerReader is a Reader for the FindConfigCPUScheduler structure. +type FindConfigCPUSchedulerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCPUSchedulerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCPUSchedulerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCPUSchedulerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCPUSchedulerOK creates a FindConfigCPUSchedulerOK with default headers values +func NewFindConfigCPUSchedulerOK() *FindConfigCPUSchedulerOK { + return &FindConfigCPUSchedulerOK{} +} + +/*FindConfigCPUSchedulerOK handles this case with default header values. + +Config value +*/ +type FindConfigCPUSchedulerOK struct { + Payload bool +} + +func (o *FindConfigCPUSchedulerOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCPUSchedulerOK) 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 +} + +// NewFindConfigCPUSchedulerDefault creates a FindConfigCPUSchedulerDefault with default headers values +func NewFindConfigCPUSchedulerDefault(code int) *FindConfigCPUSchedulerDefault { + return &FindConfigCPUSchedulerDefault{ + _statusCode: code, + } +} + +/*FindConfigCPUSchedulerDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCPUSchedulerDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config cpu scheduler default response +func (o *FindConfigCPUSchedulerDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCPUSchedulerDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCPUSchedulerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCPUSchedulerDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_parameters.go new file mode 100644 index 00000000000..721e8322ea6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigCrossNodeTimeoutParams creates a new FindConfigCrossNodeTimeoutParams object +// with the default values initialized. +func NewFindConfigCrossNodeTimeoutParams() *FindConfigCrossNodeTimeoutParams { + + return &FindConfigCrossNodeTimeoutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigCrossNodeTimeoutParamsWithTimeout creates a new FindConfigCrossNodeTimeoutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigCrossNodeTimeoutParamsWithTimeout(timeout time.Duration) *FindConfigCrossNodeTimeoutParams { + + return &FindConfigCrossNodeTimeoutParams{ + + timeout: timeout, + } +} + +// NewFindConfigCrossNodeTimeoutParamsWithContext creates a new FindConfigCrossNodeTimeoutParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigCrossNodeTimeoutParamsWithContext(ctx context.Context) *FindConfigCrossNodeTimeoutParams { + + return &FindConfigCrossNodeTimeoutParams{ + + Context: ctx, + } +} + +// NewFindConfigCrossNodeTimeoutParamsWithHTTPClient creates a new FindConfigCrossNodeTimeoutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigCrossNodeTimeoutParamsWithHTTPClient(client *http.Client) *FindConfigCrossNodeTimeoutParams { + + return &FindConfigCrossNodeTimeoutParams{ + HTTPClient: client, + } +} + +/*FindConfigCrossNodeTimeoutParams contains all the parameters to send to the API endpoint +for the find config cross node timeout operation typically these are written to a http.Request +*/ +type FindConfigCrossNodeTimeoutParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) WithTimeout(timeout time.Duration) *FindConfigCrossNodeTimeoutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) WithContext(ctx context.Context) *FindConfigCrossNodeTimeoutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) WithHTTPClient(client *http.Client) *FindConfigCrossNodeTimeoutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config cross node timeout params +func (o *FindConfigCrossNodeTimeoutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigCrossNodeTimeoutParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_responses.go new file mode 100644 index 00000000000..85454bffdd9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_cross_node_timeout_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigCrossNodeTimeoutReader is a Reader for the FindConfigCrossNodeTimeout structure. +type FindConfigCrossNodeTimeoutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigCrossNodeTimeoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigCrossNodeTimeoutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigCrossNodeTimeoutDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigCrossNodeTimeoutOK creates a FindConfigCrossNodeTimeoutOK with default headers values +func NewFindConfigCrossNodeTimeoutOK() *FindConfigCrossNodeTimeoutOK { + return &FindConfigCrossNodeTimeoutOK{} +} + +/*FindConfigCrossNodeTimeoutOK handles this case with default header values. + +Config value +*/ +type FindConfigCrossNodeTimeoutOK struct { + Payload bool +} + +func (o *FindConfigCrossNodeTimeoutOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigCrossNodeTimeoutOK) 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 +} + +// NewFindConfigCrossNodeTimeoutDefault creates a FindConfigCrossNodeTimeoutDefault with default headers values +func NewFindConfigCrossNodeTimeoutDefault(code int) *FindConfigCrossNodeTimeoutDefault { + return &FindConfigCrossNodeTimeoutDefault{ + _statusCode: code, + } +} + +/*FindConfigCrossNodeTimeoutDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigCrossNodeTimeoutDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config cross node timeout default response +func (o *FindConfigCrossNodeTimeoutDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigCrossNodeTimeoutDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigCrossNodeTimeoutDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigCrossNodeTimeoutDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_parameters.go new file mode 100644 index 00000000000..229689bc96f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDataFileDirectoriesParams creates a new FindConfigDataFileDirectoriesParams object +// with the default values initialized. +func NewFindConfigDataFileDirectoriesParams() *FindConfigDataFileDirectoriesParams { + + return &FindConfigDataFileDirectoriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDataFileDirectoriesParamsWithTimeout creates a new FindConfigDataFileDirectoriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDataFileDirectoriesParamsWithTimeout(timeout time.Duration) *FindConfigDataFileDirectoriesParams { + + return &FindConfigDataFileDirectoriesParams{ + + timeout: timeout, + } +} + +// NewFindConfigDataFileDirectoriesParamsWithContext creates a new FindConfigDataFileDirectoriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDataFileDirectoriesParamsWithContext(ctx context.Context) *FindConfigDataFileDirectoriesParams { + + return &FindConfigDataFileDirectoriesParams{ + + Context: ctx, + } +} + +// NewFindConfigDataFileDirectoriesParamsWithHTTPClient creates a new FindConfigDataFileDirectoriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDataFileDirectoriesParamsWithHTTPClient(client *http.Client) *FindConfigDataFileDirectoriesParams { + + return &FindConfigDataFileDirectoriesParams{ + HTTPClient: client, + } +} + +/*FindConfigDataFileDirectoriesParams contains all the parameters to send to the API endpoint +for the find config data file directories operation typically these are written to a http.Request +*/ +type FindConfigDataFileDirectoriesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) WithTimeout(timeout time.Duration) *FindConfigDataFileDirectoriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) WithContext(ctx context.Context) *FindConfigDataFileDirectoriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) WithHTTPClient(client *http.Client) *FindConfigDataFileDirectoriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config data file directories params +func (o *FindConfigDataFileDirectoriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDataFileDirectoriesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_responses.go new file mode 100644 index 00000000000..b4dc92dc70a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_data_file_directories_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDataFileDirectoriesReader is a Reader for the FindConfigDataFileDirectories structure. +type FindConfigDataFileDirectoriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDataFileDirectoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDataFileDirectoriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDataFileDirectoriesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDataFileDirectoriesOK creates a FindConfigDataFileDirectoriesOK with default headers values +func NewFindConfigDataFileDirectoriesOK() *FindConfigDataFileDirectoriesOK { + return &FindConfigDataFileDirectoriesOK{} +} + +/*FindConfigDataFileDirectoriesOK handles this case with default header values. + +Config value +*/ +type FindConfigDataFileDirectoriesOK struct { + Payload []string +} + +func (o *FindConfigDataFileDirectoriesOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigDataFileDirectoriesOK) 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 +} + +// NewFindConfigDataFileDirectoriesDefault creates a FindConfigDataFileDirectoriesDefault with default headers values +func NewFindConfigDataFileDirectoriesDefault(code int) *FindConfigDataFileDirectoriesDefault { + return &FindConfigDataFileDirectoriesDefault{ + _statusCode: code, + } +} + +/*FindConfigDataFileDirectoriesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDataFileDirectoriesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config data file directories default response +func (o *FindConfigDataFileDirectoriesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDataFileDirectoriesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDataFileDirectoriesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDataFileDirectoriesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_parameters.go new file mode 100644 index 00000000000..7cc1f93c606 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDefaultLogLevelParams creates a new FindConfigDefaultLogLevelParams object +// with the default values initialized. +func NewFindConfigDefaultLogLevelParams() *FindConfigDefaultLogLevelParams { + + return &FindConfigDefaultLogLevelParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDefaultLogLevelParamsWithTimeout creates a new FindConfigDefaultLogLevelParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDefaultLogLevelParamsWithTimeout(timeout time.Duration) *FindConfigDefaultLogLevelParams { + + return &FindConfigDefaultLogLevelParams{ + + timeout: timeout, + } +} + +// NewFindConfigDefaultLogLevelParamsWithContext creates a new FindConfigDefaultLogLevelParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDefaultLogLevelParamsWithContext(ctx context.Context) *FindConfigDefaultLogLevelParams { + + return &FindConfigDefaultLogLevelParams{ + + Context: ctx, + } +} + +// NewFindConfigDefaultLogLevelParamsWithHTTPClient creates a new FindConfigDefaultLogLevelParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDefaultLogLevelParamsWithHTTPClient(client *http.Client) *FindConfigDefaultLogLevelParams { + + return &FindConfigDefaultLogLevelParams{ + HTTPClient: client, + } +} + +/*FindConfigDefaultLogLevelParams contains all the parameters to send to the API endpoint +for the find config default log level operation typically these are written to a http.Request +*/ +type FindConfigDefaultLogLevelParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) WithTimeout(timeout time.Duration) *FindConfigDefaultLogLevelParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) WithContext(ctx context.Context) *FindConfigDefaultLogLevelParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) WithHTTPClient(client *http.Client) *FindConfigDefaultLogLevelParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config default log level params +func (o *FindConfigDefaultLogLevelParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDefaultLogLevelParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_responses.go new file mode 100644 index 00000000000..e315221dd62 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_default_log_level_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDefaultLogLevelReader is a Reader for the FindConfigDefaultLogLevel structure. +type FindConfigDefaultLogLevelReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDefaultLogLevelReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDefaultLogLevelOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDefaultLogLevelDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDefaultLogLevelOK creates a FindConfigDefaultLogLevelOK with default headers values +func NewFindConfigDefaultLogLevelOK() *FindConfigDefaultLogLevelOK { + return &FindConfigDefaultLogLevelOK{} +} + +/*FindConfigDefaultLogLevelOK handles this case with default header values. + +Config value +*/ +type FindConfigDefaultLogLevelOK struct { + Payload string +} + +func (o *FindConfigDefaultLogLevelOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigDefaultLogLevelOK) 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 +} + +// NewFindConfigDefaultLogLevelDefault creates a FindConfigDefaultLogLevelDefault with default headers values +func NewFindConfigDefaultLogLevelDefault(code int) *FindConfigDefaultLogLevelDefault { + return &FindConfigDefaultLogLevelDefault{ + _statusCode: code, + } +} + +/*FindConfigDefaultLogLevelDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDefaultLogLevelDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config default log level default response +func (o *FindConfigDefaultLogLevelDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDefaultLogLevelDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDefaultLogLevelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDefaultLogLevelDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_parameters.go new file mode 100644 index 00000000000..a9bd74e0b9c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDefragmentMemoryOnIdleParams creates a new FindConfigDefragmentMemoryOnIdleParams object +// with the default values initialized. +func NewFindConfigDefragmentMemoryOnIdleParams() *FindConfigDefragmentMemoryOnIdleParams { + + return &FindConfigDefragmentMemoryOnIdleParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDefragmentMemoryOnIdleParamsWithTimeout creates a new FindConfigDefragmentMemoryOnIdleParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDefragmentMemoryOnIdleParamsWithTimeout(timeout time.Duration) *FindConfigDefragmentMemoryOnIdleParams { + + return &FindConfigDefragmentMemoryOnIdleParams{ + + timeout: timeout, + } +} + +// NewFindConfigDefragmentMemoryOnIdleParamsWithContext creates a new FindConfigDefragmentMemoryOnIdleParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDefragmentMemoryOnIdleParamsWithContext(ctx context.Context) *FindConfigDefragmentMemoryOnIdleParams { + + return &FindConfigDefragmentMemoryOnIdleParams{ + + Context: ctx, + } +} + +// NewFindConfigDefragmentMemoryOnIdleParamsWithHTTPClient creates a new FindConfigDefragmentMemoryOnIdleParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDefragmentMemoryOnIdleParamsWithHTTPClient(client *http.Client) *FindConfigDefragmentMemoryOnIdleParams { + + return &FindConfigDefragmentMemoryOnIdleParams{ + HTTPClient: client, + } +} + +/*FindConfigDefragmentMemoryOnIdleParams contains all the parameters to send to the API endpoint +for the find config defragment memory on idle operation typically these are written to a http.Request +*/ +type FindConfigDefragmentMemoryOnIdleParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) WithTimeout(timeout time.Duration) *FindConfigDefragmentMemoryOnIdleParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) WithContext(ctx context.Context) *FindConfigDefragmentMemoryOnIdleParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) WithHTTPClient(client *http.Client) *FindConfigDefragmentMemoryOnIdleParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config defragment memory on idle params +func (o *FindConfigDefragmentMemoryOnIdleParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDefragmentMemoryOnIdleParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_responses.go new file mode 100644 index 00000000000..33332833fc1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_defragment_memory_on_idle_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDefragmentMemoryOnIdleReader is a Reader for the FindConfigDefragmentMemoryOnIdle structure. +type FindConfigDefragmentMemoryOnIdleReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDefragmentMemoryOnIdleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDefragmentMemoryOnIdleOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDefragmentMemoryOnIdleDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDefragmentMemoryOnIdleOK creates a FindConfigDefragmentMemoryOnIdleOK with default headers values +func NewFindConfigDefragmentMemoryOnIdleOK() *FindConfigDefragmentMemoryOnIdleOK { + return &FindConfigDefragmentMemoryOnIdleOK{} +} + +/*FindConfigDefragmentMemoryOnIdleOK handles this case with default header values. + +Config value +*/ +type FindConfigDefragmentMemoryOnIdleOK struct { + Payload bool +} + +func (o *FindConfigDefragmentMemoryOnIdleOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigDefragmentMemoryOnIdleOK) 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 +} + +// NewFindConfigDefragmentMemoryOnIdleDefault creates a FindConfigDefragmentMemoryOnIdleDefault with default headers values +func NewFindConfigDefragmentMemoryOnIdleDefault(code int) *FindConfigDefragmentMemoryOnIdleDefault { + return &FindConfigDefragmentMemoryOnIdleDefault{ + _statusCode: code, + } +} + +/*FindConfigDefragmentMemoryOnIdleDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDefragmentMemoryOnIdleDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config defragment memory on idle default response +func (o *FindConfigDefragmentMemoryOnIdleDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDefragmentMemoryOnIdleDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDefragmentMemoryOnIdleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDefragmentMemoryOnIdleDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_parameters.go new file mode 100644 index 00000000000..70beb95e3c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDeveloperModeParams creates a new FindConfigDeveloperModeParams object +// with the default values initialized. +func NewFindConfigDeveloperModeParams() *FindConfigDeveloperModeParams { + + return &FindConfigDeveloperModeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDeveloperModeParamsWithTimeout creates a new FindConfigDeveloperModeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDeveloperModeParamsWithTimeout(timeout time.Duration) *FindConfigDeveloperModeParams { + + return &FindConfigDeveloperModeParams{ + + timeout: timeout, + } +} + +// NewFindConfigDeveloperModeParamsWithContext creates a new FindConfigDeveloperModeParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDeveloperModeParamsWithContext(ctx context.Context) *FindConfigDeveloperModeParams { + + return &FindConfigDeveloperModeParams{ + + Context: ctx, + } +} + +// NewFindConfigDeveloperModeParamsWithHTTPClient creates a new FindConfigDeveloperModeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDeveloperModeParamsWithHTTPClient(client *http.Client) *FindConfigDeveloperModeParams { + + return &FindConfigDeveloperModeParams{ + HTTPClient: client, + } +} + +/*FindConfigDeveloperModeParams contains all the parameters to send to the API endpoint +for the find config developer mode operation typically these are written to a http.Request +*/ +type FindConfigDeveloperModeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config developer mode params +func (o *FindConfigDeveloperModeParams) WithTimeout(timeout time.Duration) *FindConfigDeveloperModeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config developer mode params +func (o *FindConfigDeveloperModeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config developer mode params +func (o *FindConfigDeveloperModeParams) WithContext(ctx context.Context) *FindConfigDeveloperModeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config developer mode params +func (o *FindConfigDeveloperModeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config developer mode params +func (o *FindConfigDeveloperModeParams) WithHTTPClient(client *http.Client) *FindConfigDeveloperModeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config developer mode params +func (o *FindConfigDeveloperModeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDeveloperModeParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_responses.go new file mode 100644 index 00000000000..de5ab17d3c8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_developer_mode_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDeveloperModeReader is a Reader for the FindConfigDeveloperMode structure. +type FindConfigDeveloperModeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDeveloperModeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDeveloperModeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDeveloperModeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDeveloperModeOK creates a FindConfigDeveloperModeOK with default headers values +func NewFindConfigDeveloperModeOK() *FindConfigDeveloperModeOK { + return &FindConfigDeveloperModeOK{} +} + +/*FindConfigDeveloperModeOK handles this case with default header values. + +Config value +*/ +type FindConfigDeveloperModeOK struct { + Payload bool +} + +func (o *FindConfigDeveloperModeOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigDeveloperModeOK) 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 +} + +// NewFindConfigDeveloperModeDefault creates a FindConfigDeveloperModeDefault with default headers values +func NewFindConfigDeveloperModeDefault(code int) *FindConfigDeveloperModeDefault { + return &FindConfigDeveloperModeDefault{ + _statusCode: code, + } +} + +/*FindConfigDeveloperModeDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDeveloperModeDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config developer mode default response +func (o *FindConfigDeveloperModeDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDeveloperModeDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDeveloperModeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDeveloperModeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_parameters.go new file mode 100644 index 00000000000..5f1c15c7b69 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDiskFailurePolicyParams creates a new FindConfigDiskFailurePolicyParams object +// with the default values initialized. +func NewFindConfigDiskFailurePolicyParams() *FindConfigDiskFailurePolicyParams { + + return &FindConfigDiskFailurePolicyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDiskFailurePolicyParamsWithTimeout creates a new FindConfigDiskFailurePolicyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDiskFailurePolicyParamsWithTimeout(timeout time.Duration) *FindConfigDiskFailurePolicyParams { + + return &FindConfigDiskFailurePolicyParams{ + + timeout: timeout, + } +} + +// NewFindConfigDiskFailurePolicyParamsWithContext creates a new FindConfigDiskFailurePolicyParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDiskFailurePolicyParamsWithContext(ctx context.Context) *FindConfigDiskFailurePolicyParams { + + return &FindConfigDiskFailurePolicyParams{ + + Context: ctx, + } +} + +// NewFindConfigDiskFailurePolicyParamsWithHTTPClient creates a new FindConfigDiskFailurePolicyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDiskFailurePolicyParamsWithHTTPClient(client *http.Client) *FindConfigDiskFailurePolicyParams { + + return &FindConfigDiskFailurePolicyParams{ + HTTPClient: client, + } +} + +/*FindConfigDiskFailurePolicyParams contains all the parameters to send to the API endpoint +for the find config disk failure policy operation typically these are written to a http.Request +*/ +type FindConfigDiskFailurePolicyParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) WithTimeout(timeout time.Duration) *FindConfigDiskFailurePolicyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) WithContext(ctx context.Context) *FindConfigDiskFailurePolicyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) WithHTTPClient(client *http.Client) *FindConfigDiskFailurePolicyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config disk failure policy params +func (o *FindConfigDiskFailurePolicyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDiskFailurePolicyParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_responses.go new file mode 100644 index 00000000000..58528961412 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_disk_failure_policy_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDiskFailurePolicyReader is a Reader for the FindConfigDiskFailurePolicy structure. +type FindConfigDiskFailurePolicyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDiskFailurePolicyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDiskFailurePolicyOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDiskFailurePolicyDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDiskFailurePolicyOK creates a FindConfigDiskFailurePolicyOK with default headers values +func NewFindConfigDiskFailurePolicyOK() *FindConfigDiskFailurePolicyOK { + return &FindConfigDiskFailurePolicyOK{} +} + +/*FindConfigDiskFailurePolicyOK handles this case with default header values. + +Config value +*/ +type FindConfigDiskFailurePolicyOK struct { + Payload string +} + +func (o *FindConfigDiskFailurePolicyOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigDiskFailurePolicyOK) 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 +} + +// NewFindConfigDiskFailurePolicyDefault creates a FindConfigDiskFailurePolicyDefault with default headers values +func NewFindConfigDiskFailurePolicyDefault(code int) *FindConfigDiskFailurePolicyDefault { + return &FindConfigDiskFailurePolicyDefault{ + _statusCode: code, + } +} + +/*FindConfigDiskFailurePolicyDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDiskFailurePolicyDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config disk failure policy default response +func (o *FindConfigDiskFailurePolicyDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDiskFailurePolicyDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDiskFailurePolicyDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDiskFailurePolicyDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_parameters.go new file mode 100644 index 00000000000..b9c4340dfe5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDynamicSnitchBadnessThresholdParams creates a new FindConfigDynamicSnitchBadnessThresholdParams object +// with the default values initialized. +func NewFindConfigDynamicSnitchBadnessThresholdParams() *FindConfigDynamicSnitchBadnessThresholdParams { + + return &FindConfigDynamicSnitchBadnessThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDynamicSnitchBadnessThresholdParamsWithTimeout creates a new FindConfigDynamicSnitchBadnessThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDynamicSnitchBadnessThresholdParamsWithTimeout(timeout time.Duration) *FindConfigDynamicSnitchBadnessThresholdParams { + + return &FindConfigDynamicSnitchBadnessThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigDynamicSnitchBadnessThresholdParamsWithContext creates a new FindConfigDynamicSnitchBadnessThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDynamicSnitchBadnessThresholdParamsWithContext(ctx context.Context) *FindConfigDynamicSnitchBadnessThresholdParams { + + return &FindConfigDynamicSnitchBadnessThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigDynamicSnitchBadnessThresholdParamsWithHTTPClient creates a new FindConfigDynamicSnitchBadnessThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDynamicSnitchBadnessThresholdParamsWithHTTPClient(client *http.Client) *FindConfigDynamicSnitchBadnessThresholdParams { + + return &FindConfigDynamicSnitchBadnessThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigDynamicSnitchBadnessThresholdParams contains all the parameters to send to the API endpoint +for the find config dynamic snitch badness threshold operation typically these are written to a http.Request +*/ +type FindConfigDynamicSnitchBadnessThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) WithTimeout(timeout time.Duration) *FindConfigDynamicSnitchBadnessThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) WithContext(ctx context.Context) *FindConfigDynamicSnitchBadnessThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) WithHTTPClient(client *http.Client) *FindConfigDynamicSnitchBadnessThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config dynamic snitch badness threshold params +func (o *FindConfigDynamicSnitchBadnessThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDynamicSnitchBadnessThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_responses.go new file mode 100644 index 00000000000..b49917d35f3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_badness_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDynamicSnitchBadnessThresholdReader is a Reader for the FindConfigDynamicSnitchBadnessThreshold structure. +type FindConfigDynamicSnitchBadnessThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDynamicSnitchBadnessThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDynamicSnitchBadnessThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDynamicSnitchBadnessThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDynamicSnitchBadnessThresholdOK creates a FindConfigDynamicSnitchBadnessThresholdOK with default headers values +func NewFindConfigDynamicSnitchBadnessThresholdOK() *FindConfigDynamicSnitchBadnessThresholdOK { + return &FindConfigDynamicSnitchBadnessThresholdOK{} +} + +/*FindConfigDynamicSnitchBadnessThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigDynamicSnitchBadnessThresholdOK struct { + Payload float64 +} + +func (o *FindConfigDynamicSnitchBadnessThresholdOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigDynamicSnitchBadnessThresholdOK) 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 +} + +// NewFindConfigDynamicSnitchBadnessThresholdDefault creates a FindConfigDynamicSnitchBadnessThresholdDefault with default headers values +func NewFindConfigDynamicSnitchBadnessThresholdDefault(code int) *FindConfigDynamicSnitchBadnessThresholdDefault { + return &FindConfigDynamicSnitchBadnessThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigDynamicSnitchBadnessThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDynamicSnitchBadnessThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config dynamic snitch badness threshold default response +func (o *FindConfigDynamicSnitchBadnessThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDynamicSnitchBadnessThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDynamicSnitchBadnessThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDynamicSnitchBadnessThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_parameters.go new file mode 100644 index 00000000000..235e2f02f7a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDynamicSnitchResetIntervalInMsParams creates a new FindConfigDynamicSnitchResetIntervalInMsParams object +// with the default values initialized. +func NewFindConfigDynamicSnitchResetIntervalInMsParams() *FindConfigDynamicSnitchResetIntervalInMsParams { + + return &FindConfigDynamicSnitchResetIntervalInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDynamicSnitchResetIntervalInMsParamsWithTimeout creates a new FindConfigDynamicSnitchResetIntervalInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDynamicSnitchResetIntervalInMsParamsWithTimeout(timeout time.Duration) *FindConfigDynamicSnitchResetIntervalInMsParams { + + return &FindConfigDynamicSnitchResetIntervalInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigDynamicSnitchResetIntervalInMsParamsWithContext creates a new FindConfigDynamicSnitchResetIntervalInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDynamicSnitchResetIntervalInMsParamsWithContext(ctx context.Context) *FindConfigDynamicSnitchResetIntervalInMsParams { + + return &FindConfigDynamicSnitchResetIntervalInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigDynamicSnitchResetIntervalInMsParamsWithHTTPClient creates a new FindConfigDynamicSnitchResetIntervalInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDynamicSnitchResetIntervalInMsParamsWithHTTPClient(client *http.Client) *FindConfigDynamicSnitchResetIntervalInMsParams { + + return &FindConfigDynamicSnitchResetIntervalInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigDynamicSnitchResetIntervalInMsParams contains all the parameters to send to the API endpoint +for the find config dynamic snitch reset interval in ms operation typically these are written to a http.Request +*/ +type FindConfigDynamicSnitchResetIntervalInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) WithTimeout(timeout time.Duration) *FindConfigDynamicSnitchResetIntervalInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) WithContext(ctx context.Context) *FindConfigDynamicSnitchResetIntervalInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) WithHTTPClient(client *http.Client) *FindConfigDynamicSnitchResetIntervalInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config dynamic snitch reset interval in ms params +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDynamicSnitchResetIntervalInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_responses.go new file mode 100644 index 00000000000..d1c6f1c0c46 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_reset_interval_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDynamicSnitchResetIntervalInMsReader is a Reader for the FindConfigDynamicSnitchResetIntervalInMs structure. +type FindConfigDynamicSnitchResetIntervalInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDynamicSnitchResetIntervalInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDynamicSnitchResetIntervalInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDynamicSnitchResetIntervalInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDynamicSnitchResetIntervalInMsOK creates a FindConfigDynamicSnitchResetIntervalInMsOK with default headers values +func NewFindConfigDynamicSnitchResetIntervalInMsOK() *FindConfigDynamicSnitchResetIntervalInMsOK { + return &FindConfigDynamicSnitchResetIntervalInMsOK{} +} + +/*FindConfigDynamicSnitchResetIntervalInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigDynamicSnitchResetIntervalInMsOK struct { + Payload int64 +} + +func (o *FindConfigDynamicSnitchResetIntervalInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigDynamicSnitchResetIntervalInMsOK) 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 +} + +// NewFindConfigDynamicSnitchResetIntervalInMsDefault creates a FindConfigDynamicSnitchResetIntervalInMsDefault with default headers values +func NewFindConfigDynamicSnitchResetIntervalInMsDefault(code int) *FindConfigDynamicSnitchResetIntervalInMsDefault { + return &FindConfigDynamicSnitchResetIntervalInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigDynamicSnitchResetIntervalInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDynamicSnitchResetIntervalInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config dynamic snitch reset interval in ms default response +func (o *FindConfigDynamicSnitchResetIntervalInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDynamicSnitchResetIntervalInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDynamicSnitchResetIntervalInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDynamicSnitchResetIntervalInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_parameters.go new file mode 100644 index 00000000000..37f896870e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigDynamicSnitchUpdateIntervalInMsParams creates a new FindConfigDynamicSnitchUpdateIntervalInMsParams object +// with the default values initialized. +func NewFindConfigDynamicSnitchUpdateIntervalInMsParams() *FindConfigDynamicSnitchUpdateIntervalInMsParams { + + return &FindConfigDynamicSnitchUpdateIntervalInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithTimeout creates a new FindConfigDynamicSnitchUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithTimeout(timeout time.Duration) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + + return &FindConfigDynamicSnitchUpdateIntervalInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithContext creates a new FindConfigDynamicSnitchUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithContext(ctx context.Context) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + + return &FindConfigDynamicSnitchUpdateIntervalInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithHTTPClient creates a new FindConfigDynamicSnitchUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigDynamicSnitchUpdateIntervalInMsParamsWithHTTPClient(client *http.Client) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + + return &FindConfigDynamicSnitchUpdateIntervalInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigDynamicSnitchUpdateIntervalInMsParams contains all the parameters to send to the API endpoint +for the find config dynamic snitch update interval in ms operation typically these are written to a http.Request +*/ +type FindConfigDynamicSnitchUpdateIntervalInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) WithTimeout(timeout time.Duration) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) WithContext(ctx context.Context) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) WithHTTPClient(client *http.Client) *FindConfigDynamicSnitchUpdateIntervalInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config dynamic snitch update interval in ms params +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigDynamicSnitchUpdateIntervalInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_responses.go new file mode 100644 index 00000000000..6d46a59a026 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_dynamic_snitch_update_interval_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigDynamicSnitchUpdateIntervalInMsReader is a Reader for the FindConfigDynamicSnitchUpdateIntervalInMs structure. +type FindConfigDynamicSnitchUpdateIntervalInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigDynamicSnitchUpdateIntervalInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigDynamicSnitchUpdateIntervalInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigDynamicSnitchUpdateIntervalInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigDynamicSnitchUpdateIntervalInMsOK creates a FindConfigDynamicSnitchUpdateIntervalInMsOK with default headers values +func NewFindConfigDynamicSnitchUpdateIntervalInMsOK() *FindConfigDynamicSnitchUpdateIntervalInMsOK { + return &FindConfigDynamicSnitchUpdateIntervalInMsOK{} +} + +/*FindConfigDynamicSnitchUpdateIntervalInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigDynamicSnitchUpdateIntervalInMsOK struct { + Payload int64 +} + +func (o *FindConfigDynamicSnitchUpdateIntervalInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigDynamicSnitchUpdateIntervalInMsOK) 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 +} + +// NewFindConfigDynamicSnitchUpdateIntervalInMsDefault creates a FindConfigDynamicSnitchUpdateIntervalInMsDefault with default headers values +func NewFindConfigDynamicSnitchUpdateIntervalInMsDefault(code int) *FindConfigDynamicSnitchUpdateIntervalInMsDefault { + return &FindConfigDynamicSnitchUpdateIntervalInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigDynamicSnitchUpdateIntervalInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigDynamicSnitchUpdateIntervalInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config dynamic snitch update interval in ms default response +func (o *FindConfigDynamicSnitchUpdateIntervalInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigDynamicSnitchUpdateIntervalInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigDynamicSnitchUpdateIntervalInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigDynamicSnitchUpdateIntervalInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_parameters.go new file mode 100644 index 00000000000..d629d20e3f4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableCacheParams creates a new FindConfigEnableCacheParams object +// with the default values initialized. +func NewFindConfigEnableCacheParams() *FindConfigEnableCacheParams { + + return &FindConfigEnableCacheParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableCacheParamsWithTimeout creates a new FindConfigEnableCacheParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableCacheParamsWithTimeout(timeout time.Duration) *FindConfigEnableCacheParams { + + return &FindConfigEnableCacheParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableCacheParamsWithContext creates a new FindConfigEnableCacheParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableCacheParamsWithContext(ctx context.Context) *FindConfigEnableCacheParams { + + return &FindConfigEnableCacheParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableCacheParamsWithHTTPClient creates a new FindConfigEnableCacheParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableCacheParamsWithHTTPClient(client *http.Client) *FindConfigEnableCacheParams { + + return &FindConfigEnableCacheParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableCacheParams contains all the parameters to send to the API endpoint +for the find config enable cache operation typically these are written to a http.Request +*/ +type FindConfigEnableCacheParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable cache params +func (o *FindConfigEnableCacheParams) WithTimeout(timeout time.Duration) *FindConfigEnableCacheParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable cache params +func (o *FindConfigEnableCacheParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable cache params +func (o *FindConfigEnableCacheParams) WithContext(ctx context.Context) *FindConfigEnableCacheParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable cache params +func (o *FindConfigEnableCacheParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable cache params +func (o *FindConfigEnableCacheParams) WithHTTPClient(client *http.Client) *FindConfigEnableCacheParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable cache params +func (o *FindConfigEnableCacheParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableCacheParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_responses.go new file mode 100644 index 00000000000..da40a13815a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_cache_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableCacheReader is a Reader for the FindConfigEnableCache structure. +type FindConfigEnableCacheReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableCacheReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableCacheOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableCacheDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableCacheOK creates a FindConfigEnableCacheOK with default headers values +func NewFindConfigEnableCacheOK() *FindConfigEnableCacheOK { + return &FindConfigEnableCacheOK{} +} + +/*FindConfigEnableCacheOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableCacheOK struct { + Payload bool +} + +func (o *FindConfigEnableCacheOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableCacheOK) 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 +} + +// NewFindConfigEnableCacheDefault creates a FindConfigEnableCacheDefault with default headers values +func NewFindConfigEnableCacheDefault(code int) *FindConfigEnableCacheDefault { + return &FindConfigEnableCacheDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableCacheDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableCacheDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable cache default response +func (o *FindConfigEnableCacheDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableCacheDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableCacheDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableCacheDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_parameters.go new file mode 100644 index 00000000000..4f096adff99 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableCommitlogParams creates a new FindConfigEnableCommitlogParams object +// with the default values initialized. +func NewFindConfigEnableCommitlogParams() *FindConfigEnableCommitlogParams { + + return &FindConfigEnableCommitlogParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableCommitlogParamsWithTimeout creates a new FindConfigEnableCommitlogParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableCommitlogParamsWithTimeout(timeout time.Duration) *FindConfigEnableCommitlogParams { + + return &FindConfigEnableCommitlogParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableCommitlogParamsWithContext creates a new FindConfigEnableCommitlogParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableCommitlogParamsWithContext(ctx context.Context) *FindConfigEnableCommitlogParams { + + return &FindConfigEnableCommitlogParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableCommitlogParamsWithHTTPClient creates a new FindConfigEnableCommitlogParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableCommitlogParamsWithHTTPClient(client *http.Client) *FindConfigEnableCommitlogParams { + + return &FindConfigEnableCommitlogParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableCommitlogParams contains all the parameters to send to the API endpoint +for the find config enable commitlog operation typically these are written to a http.Request +*/ +type FindConfigEnableCommitlogParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) WithTimeout(timeout time.Duration) *FindConfigEnableCommitlogParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) WithContext(ctx context.Context) *FindConfigEnableCommitlogParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) WithHTTPClient(client *http.Client) *FindConfigEnableCommitlogParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable commitlog params +func (o *FindConfigEnableCommitlogParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableCommitlogParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_responses.go new file mode 100644 index 00000000000..c71253a6921 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_commitlog_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableCommitlogReader is a Reader for the FindConfigEnableCommitlog structure. +type FindConfigEnableCommitlogReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableCommitlogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableCommitlogOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableCommitlogDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableCommitlogOK creates a FindConfigEnableCommitlogOK with default headers values +func NewFindConfigEnableCommitlogOK() *FindConfigEnableCommitlogOK { + return &FindConfigEnableCommitlogOK{} +} + +/*FindConfigEnableCommitlogOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableCommitlogOK struct { + Payload bool +} + +func (o *FindConfigEnableCommitlogOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableCommitlogOK) 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 +} + +// NewFindConfigEnableCommitlogDefault creates a FindConfigEnableCommitlogDefault with default headers values +func NewFindConfigEnableCommitlogDefault(code int) *FindConfigEnableCommitlogDefault { + return &FindConfigEnableCommitlogDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableCommitlogDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableCommitlogDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable commitlog default response +func (o *FindConfigEnableCommitlogDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableCommitlogDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableCommitlogDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableCommitlogDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_parameters.go new file mode 100644 index 00000000000..00ea319ca86 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersParams creates a new FindConfigEnableDangerousDirectImportOfCassandraCountersParams object +// with the default values initialized. +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersParams() *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + + return &FindConfigEnableDangerousDirectImportOfCassandraCountersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithTimeout creates a new FindConfigEnableDangerousDirectImportOfCassandraCountersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithTimeout(timeout time.Duration) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + + return &FindConfigEnableDangerousDirectImportOfCassandraCountersParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithContext creates a new FindConfigEnableDangerousDirectImportOfCassandraCountersParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithContext(ctx context.Context) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + + return &FindConfigEnableDangerousDirectImportOfCassandraCountersParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithHTTPClient creates a new FindConfigEnableDangerousDirectImportOfCassandraCountersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersParamsWithHTTPClient(client *http.Client) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + + return &FindConfigEnableDangerousDirectImportOfCassandraCountersParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableDangerousDirectImportOfCassandraCountersParams contains all the parameters to send to the API endpoint +for the find config enable dangerous direct import of cassandra counters operation typically these are written to a http.Request +*/ +type FindConfigEnableDangerousDirectImportOfCassandraCountersParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) WithTimeout(timeout time.Duration) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) WithContext(ctx context.Context) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) WithHTTPClient(client *http.Client) *FindConfigEnableDangerousDirectImportOfCassandraCountersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable dangerous direct import of cassandra counters params +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_responses.go new file mode 100644 index 00000000000..1280e6a513d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_dangerous_direct_import_of_cassandra_counters_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableDangerousDirectImportOfCassandraCountersReader is a Reader for the FindConfigEnableDangerousDirectImportOfCassandraCounters structure. +type FindConfigEnableDangerousDirectImportOfCassandraCountersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableDangerousDirectImportOfCassandraCountersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableDangerousDirectImportOfCassandraCountersDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersOK creates a FindConfigEnableDangerousDirectImportOfCassandraCountersOK with default headers values +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersOK() *FindConfigEnableDangerousDirectImportOfCassandraCountersOK { + return &FindConfigEnableDangerousDirectImportOfCassandraCountersOK{} +} + +/*FindConfigEnableDangerousDirectImportOfCassandraCountersOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableDangerousDirectImportOfCassandraCountersOK struct { + Payload bool +} + +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersOK) 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 +} + +// NewFindConfigEnableDangerousDirectImportOfCassandraCountersDefault creates a FindConfigEnableDangerousDirectImportOfCassandraCountersDefault with default headers values +func NewFindConfigEnableDangerousDirectImportOfCassandraCountersDefault(code int) *FindConfigEnableDangerousDirectImportOfCassandraCountersDefault { + return &FindConfigEnableDangerousDirectImportOfCassandraCountersDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableDangerousDirectImportOfCassandraCountersDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableDangerousDirectImportOfCassandraCountersDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable dangerous direct import of cassandra counters default response +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableDangerousDirectImportOfCassandraCountersDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_parameters.go new file mode 100644 index 00000000000..c3cc141fbed --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableDeprecatedPartitionersParams creates a new FindConfigEnableDeprecatedPartitionersParams object +// with the default values initialized. +func NewFindConfigEnableDeprecatedPartitionersParams() *FindConfigEnableDeprecatedPartitionersParams { + + return &FindConfigEnableDeprecatedPartitionersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableDeprecatedPartitionersParamsWithTimeout creates a new FindConfigEnableDeprecatedPartitionersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableDeprecatedPartitionersParamsWithTimeout(timeout time.Duration) *FindConfigEnableDeprecatedPartitionersParams { + + return &FindConfigEnableDeprecatedPartitionersParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableDeprecatedPartitionersParamsWithContext creates a new FindConfigEnableDeprecatedPartitionersParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableDeprecatedPartitionersParamsWithContext(ctx context.Context) *FindConfigEnableDeprecatedPartitionersParams { + + return &FindConfigEnableDeprecatedPartitionersParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableDeprecatedPartitionersParamsWithHTTPClient creates a new FindConfigEnableDeprecatedPartitionersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableDeprecatedPartitionersParamsWithHTTPClient(client *http.Client) *FindConfigEnableDeprecatedPartitionersParams { + + return &FindConfigEnableDeprecatedPartitionersParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableDeprecatedPartitionersParams contains all the parameters to send to the API endpoint +for the find config enable deprecated partitioners operation typically these are written to a http.Request +*/ +type FindConfigEnableDeprecatedPartitionersParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) WithTimeout(timeout time.Duration) *FindConfigEnableDeprecatedPartitionersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) WithContext(ctx context.Context) *FindConfigEnableDeprecatedPartitionersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) WithHTTPClient(client *http.Client) *FindConfigEnableDeprecatedPartitionersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable deprecated partitioners params +func (o *FindConfigEnableDeprecatedPartitionersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableDeprecatedPartitionersParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_responses.go new file mode 100644 index 00000000000..6e27c82f726 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_deprecated_partitioners_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableDeprecatedPartitionersReader is a Reader for the FindConfigEnableDeprecatedPartitioners structure. +type FindConfigEnableDeprecatedPartitionersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableDeprecatedPartitionersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableDeprecatedPartitionersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableDeprecatedPartitionersDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableDeprecatedPartitionersOK creates a FindConfigEnableDeprecatedPartitionersOK with default headers values +func NewFindConfigEnableDeprecatedPartitionersOK() *FindConfigEnableDeprecatedPartitionersOK { + return &FindConfigEnableDeprecatedPartitionersOK{} +} + +/*FindConfigEnableDeprecatedPartitionersOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableDeprecatedPartitionersOK struct { + Payload bool +} + +func (o *FindConfigEnableDeprecatedPartitionersOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableDeprecatedPartitionersOK) 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 +} + +// NewFindConfigEnableDeprecatedPartitionersDefault creates a FindConfigEnableDeprecatedPartitionersDefault with default headers values +func NewFindConfigEnableDeprecatedPartitionersDefault(code int) *FindConfigEnableDeprecatedPartitionersDefault { + return &FindConfigEnableDeprecatedPartitionersDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableDeprecatedPartitionersDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableDeprecatedPartitionersDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable deprecated partitioners default response +func (o *FindConfigEnableDeprecatedPartitionersDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableDeprecatedPartitionersDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableDeprecatedPartitionersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableDeprecatedPartitionersDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_parameters.go new file mode 100644 index 00000000000..c16bc4f8391 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableInMemoryDataStoreParams creates a new FindConfigEnableInMemoryDataStoreParams object +// with the default values initialized. +func NewFindConfigEnableInMemoryDataStoreParams() *FindConfigEnableInMemoryDataStoreParams { + + return &FindConfigEnableInMemoryDataStoreParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableInMemoryDataStoreParamsWithTimeout creates a new FindConfigEnableInMemoryDataStoreParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableInMemoryDataStoreParamsWithTimeout(timeout time.Duration) *FindConfigEnableInMemoryDataStoreParams { + + return &FindConfigEnableInMemoryDataStoreParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableInMemoryDataStoreParamsWithContext creates a new FindConfigEnableInMemoryDataStoreParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableInMemoryDataStoreParamsWithContext(ctx context.Context) *FindConfigEnableInMemoryDataStoreParams { + + return &FindConfigEnableInMemoryDataStoreParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableInMemoryDataStoreParamsWithHTTPClient creates a new FindConfigEnableInMemoryDataStoreParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableInMemoryDataStoreParamsWithHTTPClient(client *http.Client) *FindConfigEnableInMemoryDataStoreParams { + + return &FindConfigEnableInMemoryDataStoreParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableInMemoryDataStoreParams contains all the parameters to send to the API endpoint +for the find config enable in memory data store operation typically these are written to a http.Request +*/ +type FindConfigEnableInMemoryDataStoreParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) WithTimeout(timeout time.Duration) *FindConfigEnableInMemoryDataStoreParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) WithContext(ctx context.Context) *FindConfigEnableInMemoryDataStoreParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) WithHTTPClient(client *http.Client) *FindConfigEnableInMemoryDataStoreParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable in memory data store params +func (o *FindConfigEnableInMemoryDataStoreParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableInMemoryDataStoreParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_responses.go new file mode 100644 index 00000000000..398dba984d8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_in_memory_data_store_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableInMemoryDataStoreReader is a Reader for the FindConfigEnableInMemoryDataStore structure. +type FindConfigEnableInMemoryDataStoreReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableInMemoryDataStoreReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableInMemoryDataStoreOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableInMemoryDataStoreDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableInMemoryDataStoreOK creates a FindConfigEnableInMemoryDataStoreOK with default headers values +func NewFindConfigEnableInMemoryDataStoreOK() *FindConfigEnableInMemoryDataStoreOK { + return &FindConfigEnableInMemoryDataStoreOK{} +} + +/*FindConfigEnableInMemoryDataStoreOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableInMemoryDataStoreOK struct { + Payload bool +} + +func (o *FindConfigEnableInMemoryDataStoreOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableInMemoryDataStoreOK) 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 +} + +// NewFindConfigEnableInMemoryDataStoreDefault creates a FindConfigEnableInMemoryDataStoreDefault with default headers values +func NewFindConfigEnableInMemoryDataStoreDefault(code int) *FindConfigEnableInMemoryDataStoreDefault { + return &FindConfigEnableInMemoryDataStoreDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableInMemoryDataStoreDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableInMemoryDataStoreDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable in memory data store default response +func (o *FindConfigEnableInMemoryDataStoreDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableInMemoryDataStoreDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableInMemoryDataStoreDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableInMemoryDataStoreDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_parameters.go new file mode 100644 index 00000000000..e61c985c43b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsParams creates a new FindConfigEnableKeyspaceColumnFamilyMetricsParams object +// with the default values initialized. +func NewFindConfigEnableKeyspaceColumnFamilyMetricsParams() *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + + return &FindConfigEnableKeyspaceColumnFamilyMetricsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithTimeout creates a new FindConfigEnableKeyspaceColumnFamilyMetricsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithTimeout(timeout time.Duration) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + + return &FindConfigEnableKeyspaceColumnFamilyMetricsParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithContext creates a new FindConfigEnableKeyspaceColumnFamilyMetricsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithContext(ctx context.Context) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + + return &FindConfigEnableKeyspaceColumnFamilyMetricsParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithHTTPClient creates a new FindConfigEnableKeyspaceColumnFamilyMetricsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableKeyspaceColumnFamilyMetricsParamsWithHTTPClient(client *http.Client) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + + return &FindConfigEnableKeyspaceColumnFamilyMetricsParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableKeyspaceColumnFamilyMetricsParams contains all the parameters to send to the API endpoint +for the find config enable keyspace column family metrics operation typically these are written to a http.Request +*/ +type FindConfigEnableKeyspaceColumnFamilyMetricsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) WithTimeout(timeout time.Duration) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) WithContext(ctx context.Context) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) WithHTTPClient(client *http.Client) *FindConfigEnableKeyspaceColumnFamilyMetricsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable keyspace column family metrics params +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_responses.go new file mode 100644 index 00000000000..e70cb22b98c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_keyspace_column_family_metrics_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableKeyspaceColumnFamilyMetricsReader is a Reader for the FindConfigEnableKeyspaceColumnFamilyMetrics structure. +type FindConfigEnableKeyspaceColumnFamilyMetricsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableKeyspaceColumnFamilyMetricsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableKeyspaceColumnFamilyMetricsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsOK creates a FindConfigEnableKeyspaceColumnFamilyMetricsOK with default headers values +func NewFindConfigEnableKeyspaceColumnFamilyMetricsOK() *FindConfigEnableKeyspaceColumnFamilyMetricsOK { + return &FindConfigEnableKeyspaceColumnFamilyMetricsOK{} +} + +/*FindConfigEnableKeyspaceColumnFamilyMetricsOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableKeyspaceColumnFamilyMetricsOK struct { + Payload bool +} + +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsOK) 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 +} + +// NewFindConfigEnableKeyspaceColumnFamilyMetricsDefault creates a FindConfigEnableKeyspaceColumnFamilyMetricsDefault with default headers values +func NewFindConfigEnableKeyspaceColumnFamilyMetricsDefault(code int) *FindConfigEnableKeyspaceColumnFamilyMetricsDefault { + return &FindConfigEnableKeyspaceColumnFamilyMetricsDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableKeyspaceColumnFamilyMetricsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableKeyspaceColumnFamilyMetricsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable keyspace column family metrics default response +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableKeyspaceColumnFamilyMetricsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_parameters.go new file mode 100644 index 00000000000..7ffaa0e6fc0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableShardAwareDriversParams creates a new FindConfigEnableShardAwareDriversParams object +// with the default values initialized. +func NewFindConfigEnableShardAwareDriversParams() *FindConfigEnableShardAwareDriversParams { + + return &FindConfigEnableShardAwareDriversParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableShardAwareDriversParamsWithTimeout creates a new FindConfigEnableShardAwareDriversParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableShardAwareDriversParamsWithTimeout(timeout time.Duration) *FindConfigEnableShardAwareDriversParams { + + return &FindConfigEnableShardAwareDriversParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableShardAwareDriversParamsWithContext creates a new FindConfigEnableShardAwareDriversParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableShardAwareDriversParamsWithContext(ctx context.Context) *FindConfigEnableShardAwareDriversParams { + + return &FindConfigEnableShardAwareDriversParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableShardAwareDriversParamsWithHTTPClient creates a new FindConfigEnableShardAwareDriversParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableShardAwareDriversParamsWithHTTPClient(client *http.Client) *FindConfigEnableShardAwareDriversParams { + + return &FindConfigEnableShardAwareDriversParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableShardAwareDriversParams contains all the parameters to send to the API endpoint +for the find config enable shard aware drivers operation typically these are written to a http.Request +*/ +type FindConfigEnableShardAwareDriversParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) WithTimeout(timeout time.Duration) *FindConfigEnableShardAwareDriversParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) WithContext(ctx context.Context) *FindConfigEnableShardAwareDriversParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) WithHTTPClient(client *http.Client) *FindConfigEnableShardAwareDriversParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable shard aware drivers params +func (o *FindConfigEnableShardAwareDriversParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableShardAwareDriversParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_responses.go new file mode 100644 index 00000000000..4c461d88bed --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_shard_aware_drivers_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableShardAwareDriversReader is a Reader for the FindConfigEnableShardAwareDrivers structure. +type FindConfigEnableShardAwareDriversReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableShardAwareDriversReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableShardAwareDriversOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableShardAwareDriversDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableShardAwareDriversOK creates a FindConfigEnableShardAwareDriversOK with default headers values +func NewFindConfigEnableShardAwareDriversOK() *FindConfigEnableShardAwareDriversOK { + return &FindConfigEnableShardAwareDriversOK{} +} + +/*FindConfigEnableShardAwareDriversOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableShardAwareDriversOK struct { + Payload bool +} + +func (o *FindConfigEnableShardAwareDriversOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableShardAwareDriversOK) 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 +} + +// NewFindConfigEnableShardAwareDriversDefault creates a FindConfigEnableShardAwareDriversDefault with default headers values +func NewFindConfigEnableShardAwareDriversDefault(code int) *FindConfigEnableShardAwareDriversDefault { + return &FindConfigEnableShardAwareDriversDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableShardAwareDriversDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableShardAwareDriversDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable shard aware drivers default response +func (o *FindConfigEnableShardAwareDriversDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableShardAwareDriversDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableShardAwareDriversDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableShardAwareDriversDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_parameters.go new file mode 100644 index 00000000000..78fdfa7ce45 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableSstableDataIntegrityCheckParams creates a new FindConfigEnableSstableDataIntegrityCheckParams object +// with the default values initialized. +func NewFindConfigEnableSstableDataIntegrityCheckParams() *FindConfigEnableSstableDataIntegrityCheckParams { + + return &FindConfigEnableSstableDataIntegrityCheckParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableSstableDataIntegrityCheckParamsWithTimeout creates a new FindConfigEnableSstableDataIntegrityCheckParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableSstableDataIntegrityCheckParamsWithTimeout(timeout time.Duration) *FindConfigEnableSstableDataIntegrityCheckParams { + + return &FindConfigEnableSstableDataIntegrityCheckParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableSstableDataIntegrityCheckParamsWithContext creates a new FindConfigEnableSstableDataIntegrityCheckParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableSstableDataIntegrityCheckParamsWithContext(ctx context.Context) *FindConfigEnableSstableDataIntegrityCheckParams { + + return &FindConfigEnableSstableDataIntegrityCheckParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableSstableDataIntegrityCheckParamsWithHTTPClient creates a new FindConfigEnableSstableDataIntegrityCheckParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableSstableDataIntegrityCheckParamsWithHTTPClient(client *http.Client) *FindConfigEnableSstableDataIntegrityCheckParams { + + return &FindConfigEnableSstableDataIntegrityCheckParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableSstableDataIntegrityCheckParams contains all the parameters to send to the API endpoint +for the find config enable sstable data integrity check operation typically these are written to a http.Request +*/ +type FindConfigEnableSstableDataIntegrityCheckParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) WithTimeout(timeout time.Duration) *FindConfigEnableSstableDataIntegrityCheckParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) WithContext(ctx context.Context) *FindConfigEnableSstableDataIntegrityCheckParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) WithHTTPClient(client *http.Client) *FindConfigEnableSstableDataIntegrityCheckParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable sstable data integrity check params +func (o *FindConfigEnableSstableDataIntegrityCheckParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableSstableDataIntegrityCheckParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_responses.go new file mode 100644 index 00000000000..7d7a27c7395 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstable_data_integrity_check_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableSstableDataIntegrityCheckReader is a Reader for the FindConfigEnableSstableDataIntegrityCheck structure. +type FindConfigEnableSstableDataIntegrityCheckReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableSstableDataIntegrityCheckReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableSstableDataIntegrityCheckOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableSstableDataIntegrityCheckDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableSstableDataIntegrityCheckOK creates a FindConfigEnableSstableDataIntegrityCheckOK with default headers values +func NewFindConfigEnableSstableDataIntegrityCheckOK() *FindConfigEnableSstableDataIntegrityCheckOK { + return &FindConfigEnableSstableDataIntegrityCheckOK{} +} + +/*FindConfigEnableSstableDataIntegrityCheckOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableSstableDataIntegrityCheckOK struct { + Payload bool +} + +func (o *FindConfigEnableSstableDataIntegrityCheckOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableSstableDataIntegrityCheckOK) 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 +} + +// NewFindConfigEnableSstableDataIntegrityCheckDefault creates a FindConfigEnableSstableDataIntegrityCheckDefault with default headers values +func NewFindConfigEnableSstableDataIntegrityCheckDefault(code int) *FindConfigEnableSstableDataIntegrityCheckDefault { + return &FindConfigEnableSstableDataIntegrityCheckDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableSstableDataIntegrityCheckDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableSstableDataIntegrityCheckDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable sstable data integrity check default response +func (o *FindConfigEnableSstableDataIntegrityCheckDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableSstableDataIntegrityCheckDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableSstableDataIntegrityCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableSstableDataIntegrityCheckDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_parameters.go new file mode 100644 index 00000000000..3e3c82eb3d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEnableSstablesMcFormatParams creates a new FindConfigEnableSstablesMcFormatParams object +// with the default values initialized. +func NewFindConfigEnableSstablesMcFormatParams() *FindConfigEnableSstablesMcFormatParams { + + return &FindConfigEnableSstablesMcFormatParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEnableSstablesMcFormatParamsWithTimeout creates a new FindConfigEnableSstablesMcFormatParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEnableSstablesMcFormatParamsWithTimeout(timeout time.Duration) *FindConfigEnableSstablesMcFormatParams { + + return &FindConfigEnableSstablesMcFormatParams{ + + timeout: timeout, + } +} + +// NewFindConfigEnableSstablesMcFormatParamsWithContext creates a new FindConfigEnableSstablesMcFormatParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEnableSstablesMcFormatParamsWithContext(ctx context.Context) *FindConfigEnableSstablesMcFormatParams { + + return &FindConfigEnableSstablesMcFormatParams{ + + Context: ctx, + } +} + +// NewFindConfigEnableSstablesMcFormatParamsWithHTTPClient creates a new FindConfigEnableSstablesMcFormatParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEnableSstablesMcFormatParamsWithHTTPClient(client *http.Client) *FindConfigEnableSstablesMcFormatParams { + + return &FindConfigEnableSstablesMcFormatParams{ + HTTPClient: client, + } +} + +/*FindConfigEnableSstablesMcFormatParams contains all the parameters to send to the API endpoint +for the find config enable sstables mc format operation typically these are written to a http.Request +*/ +type FindConfigEnableSstablesMcFormatParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) WithTimeout(timeout time.Duration) *FindConfigEnableSstablesMcFormatParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) WithContext(ctx context.Context) *FindConfigEnableSstablesMcFormatParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) WithHTTPClient(client *http.Client) *FindConfigEnableSstablesMcFormatParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config enable sstables mc format params +func (o *FindConfigEnableSstablesMcFormatParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEnableSstablesMcFormatParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_responses.go new file mode 100644 index 00000000000..a722ba12385 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_enable_sstables_mc_format_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEnableSstablesMcFormatReader is a Reader for the FindConfigEnableSstablesMcFormat structure. +type FindConfigEnableSstablesMcFormatReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEnableSstablesMcFormatReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEnableSstablesMcFormatOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEnableSstablesMcFormatDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEnableSstablesMcFormatOK creates a FindConfigEnableSstablesMcFormatOK with default headers values +func NewFindConfigEnableSstablesMcFormatOK() *FindConfigEnableSstablesMcFormatOK { + return &FindConfigEnableSstablesMcFormatOK{} +} + +/*FindConfigEnableSstablesMcFormatOK handles this case with default header values. + +Config value +*/ +type FindConfigEnableSstablesMcFormatOK struct { + Payload bool +} + +func (o *FindConfigEnableSstablesMcFormatOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigEnableSstablesMcFormatOK) 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 +} + +// NewFindConfigEnableSstablesMcFormatDefault creates a FindConfigEnableSstablesMcFormatDefault with default headers values +func NewFindConfigEnableSstablesMcFormatDefault(code int) *FindConfigEnableSstablesMcFormatDefault { + return &FindConfigEnableSstablesMcFormatDefault{ + _statusCode: code, + } +} + +/*FindConfigEnableSstablesMcFormatDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEnableSstablesMcFormatDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config enable sstables mc format default response +func (o *FindConfigEnableSstablesMcFormatDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEnableSstablesMcFormatDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEnableSstablesMcFormatDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEnableSstablesMcFormatDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_parameters.go new file mode 100644 index 00000000000..92c45f22154 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigEndpointSnitchParams creates a new FindConfigEndpointSnitchParams object +// with the default values initialized. +func NewFindConfigEndpointSnitchParams() *FindConfigEndpointSnitchParams { + + return &FindConfigEndpointSnitchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigEndpointSnitchParamsWithTimeout creates a new FindConfigEndpointSnitchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigEndpointSnitchParamsWithTimeout(timeout time.Duration) *FindConfigEndpointSnitchParams { + + return &FindConfigEndpointSnitchParams{ + + timeout: timeout, + } +} + +// NewFindConfigEndpointSnitchParamsWithContext creates a new FindConfigEndpointSnitchParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigEndpointSnitchParamsWithContext(ctx context.Context) *FindConfigEndpointSnitchParams { + + return &FindConfigEndpointSnitchParams{ + + Context: ctx, + } +} + +// NewFindConfigEndpointSnitchParamsWithHTTPClient creates a new FindConfigEndpointSnitchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigEndpointSnitchParamsWithHTTPClient(client *http.Client) *FindConfigEndpointSnitchParams { + + return &FindConfigEndpointSnitchParams{ + HTTPClient: client, + } +} + +/*FindConfigEndpointSnitchParams contains all the parameters to send to the API endpoint +for the find config endpoint snitch operation typically these are written to a http.Request +*/ +type FindConfigEndpointSnitchParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) WithTimeout(timeout time.Duration) *FindConfigEndpointSnitchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) WithContext(ctx context.Context) *FindConfigEndpointSnitchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) WithHTTPClient(client *http.Client) *FindConfigEndpointSnitchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config endpoint snitch params +func (o *FindConfigEndpointSnitchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigEndpointSnitchParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_responses.go new file mode 100644 index 00000000000..bf67c5cf716 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_endpoint_snitch_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigEndpointSnitchReader is a Reader for the FindConfigEndpointSnitch structure. +type FindConfigEndpointSnitchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigEndpointSnitchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigEndpointSnitchOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigEndpointSnitchDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigEndpointSnitchOK creates a FindConfigEndpointSnitchOK with default headers values +func NewFindConfigEndpointSnitchOK() *FindConfigEndpointSnitchOK { + return &FindConfigEndpointSnitchOK{} +} + +/*FindConfigEndpointSnitchOK handles this case with default header values. + +Config value +*/ +type FindConfigEndpointSnitchOK struct { + Payload string +} + +func (o *FindConfigEndpointSnitchOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigEndpointSnitchOK) 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 +} + +// NewFindConfigEndpointSnitchDefault creates a FindConfigEndpointSnitchDefault with default headers values +func NewFindConfigEndpointSnitchDefault(code int) *FindConfigEndpointSnitchDefault { + return &FindConfigEndpointSnitchDefault{ + _statusCode: code, + } +} + +/*FindConfigEndpointSnitchDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigEndpointSnitchDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config endpoint snitch default response +func (o *FindConfigEndpointSnitchDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigEndpointSnitchDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigEndpointSnitchDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigEndpointSnitchDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_parameters.go new file mode 100644 index 00000000000..d6097b67acf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigExperimentalParams creates a new FindConfigExperimentalParams object +// with the default values initialized. +func NewFindConfigExperimentalParams() *FindConfigExperimentalParams { + + return &FindConfigExperimentalParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigExperimentalParamsWithTimeout creates a new FindConfigExperimentalParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigExperimentalParamsWithTimeout(timeout time.Duration) *FindConfigExperimentalParams { + + return &FindConfigExperimentalParams{ + + timeout: timeout, + } +} + +// NewFindConfigExperimentalParamsWithContext creates a new FindConfigExperimentalParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigExperimentalParamsWithContext(ctx context.Context) *FindConfigExperimentalParams { + + return &FindConfigExperimentalParams{ + + Context: ctx, + } +} + +// NewFindConfigExperimentalParamsWithHTTPClient creates a new FindConfigExperimentalParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigExperimentalParamsWithHTTPClient(client *http.Client) *FindConfigExperimentalParams { + + return &FindConfigExperimentalParams{ + HTTPClient: client, + } +} + +/*FindConfigExperimentalParams contains all the parameters to send to the API endpoint +for the find config experimental operation typically these are written to a http.Request +*/ +type FindConfigExperimentalParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config experimental params +func (o *FindConfigExperimentalParams) WithTimeout(timeout time.Duration) *FindConfigExperimentalParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config experimental params +func (o *FindConfigExperimentalParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config experimental params +func (o *FindConfigExperimentalParams) WithContext(ctx context.Context) *FindConfigExperimentalParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config experimental params +func (o *FindConfigExperimentalParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config experimental params +func (o *FindConfigExperimentalParams) WithHTTPClient(client *http.Client) *FindConfigExperimentalParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config experimental params +func (o *FindConfigExperimentalParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigExperimentalParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_responses.go new file mode 100644 index 00000000000..5b81a28dba7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_experimental_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigExperimentalReader is a Reader for the FindConfigExperimental structure. +type FindConfigExperimentalReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigExperimentalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigExperimentalOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigExperimentalDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigExperimentalOK creates a FindConfigExperimentalOK with default headers values +func NewFindConfigExperimentalOK() *FindConfigExperimentalOK { + return &FindConfigExperimentalOK{} +} + +/*FindConfigExperimentalOK handles this case with default header values. + +Config value +*/ +type FindConfigExperimentalOK struct { + Payload bool +} + +func (o *FindConfigExperimentalOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigExperimentalOK) 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 +} + +// NewFindConfigExperimentalDefault creates a FindConfigExperimentalDefault with default headers values +func NewFindConfigExperimentalDefault(code int) *FindConfigExperimentalDefault { + return &FindConfigExperimentalDefault{ + _statusCode: code, + } +} + +/*FindConfigExperimentalDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigExperimentalDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config experimental default response +func (o *FindConfigExperimentalDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigExperimentalDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigExperimentalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigExperimentalDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_parameters.go new file mode 100644 index 00000000000..e8c57af434e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigFdInitialValueMsParams creates a new FindConfigFdInitialValueMsParams object +// with the default values initialized. +func NewFindConfigFdInitialValueMsParams() *FindConfigFdInitialValueMsParams { + + return &FindConfigFdInitialValueMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigFdInitialValueMsParamsWithTimeout creates a new FindConfigFdInitialValueMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigFdInitialValueMsParamsWithTimeout(timeout time.Duration) *FindConfigFdInitialValueMsParams { + + return &FindConfigFdInitialValueMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigFdInitialValueMsParamsWithContext creates a new FindConfigFdInitialValueMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigFdInitialValueMsParamsWithContext(ctx context.Context) *FindConfigFdInitialValueMsParams { + + return &FindConfigFdInitialValueMsParams{ + + Context: ctx, + } +} + +// NewFindConfigFdInitialValueMsParamsWithHTTPClient creates a new FindConfigFdInitialValueMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigFdInitialValueMsParamsWithHTTPClient(client *http.Client) *FindConfigFdInitialValueMsParams { + + return &FindConfigFdInitialValueMsParams{ + HTTPClient: client, + } +} + +/*FindConfigFdInitialValueMsParams contains all the parameters to send to the API endpoint +for the find config fd initial value ms operation typically these are written to a http.Request +*/ +type FindConfigFdInitialValueMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) WithTimeout(timeout time.Duration) *FindConfigFdInitialValueMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) WithContext(ctx context.Context) *FindConfigFdInitialValueMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) WithHTTPClient(client *http.Client) *FindConfigFdInitialValueMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config fd initial value ms params +func (o *FindConfigFdInitialValueMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigFdInitialValueMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_responses.go new file mode 100644 index 00000000000..fab00a19119 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_initial_value_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigFdInitialValueMsReader is a Reader for the FindConfigFdInitialValueMs structure. +type FindConfigFdInitialValueMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigFdInitialValueMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigFdInitialValueMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigFdInitialValueMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigFdInitialValueMsOK creates a FindConfigFdInitialValueMsOK with default headers values +func NewFindConfigFdInitialValueMsOK() *FindConfigFdInitialValueMsOK { + return &FindConfigFdInitialValueMsOK{} +} + +/*FindConfigFdInitialValueMsOK handles this case with default header values. + +Config value +*/ +type FindConfigFdInitialValueMsOK struct { + Payload int64 +} + +func (o *FindConfigFdInitialValueMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigFdInitialValueMsOK) 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 +} + +// NewFindConfigFdInitialValueMsDefault creates a FindConfigFdInitialValueMsDefault with default headers values +func NewFindConfigFdInitialValueMsDefault(code int) *FindConfigFdInitialValueMsDefault { + return &FindConfigFdInitialValueMsDefault{ + _statusCode: code, + } +} + +/*FindConfigFdInitialValueMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigFdInitialValueMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config fd initial value ms default response +func (o *FindConfigFdInitialValueMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigFdInitialValueMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigFdInitialValueMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigFdInitialValueMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_parameters.go new file mode 100644 index 00000000000..e37b5aa8530 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigFdMaxIntervalMsParams creates a new FindConfigFdMaxIntervalMsParams object +// with the default values initialized. +func NewFindConfigFdMaxIntervalMsParams() *FindConfigFdMaxIntervalMsParams { + + return &FindConfigFdMaxIntervalMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigFdMaxIntervalMsParamsWithTimeout creates a new FindConfigFdMaxIntervalMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigFdMaxIntervalMsParamsWithTimeout(timeout time.Duration) *FindConfigFdMaxIntervalMsParams { + + return &FindConfigFdMaxIntervalMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigFdMaxIntervalMsParamsWithContext creates a new FindConfigFdMaxIntervalMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigFdMaxIntervalMsParamsWithContext(ctx context.Context) *FindConfigFdMaxIntervalMsParams { + + return &FindConfigFdMaxIntervalMsParams{ + + Context: ctx, + } +} + +// NewFindConfigFdMaxIntervalMsParamsWithHTTPClient creates a new FindConfigFdMaxIntervalMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigFdMaxIntervalMsParamsWithHTTPClient(client *http.Client) *FindConfigFdMaxIntervalMsParams { + + return &FindConfigFdMaxIntervalMsParams{ + HTTPClient: client, + } +} + +/*FindConfigFdMaxIntervalMsParams contains all the parameters to send to the API endpoint +for the find config fd max interval ms operation typically these are written to a http.Request +*/ +type FindConfigFdMaxIntervalMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) WithTimeout(timeout time.Duration) *FindConfigFdMaxIntervalMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) WithContext(ctx context.Context) *FindConfigFdMaxIntervalMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) WithHTTPClient(client *http.Client) *FindConfigFdMaxIntervalMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config fd max interval ms params +func (o *FindConfigFdMaxIntervalMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigFdMaxIntervalMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_responses.go new file mode 100644 index 00000000000..927cef8b4c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_fd_max_interval_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigFdMaxIntervalMsReader is a Reader for the FindConfigFdMaxIntervalMs structure. +type FindConfigFdMaxIntervalMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigFdMaxIntervalMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigFdMaxIntervalMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigFdMaxIntervalMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigFdMaxIntervalMsOK creates a FindConfigFdMaxIntervalMsOK with default headers values +func NewFindConfigFdMaxIntervalMsOK() *FindConfigFdMaxIntervalMsOK { + return &FindConfigFdMaxIntervalMsOK{} +} + +/*FindConfigFdMaxIntervalMsOK handles this case with default header values. + +Config value +*/ +type FindConfigFdMaxIntervalMsOK struct { + Payload int64 +} + +func (o *FindConfigFdMaxIntervalMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigFdMaxIntervalMsOK) 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 +} + +// NewFindConfigFdMaxIntervalMsDefault creates a FindConfigFdMaxIntervalMsDefault with default headers values +func NewFindConfigFdMaxIntervalMsDefault(code int) *FindConfigFdMaxIntervalMsDefault { + return &FindConfigFdMaxIntervalMsDefault{ + _statusCode: code, + } +} + +/*FindConfigFdMaxIntervalMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigFdMaxIntervalMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config fd max interval ms default response +func (o *FindConfigFdMaxIntervalMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigFdMaxIntervalMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigFdMaxIntervalMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigFdMaxIntervalMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_parameters.go new file mode 100644 index 00000000000..7375482da1b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigFileCacheSizeInMbParams creates a new FindConfigFileCacheSizeInMbParams object +// with the default values initialized. +func NewFindConfigFileCacheSizeInMbParams() *FindConfigFileCacheSizeInMbParams { + + return &FindConfigFileCacheSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigFileCacheSizeInMbParamsWithTimeout creates a new FindConfigFileCacheSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigFileCacheSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigFileCacheSizeInMbParams { + + return &FindConfigFileCacheSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigFileCacheSizeInMbParamsWithContext creates a new FindConfigFileCacheSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigFileCacheSizeInMbParamsWithContext(ctx context.Context) *FindConfigFileCacheSizeInMbParams { + + return &FindConfigFileCacheSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigFileCacheSizeInMbParamsWithHTTPClient creates a new FindConfigFileCacheSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigFileCacheSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigFileCacheSizeInMbParams { + + return &FindConfigFileCacheSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigFileCacheSizeInMbParams contains all the parameters to send to the API endpoint +for the find config file cache size in mb operation typically these are written to a http.Request +*/ +type FindConfigFileCacheSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigFileCacheSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) WithContext(ctx context.Context) *FindConfigFileCacheSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigFileCacheSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config file cache size in mb params +func (o *FindConfigFileCacheSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigFileCacheSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_responses.go new file mode 100644 index 00000000000..42594e30dda --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_file_cache_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigFileCacheSizeInMbReader is a Reader for the FindConfigFileCacheSizeInMb structure. +type FindConfigFileCacheSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigFileCacheSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigFileCacheSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigFileCacheSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigFileCacheSizeInMbOK creates a FindConfigFileCacheSizeInMbOK with default headers values +func NewFindConfigFileCacheSizeInMbOK() *FindConfigFileCacheSizeInMbOK { + return &FindConfigFileCacheSizeInMbOK{} +} + +/*FindConfigFileCacheSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigFileCacheSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigFileCacheSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigFileCacheSizeInMbOK) 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 +} + +// NewFindConfigFileCacheSizeInMbDefault creates a FindConfigFileCacheSizeInMbDefault with default headers values +func NewFindConfigFileCacheSizeInMbDefault(code int) *FindConfigFileCacheSizeInMbDefault { + return &FindConfigFileCacheSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigFileCacheSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigFileCacheSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config file cache size in mb default response +func (o *FindConfigFileCacheSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigFileCacheSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigFileCacheSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigFileCacheSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_parameters.go new file mode 100644 index 00000000000..57bec433b1c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigHintedHandoffEnabledParams creates a new FindConfigHintedHandoffEnabledParams object +// with the default values initialized. +func NewFindConfigHintedHandoffEnabledParams() *FindConfigHintedHandoffEnabledParams { + + return &FindConfigHintedHandoffEnabledParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigHintedHandoffEnabledParamsWithTimeout creates a new FindConfigHintedHandoffEnabledParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigHintedHandoffEnabledParamsWithTimeout(timeout time.Duration) *FindConfigHintedHandoffEnabledParams { + + return &FindConfigHintedHandoffEnabledParams{ + + timeout: timeout, + } +} + +// NewFindConfigHintedHandoffEnabledParamsWithContext creates a new FindConfigHintedHandoffEnabledParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigHintedHandoffEnabledParamsWithContext(ctx context.Context) *FindConfigHintedHandoffEnabledParams { + + return &FindConfigHintedHandoffEnabledParams{ + + Context: ctx, + } +} + +// NewFindConfigHintedHandoffEnabledParamsWithHTTPClient creates a new FindConfigHintedHandoffEnabledParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigHintedHandoffEnabledParamsWithHTTPClient(client *http.Client) *FindConfigHintedHandoffEnabledParams { + + return &FindConfigHintedHandoffEnabledParams{ + HTTPClient: client, + } +} + +/*FindConfigHintedHandoffEnabledParams contains all the parameters to send to the API endpoint +for the find config hinted handoff enabled operation typically these are written to a http.Request +*/ +type FindConfigHintedHandoffEnabledParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) WithTimeout(timeout time.Duration) *FindConfigHintedHandoffEnabledParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) WithContext(ctx context.Context) *FindConfigHintedHandoffEnabledParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) WithHTTPClient(client *http.Client) *FindConfigHintedHandoffEnabledParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config hinted handoff enabled params +func (o *FindConfigHintedHandoffEnabledParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigHintedHandoffEnabledParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_responses.go new file mode 100644 index 00000000000..50084f5f51f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_enabled_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigHintedHandoffEnabledReader is a Reader for the FindConfigHintedHandoffEnabled structure. +type FindConfigHintedHandoffEnabledReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigHintedHandoffEnabledReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigHintedHandoffEnabledOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigHintedHandoffEnabledDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigHintedHandoffEnabledOK creates a FindConfigHintedHandoffEnabledOK with default headers values +func NewFindConfigHintedHandoffEnabledOK() *FindConfigHintedHandoffEnabledOK { + return &FindConfigHintedHandoffEnabledOK{} +} + +/*FindConfigHintedHandoffEnabledOK handles this case with default header values. + +Config value +*/ +type FindConfigHintedHandoffEnabledOK struct { + Payload string +} + +func (o *FindConfigHintedHandoffEnabledOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigHintedHandoffEnabledOK) 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 +} + +// NewFindConfigHintedHandoffEnabledDefault creates a FindConfigHintedHandoffEnabledDefault with default headers values +func NewFindConfigHintedHandoffEnabledDefault(code int) *FindConfigHintedHandoffEnabledDefault { + return &FindConfigHintedHandoffEnabledDefault{ + _statusCode: code, + } +} + +/*FindConfigHintedHandoffEnabledDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigHintedHandoffEnabledDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config hinted handoff enabled default response +func (o *FindConfigHintedHandoffEnabledDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigHintedHandoffEnabledDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigHintedHandoffEnabledDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigHintedHandoffEnabledDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_parameters.go new file mode 100644 index 00000000000..855650196a1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigHintedHandoffThrottleInKbParams creates a new FindConfigHintedHandoffThrottleInKbParams object +// with the default values initialized. +func NewFindConfigHintedHandoffThrottleInKbParams() *FindConfigHintedHandoffThrottleInKbParams { + + return &FindConfigHintedHandoffThrottleInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigHintedHandoffThrottleInKbParamsWithTimeout creates a new FindConfigHintedHandoffThrottleInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigHintedHandoffThrottleInKbParamsWithTimeout(timeout time.Duration) *FindConfigHintedHandoffThrottleInKbParams { + + return &FindConfigHintedHandoffThrottleInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigHintedHandoffThrottleInKbParamsWithContext creates a new FindConfigHintedHandoffThrottleInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigHintedHandoffThrottleInKbParamsWithContext(ctx context.Context) *FindConfigHintedHandoffThrottleInKbParams { + + return &FindConfigHintedHandoffThrottleInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigHintedHandoffThrottleInKbParamsWithHTTPClient creates a new FindConfigHintedHandoffThrottleInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigHintedHandoffThrottleInKbParamsWithHTTPClient(client *http.Client) *FindConfigHintedHandoffThrottleInKbParams { + + return &FindConfigHintedHandoffThrottleInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigHintedHandoffThrottleInKbParams contains all the parameters to send to the API endpoint +for the find config hinted handoff throttle in kb operation typically these are written to a http.Request +*/ +type FindConfigHintedHandoffThrottleInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) WithTimeout(timeout time.Duration) *FindConfigHintedHandoffThrottleInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) WithContext(ctx context.Context) *FindConfigHintedHandoffThrottleInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) WithHTTPClient(client *http.Client) *FindConfigHintedHandoffThrottleInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config hinted handoff throttle in kb params +func (o *FindConfigHintedHandoffThrottleInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigHintedHandoffThrottleInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_responses.go new file mode 100644 index 00000000000..e8cf1107562 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hinted_handoff_throttle_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigHintedHandoffThrottleInKbReader is a Reader for the FindConfigHintedHandoffThrottleInKb structure. +type FindConfigHintedHandoffThrottleInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigHintedHandoffThrottleInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigHintedHandoffThrottleInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigHintedHandoffThrottleInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigHintedHandoffThrottleInKbOK creates a FindConfigHintedHandoffThrottleInKbOK with default headers values +func NewFindConfigHintedHandoffThrottleInKbOK() *FindConfigHintedHandoffThrottleInKbOK { + return &FindConfigHintedHandoffThrottleInKbOK{} +} + +/*FindConfigHintedHandoffThrottleInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigHintedHandoffThrottleInKbOK struct { + Payload int64 +} + +func (o *FindConfigHintedHandoffThrottleInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigHintedHandoffThrottleInKbOK) 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 +} + +// NewFindConfigHintedHandoffThrottleInKbDefault creates a FindConfigHintedHandoffThrottleInKbDefault with default headers values +func NewFindConfigHintedHandoffThrottleInKbDefault(code int) *FindConfigHintedHandoffThrottleInKbDefault { + return &FindConfigHintedHandoffThrottleInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigHintedHandoffThrottleInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigHintedHandoffThrottleInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config hinted handoff throttle in kb default response +func (o *FindConfigHintedHandoffThrottleInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigHintedHandoffThrottleInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigHintedHandoffThrottleInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigHintedHandoffThrottleInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_parameters.go new file mode 100644 index 00000000000..00858592f40 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigHintsDirectoryParams creates a new FindConfigHintsDirectoryParams object +// with the default values initialized. +func NewFindConfigHintsDirectoryParams() *FindConfigHintsDirectoryParams { + + return &FindConfigHintsDirectoryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigHintsDirectoryParamsWithTimeout creates a new FindConfigHintsDirectoryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigHintsDirectoryParamsWithTimeout(timeout time.Duration) *FindConfigHintsDirectoryParams { + + return &FindConfigHintsDirectoryParams{ + + timeout: timeout, + } +} + +// NewFindConfigHintsDirectoryParamsWithContext creates a new FindConfigHintsDirectoryParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigHintsDirectoryParamsWithContext(ctx context.Context) *FindConfigHintsDirectoryParams { + + return &FindConfigHintsDirectoryParams{ + + Context: ctx, + } +} + +// NewFindConfigHintsDirectoryParamsWithHTTPClient creates a new FindConfigHintsDirectoryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigHintsDirectoryParamsWithHTTPClient(client *http.Client) *FindConfigHintsDirectoryParams { + + return &FindConfigHintsDirectoryParams{ + HTTPClient: client, + } +} + +/*FindConfigHintsDirectoryParams contains all the parameters to send to the API endpoint +for the find config hints directory operation typically these are written to a http.Request +*/ +type FindConfigHintsDirectoryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) WithTimeout(timeout time.Duration) *FindConfigHintsDirectoryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) WithContext(ctx context.Context) *FindConfigHintsDirectoryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) WithHTTPClient(client *http.Client) *FindConfigHintsDirectoryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config hints directory params +func (o *FindConfigHintsDirectoryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigHintsDirectoryParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_responses.go new file mode 100644 index 00000000000..3be5b2e388b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_hints_directory_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigHintsDirectoryReader is a Reader for the FindConfigHintsDirectory structure. +type FindConfigHintsDirectoryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigHintsDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigHintsDirectoryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigHintsDirectoryDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigHintsDirectoryOK creates a FindConfigHintsDirectoryOK with default headers values +func NewFindConfigHintsDirectoryOK() *FindConfigHintsDirectoryOK { + return &FindConfigHintsDirectoryOK{} +} + +/*FindConfigHintsDirectoryOK handles this case with default header values. + +Config value +*/ +type FindConfigHintsDirectoryOK struct { + Payload string +} + +func (o *FindConfigHintsDirectoryOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigHintsDirectoryOK) 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 +} + +// NewFindConfigHintsDirectoryDefault creates a FindConfigHintsDirectoryDefault with default headers values +func NewFindConfigHintsDirectoryDefault(code int) *FindConfigHintsDirectoryDefault { + return &FindConfigHintsDirectoryDefault{ + _statusCode: code, + } +} + +/*FindConfigHintsDirectoryDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigHintsDirectoryDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config hints directory default response +func (o *FindConfigHintsDirectoryDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigHintsDirectoryDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigHintsDirectoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigHintsDirectoryDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_parameters.go new file mode 100644 index 00000000000..e2d16658cd7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInMemoryCompactionLimitInMbParams creates a new FindConfigInMemoryCompactionLimitInMbParams object +// with the default values initialized. +func NewFindConfigInMemoryCompactionLimitInMbParams() *FindConfigInMemoryCompactionLimitInMbParams { + + return &FindConfigInMemoryCompactionLimitInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInMemoryCompactionLimitInMbParamsWithTimeout creates a new FindConfigInMemoryCompactionLimitInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInMemoryCompactionLimitInMbParamsWithTimeout(timeout time.Duration) *FindConfigInMemoryCompactionLimitInMbParams { + + return &FindConfigInMemoryCompactionLimitInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigInMemoryCompactionLimitInMbParamsWithContext creates a new FindConfigInMemoryCompactionLimitInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInMemoryCompactionLimitInMbParamsWithContext(ctx context.Context) *FindConfigInMemoryCompactionLimitInMbParams { + + return &FindConfigInMemoryCompactionLimitInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigInMemoryCompactionLimitInMbParamsWithHTTPClient creates a new FindConfigInMemoryCompactionLimitInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInMemoryCompactionLimitInMbParamsWithHTTPClient(client *http.Client) *FindConfigInMemoryCompactionLimitInMbParams { + + return &FindConfigInMemoryCompactionLimitInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigInMemoryCompactionLimitInMbParams contains all the parameters to send to the API endpoint +for the find config in memory compaction limit in mb operation typically these are written to a http.Request +*/ +type FindConfigInMemoryCompactionLimitInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) WithTimeout(timeout time.Duration) *FindConfigInMemoryCompactionLimitInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) WithContext(ctx context.Context) *FindConfigInMemoryCompactionLimitInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) WithHTTPClient(client *http.Client) *FindConfigInMemoryCompactionLimitInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config in memory compaction limit in mb params +func (o *FindConfigInMemoryCompactionLimitInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInMemoryCompactionLimitInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_responses.go new file mode 100644 index 00000000000..9c5964b93ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_in_memory_compaction_limit_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInMemoryCompactionLimitInMbReader is a Reader for the FindConfigInMemoryCompactionLimitInMb structure. +type FindConfigInMemoryCompactionLimitInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInMemoryCompactionLimitInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInMemoryCompactionLimitInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInMemoryCompactionLimitInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInMemoryCompactionLimitInMbOK creates a FindConfigInMemoryCompactionLimitInMbOK with default headers values +func NewFindConfigInMemoryCompactionLimitInMbOK() *FindConfigInMemoryCompactionLimitInMbOK { + return &FindConfigInMemoryCompactionLimitInMbOK{} +} + +/*FindConfigInMemoryCompactionLimitInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigInMemoryCompactionLimitInMbOK struct { + Payload int64 +} + +func (o *FindConfigInMemoryCompactionLimitInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigInMemoryCompactionLimitInMbOK) 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 +} + +// NewFindConfigInMemoryCompactionLimitInMbDefault creates a FindConfigInMemoryCompactionLimitInMbDefault with default headers values +func NewFindConfigInMemoryCompactionLimitInMbDefault(code int) *FindConfigInMemoryCompactionLimitInMbDefault { + return &FindConfigInMemoryCompactionLimitInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigInMemoryCompactionLimitInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInMemoryCompactionLimitInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config in memory compaction limit in mb default response +func (o *FindConfigInMemoryCompactionLimitInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInMemoryCompactionLimitInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInMemoryCompactionLimitInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInMemoryCompactionLimitInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_parameters.go new file mode 100644 index 00000000000..7be793fa181 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigIncrementalBackupsParams creates a new FindConfigIncrementalBackupsParams object +// with the default values initialized. +func NewFindConfigIncrementalBackupsParams() *FindConfigIncrementalBackupsParams { + + return &FindConfigIncrementalBackupsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigIncrementalBackupsParamsWithTimeout creates a new FindConfigIncrementalBackupsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigIncrementalBackupsParamsWithTimeout(timeout time.Duration) *FindConfigIncrementalBackupsParams { + + return &FindConfigIncrementalBackupsParams{ + + timeout: timeout, + } +} + +// NewFindConfigIncrementalBackupsParamsWithContext creates a new FindConfigIncrementalBackupsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigIncrementalBackupsParamsWithContext(ctx context.Context) *FindConfigIncrementalBackupsParams { + + return &FindConfigIncrementalBackupsParams{ + + Context: ctx, + } +} + +// NewFindConfigIncrementalBackupsParamsWithHTTPClient creates a new FindConfigIncrementalBackupsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigIncrementalBackupsParamsWithHTTPClient(client *http.Client) *FindConfigIncrementalBackupsParams { + + return &FindConfigIncrementalBackupsParams{ + HTTPClient: client, + } +} + +/*FindConfigIncrementalBackupsParams contains all the parameters to send to the API endpoint +for the find config incremental backups operation typically these are written to a http.Request +*/ +type FindConfigIncrementalBackupsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) WithTimeout(timeout time.Duration) *FindConfigIncrementalBackupsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) WithContext(ctx context.Context) *FindConfigIncrementalBackupsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) WithHTTPClient(client *http.Client) *FindConfigIncrementalBackupsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config incremental backups params +func (o *FindConfigIncrementalBackupsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigIncrementalBackupsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_responses.go new file mode 100644 index 00000000000..9551ff03b67 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_incremental_backups_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigIncrementalBackupsReader is a Reader for the FindConfigIncrementalBackups structure. +type FindConfigIncrementalBackupsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigIncrementalBackupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigIncrementalBackupsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigIncrementalBackupsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigIncrementalBackupsOK creates a FindConfigIncrementalBackupsOK with default headers values +func NewFindConfigIncrementalBackupsOK() *FindConfigIncrementalBackupsOK { + return &FindConfigIncrementalBackupsOK{} +} + +/*FindConfigIncrementalBackupsOK handles this case with default header values. + +Config value +*/ +type FindConfigIncrementalBackupsOK struct { + Payload bool +} + +func (o *FindConfigIncrementalBackupsOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigIncrementalBackupsOK) 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 +} + +// NewFindConfigIncrementalBackupsDefault creates a FindConfigIncrementalBackupsDefault with default headers values +func NewFindConfigIncrementalBackupsDefault(code int) *FindConfigIncrementalBackupsDefault { + return &FindConfigIncrementalBackupsDefault{ + _statusCode: code, + } +} + +/*FindConfigIncrementalBackupsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigIncrementalBackupsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config incremental backups default response +func (o *FindConfigIncrementalBackupsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigIncrementalBackupsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigIncrementalBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigIncrementalBackupsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_parameters.go new file mode 100644 index 00000000000..a8b39ba053f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigIndexSummaryCapacityInMbParams creates a new FindConfigIndexSummaryCapacityInMbParams object +// with the default values initialized. +func NewFindConfigIndexSummaryCapacityInMbParams() *FindConfigIndexSummaryCapacityInMbParams { + + return &FindConfigIndexSummaryCapacityInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigIndexSummaryCapacityInMbParamsWithTimeout creates a new FindConfigIndexSummaryCapacityInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigIndexSummaryCapacityInMbParamsWithTimeout(timeout time.Duration) *FindConfigIndexSummaryCapacityInMbParams { + + return &FindConfigIndexSummaryCapacityInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigIndexSummaryCapacityInMbParamsWithContext creates a new FindConfigIndexSummaryCapacityInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigIndexSummaryCapacityInMbParamsWithContext(ctx context.Context) *FindConfigIndexSummaryCapacityInMbParams { + + return &FindConfigIndexSummaryCapacityInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigIndexSummaryCapacityInMbParamsWithHTTPClient creates a new FindConfigIndexSummaryCapacityInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigIndexSummaryCapacityInMbParamsWithHTTPClient(client *http.Client) *FindConfigIndexSummaryCapacityInMbParams { + + return &FindConfigIndexSummaryCapacityInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigIndexSummaryCapacityInMbParams contains all the parameters to send to the API endpoint +for the find config index summary capacity in mb operation typically these are written to a http.Request +*/ +type FindConfigIndexSummaryCapacityInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) WithTimeout(timeout time.Duration) *FindConfigIndexSummaryCapacityInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) WithContext(ctx context.Context) *FindConfigIndexSummaryCapacityInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) WithHTTPClient(client *http.Client) *FindConfigIndexSummaryCapacityInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config index summary capacity in mb params +func (o *FindConfigIndexSummaryCapacityInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigIndexSummaryCapacityInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_responses.go new file mode 100644 index 00000000000..08072f60e1d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_capacity_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigIndexSummaryCapacityInMbReader is a Reader for the FindConfigIndexSummaryCapacityInMb structure. +type FindConfigIndexSummaryCapacityInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigIndexSummaryCapacityInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigIndexSummaryCapacityInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigIndexSummaryCapacityInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigIndexSummaryCapacityInMbOK creates a FindConfigIndexSummaryCapacityInMbOK with default headers values +func NewFindConfigIndexSummaryCapacityInMbOK() *FindConfigIndexSummaryCapacityInMbOK { + return &FindConfigIndexSummaryCapacityInMbOK{} +} + +/*FindConfigIndexSummaryCapacityInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigIndexSummaryCapacityInMbOK struct { + Payload int64 +} + +func (o *FindConfigIndexSummaryCapacityInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigIndexSummaryCapacityInMbOK) 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 +} + +// NewFindConfigIndexSummaryCapacityInMbDefault creates a FindConfigIndexSummaryCapacityInMbDefault with default headers values +func NewFindConfigIndexSummaryCapacityInMbDefault(code int) *FindConfigIndexSummaryCapacityInMbDefault { + return &FindConfigIndexSummaryCapacityInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigIndexSummaryCapacityInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigIndexSummaryCapacityInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config index summary capacity in mb default response +func (o *FindConfigIndexSummaryCapacityInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigIndexSummaryCapacityInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigIndexSummaryCapacityInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigIndexSummaryCapacityInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_parameters.go new file mode 100644 index 00000000000..b1f0f2bcc3e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigIndexSummaryResizeIntervalInMinutesParams creates a new FindConfigIndexSummaryResizeIntervalInMinutesParams object +// with the default values initialized. +func NewFindConfigIndexSummaryResizeIntervalInMinutesParams() *FindConfigIndexSummaryResizeIntervalInMinutesParams { + + return &FindConfigIndexSummaryResizeIntervalInMinutesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithTimeout creates a new FindConfigIndexSummaryResizeIntervalInMinutesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithTimeout(timeout time.Duration) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + + return &FindConfigIndexSummaryResizeIntervalInMinutesParams{ + + timeout: timeout, + } +} + +// NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithContext creates a new FindConfigIndexSummaryResizeIntervalInMinutesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithContext(ctx context.Context) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + + return &FindConfigIndexSummaryResizeIntervalInMinutesParams{ + + Context: ctx, + } +} + +// NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithHTTPClient creates a new FindConfigIndexSummaryResizeIntervalInMinutesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigIndexSummaryResizeIntervalInMinutesParamsWithHTTPClient(client *http.Client) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + + return &FindConfigIndexSummaryResizeIntervalInMinutesParams{ + HTTPClient: client, + } +} + +/*FindConfigIndexSummaryResizeIntervalInMinutesParams contains all the parameters to send to the API endpoint +for the find config index summary resize interval in minutes operation typically these are written to a http.Request +*/ +type FindConfigIndexSummaryResizeIntervalInMinutesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) WithTimeout(timeout time.Duration) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) WithContext(ctx context.Context) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) WithHTTPClient(client *http.Client) *FindConfigIndexSummaryResizeIntervalInMinutesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config index summary resize interval in minutes params +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigIndexSummaryResizeIntervalInMinutesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_responses.go new file mode 100644 index 00000000000..16b40451148 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_index_summary_resize_interval_in_minutes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigIndexSummaryResizeIntervalInMinutesReader is a Reader for the FindConfigIndexSummaryResizeIntervalInMinutes structure. +type FindConfigIndexSummaryResizeIntervalInMinutesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigIndexSummaryResizeIntervalInMinutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigIndexSummaryResizeIntervalInMinutesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigIndexSummaryResizeIntervalInMinutesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigIndexSummaryResizeIntervalInMinutesOK creates a FindConfigIndexSummaryResizeIntervalInMinutesOK with default headers values +func NewFindConfigIndexSummaryResizeIntervalInMinutesOK() *FindConfigIndexSummaryResizeIntervalInMinutesOK { + return &FindConfigIndexSummaryResizeIntervalInMinutesOK{} +} + +/*FindConfigIndexSummaryResizeIntervalInMinutesOK handles this case with default header values. + +Config value +*/ +type FindConfigIndexSummaryResizeIntervalInMinutesOK struct { + Payload int64 +} + +func (o *FindConfigIndexSummaryResizeIntervalInMinutesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigIndexSummaryResizeIntervalInMinutesOK) 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 +} + +// NewFindConfigIndexSummaryResizeIntervalInMinutesDefault creates a FindConfigIndexSummaryResizeIntervalInMinutesDefault with default headers values +func NewFindConfigIndexSummaryResizeIntervalInMinutesDefault(code int) *FindConfigIndexSummaryResizeIntervalInMinutesDefault { + return &FindConfigIndexSummaryResizeIntervalInMinutesDefault{ + _statusCode: code, + } +} + +/*FindConfigIndexSummaryResizeIntervalInMinutesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigIndexSummaryResizeIntervalInMinutesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config index summary resize interval in minutes default response +func (o *FindConfigIndexSummaryResizeIntervalInMinutesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigIndexSummaryResizeIntervalInMinutesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigIndexSummaryResizeIntervalInMinutesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigIndexSummaryResizeIntervalInMinutesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_parameters.go new file mode 100644 index 00000000000..4a471e10436 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInitialTokenParams creates a new FindConfigInitialTokenParams object +// with the default values initialized. +func NewFindConfigInitialTokenParams() *FindConfigInitialTokenParams { + + return &FindConfigInitialTokenParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInitialTokenParamsWithTimeout creates a new FindConfigInitialTokenParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInitialTokenParamsWithTimeout(timeout time.Duration) *FindConfigInitialTokenParams { + + return &FindConfigInitialTokenParams{ + + timeout: timeout, + } +} + +// NewFindConfigInitialTokenParamsWithContext creates a new FindConfigInitialTokenParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInitialTokenParamsWithContext(ctx context.Context) *FindConfigInitialTokenParams { + + return &FindConfigInitialTokenParams{ + + Context: ctx, + } +} + +// NewFindConfigInitialTokenParamsWithHTTPClient creates a new FindConfigInitialTokenParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInitialTokenParamsWithHTTPClient(client *http.Client) *FindConfigInitialTokenParams { + + return &FindConfigInitialTokenParams{ + HTTPClient: client, + } +} + +/*FindConfigInitialTokenParams contains all the parameters to send to the API endpoint +for the find config initial token operation typically these are written to a http.Request +*/ +type FindConfigInitialTokenParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config initial token params +func (o *FindConfigInitialTokenParams) WithTimeout(timeout time.Duration) *FindConfigInitialTokenParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config initial token params +func (o *FindConfigInitialTokenParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config initial token params +func (o *FindConfigInitialTokenParams) WithContext(ctx context.Context) *FindConfigInitialTokenParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config initial token params +func (o *FindConfigInitialTokenParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config initial token params +func (o *FindConfigInitialTokenParams) WithHTTPClient(client *http.Client) *FindConfigInitialTokenParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config initial token params +func (o *FindConfigInitialTokenParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInitialTokenParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_responses.go new file mode 100644 index 00000000000..8f4f6652ca5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_initial_token_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInitialTokenReader is a Reader for the FindConfigInitialToken structure. +type FindConfigInitialTokenReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInitialTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInitialTokenOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInitialTokenDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInitialTokenOK creates a FindConfigInitialTokenOK with default headers values +func NewFindConfigInitialTokenOK() *FindConfigInitialTokenOK { + return &FindConfigInitialTokenOK{} +} + +/*FindConfigInitialTokenOK handles this case with default header values. + +Config value +*/ +type FindConfigInitialTokenOK struct { + Payload string +} + +func (o *FindConfigInitialTokenOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigInitialTokenOK) 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 +} + +// NewFindConfigInitialTokenDefault creates a FindConfigInitialTokenDefault with default headers values +func NewFindConfigInitialTokenDefault(code int) *FindConfigInitialTokenDefault { + return &FindConfigInitialTokenDefault{ + _statusCode: code, + } +} + +/*FindConfigInitialTokenDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInitialTokenDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config initial token default response +func (o *FindConfigInitialTokenDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInitialTokenDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInitialTokenDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInitialTokenDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_parameters.go new file mode 100644 index 00000000000..0233a39be0c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams creates a new FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized. +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams() *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithTimeout creates a new FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithTimeout(timeout time.Duration) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams{ + + timeout: timeout, + } +} + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithContext creates a new FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithContext(ctx context.Context) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams{ + + Context: ctx, + } +} + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithHTTPClient creates a new FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecParamsWithHTTPClient(client *http.Client) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams{ + HTTPClient: client, + } +} + +/*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams contains all the parameters to send to the API endpoint +for the find config inter dc stream throughput outbound megabits per sec operation typically these are written to a http.Request +*/ +type FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) WithTimeout(timeout time.Duration) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) WithContext(ctx context.Context) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) WithHTTPClient(client *http.Client) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config inter dc stream throughput outbound megabits per sec params +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_responses.go new file mode 100644 index 00000000000..c765ad4dd9f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_stream_throughput_outbound_megabits_per_sec_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInterDcStreamThroughputOutboundMegabitsPerSecReader is a Reader for the FindConfigInterDcStreamThroughputOutboundMegabitsPerSec structure. +type FindConfigInterDcStreamThroughputOutboundMegabitsPerSecReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK creates a FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK with default headers values +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK() *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK { + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK{} +} + +/*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK handles this case with default header values. + +Config value +*/ +type FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK struct { + Payload int64 +} + +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecOK) 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 +} + +// NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault creates a FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault with default headers values +func NewFindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault(code int) *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault { + return &FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault{ + _statusCode: code, + } +} + +/*FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config inter dc stream throughput outbound megabits per sec default response +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInterDcStreamThroughputOutboundMegabitsPerSecDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_parameters.go new file mode 100644 index 00000000000..a608741940d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInterDcTCPNodelayParams creates a new FindConfigInterDcTCPNodelayParams object +// with the default values initialized. +func NewFindConfigInterDcTCPNodelayParams() *FindConfigInterDcTCPNodelayParams { + + return &FindConfigInterDcTCPNodelayParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInterDcTCPNodelayParamsWithTimeout creates a new FindConfigInterDcTCPNodelayParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInterDcTCPNodelayParamsWithTimeout(timeout time.Duration) *FindConfigInterDcTCPNodelayParams { + + return &FindConfigInterDcTCPNodelayParams{ + + timeout: timeout, + } +} + +// NewFindConfigInterDcTCPNodelayParamsWithContext creates a new FindConfigInterDcTCPNodelayParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInterDcTCPNodelayParamsWithContext(ctx context.Context) *FindConfigInterDcTCPNodelayParams { + + return &FindConfigInterDcTCPNodelayParams{ + + Context: ctx, + } +} + +// NewFindConfigInterDcTCPNodelayParamsWithHTTPClient creates a new FindConfigInterDcTCPNodelayParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInterDcTCPNodelayParamsWithHTTPClient(client *http.Client) *FindConfigInterDcTCPNodelayParams { + + return &FindConfigInterDcTCPNodelayParams{ + HTTPClient: client, + } +} + +/*FindConfigInterDcTCPNodelayParams contains all the parameters to send to the API endpoint +for the find config inter dc tcp nodelay operation typically these are written to a http.Request +*/ +type FindConfigInterDcTCPNodelayParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) WithTimeout(timeout time.Duration) *FindConfigInterDcTCPNodelayParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) WithContext(ctx context.Context) *FindConfigInterDcTCPNodelayParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) WithHTTPClient(client *http.Client) *FindConfigInterDcTCPNodelayParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config inter dc tcp nodelay params +func (o *FindConfigInterDcTCPNodelayParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInterDcTCPNodelayParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_responses.go new file mode 100644 index 00000000000..a307063682c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_inter_dc_tcp_nodelay_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInterDcTCPNodelayReader is a Reader for the FindConfigInterDcTCPNodelay structure. +type FindConfigInterDcTCPNodelayReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInterDcTCPNodelayReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInterDcTCPNodelayOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInterDcTCPNodelayDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInterDcTCPNodelayOK creates a FindConfigInterDcTCPNodelayOK with default headers values +func NewFindConfigInterDcTCPNodelayOK() *FindConfigInterDcTCPNodelayOK { + return &FindConfigInterDcTCPNodelayOK{} +} + +/*FindConfigInterDcTCPNodelayOK handles this case with default header values. + +Config value +*/ +type FindConfigInterDcTCPNodelayOK struct { + Payload bool +} + +func (o *FindConfigInterDcTCPNodelayOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigInterDcTCPNodelayOK) 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 +} + +// NewFindConfigInterDcTCPNodelayDefault creates a FindConfigInterDcTCPNodelayDefault with default headers values +func NewFindConfigInterDcTCPNodelayDefault(code int) *FindConfigInterDcTCPNodelayDefault { + return &FindConfigInterDcTCPNodelayDefault{ + _statusCode: code, + } +} + +/*FindConfigInterDcTCPNodelayDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInterDcTCPNodelayDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config inter dc tcp nodelay default response +func (o *FindConfigInterDcTCPNodelayDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInterDcTCPNodelayDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInterDcTCPNodelayDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInterDcTCPNodelayDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_parameters.go new file mode 100644 index 00000000000..6ec8d6748fd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInternodeAuthenticatorParams creates a new FindConfigInternodeAuthenticatorParams object +// with the default values initialized. +func NewFindConfigInternodeAuthenticatorParams() *FindConfigInternodeAuthenticatorParams { + + return &FindConfigInternodeAuthenticatorParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInternodeAuthenticatorParamsWithTimeout creates a new FindConfigInternodeAuthenticatorParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInternodeAuthenticatorParamsWithTimeout(timeout time.Duration) *FindConfigInternodeAuthenticatorParams { + + return &FindConfigInternodeAuthenticatorParams{ + + timeout: timeout, + } +} + +// NewFindConfigInternodeAuthenticatorParamsWithContext creates a new FindConfigInternodeAuthenticatorParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInternodeAuthenticatorParamsWithContext(ctx context.Context) *FindConfigInternodeAuthenticatorParams { + + return &FindConfigInternodeAuthenticatorParams{ + + Context: ctx, + } +} + +// NewFindConfigInternodeAuthenticatorParamsWithHTTPClient creates a new FindConfigInternodeAuthenticatorParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInternodeAuthenticatorParamsWithHTTPClient(client *http.Client) *FindConfigInternodeAuthenticatorParams { + + return &FindConfigInternodeAuthenticatorParams{ + HTTPClient: client, + } +} + +/*FindConfigInternodeAuthenticatorParams contains all the parameters to send to the API endpoint +for the find config internode authenticator operation typically these are written to a http.Request +*/ +type FindConfigInternodeAuthenticatorParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) WithTimeout(timeout time.Duration) *FindConfigInternodeAuthenticatorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) WithContext(ctx context.Context) *FindConfigInternodeAuthenticatorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) WithHTTPClient(client *http.Client) *FindConfigInternodeAuthenticatorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config internode authenticator params +func (o *FindConfigInternodeAuthenticatorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInternodeAuthenticatorParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_responses.go new file mode 100644 index 00000000000..55404d1f051 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_authenticator_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInternodeAuthenticatorReader is a Reader for the FindConfigInternodeAuthenticator structure. +type FindConfigInternodeAuthenticatorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInternodeAuthenticatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInternodeAuthenticatorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInternodeAuthenticatorDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInternodeAuthenticatorOK creates a FindConfigInternodeAuthenticatorOK with default headers values +func NewFindConfigInternodeAuthenticatorOK() *FindConfigInternodeAuthenticatorOK { + return &FindConfigInternodeAuthenticatorOK{} +} + +/*FindConfigInternodeAuthenticatorOK handles this case with default header values. + +Config value +*/ +type FindConfigInternodeAuthenticatorOK struct { + Payload string +} + +func (o *FindConfigInternodeAuthenticatorOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigInternodeAuthenticatorOK) 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 +} + +// NewFindConfigInternodeAuthenticatorDefault creates a FindConfigInternodeAuthenticatorDefault with default headers values +func NewFindConfigInternodeAuthenticatorDefault(code int) *FindConfigInternodeAuthenticatorDefault { + return &FindConfigInternodeAuthenticatorDefault{ + _statusCode: code, + } +} + +/*FindConfigInternodeAuthenticatorDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInternodeAuthenticatorDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config internode authenticator default response +func (o *FindConfigInternodeAuthenticatorDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInternodeAuthenticatorDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInternodeAuthenticatorDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInternodeAuthenticatorDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_parameters.go new file mode 100644 index 00000000000..ee893daefd5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInternodeCompressionParams creates a new FindConfigInternodeCompressionParams object +// with the default values initialized. +func NewFindConfigInternodeCompressionParams() *FindConfigInternodeCompressionParams { + + return &FindConfigInternodeCompressionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInternodeCompressionParamsWithTimeout creates a new FindConfigInternodeCompressionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInternodeCompressionParamsWithTimeout(timeout time.Duration) *FindConfigInternodeCompressionParams { + + return &FindConfigInternodeCompressionParams{ + + timeout: timeout, + } +} + +// NewFindConfigInternodeCompressionParamsWithContext creates a new FindConfigInternodeCompressionParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInternodeCompressionParamsWithContext(ctx context.Context) *FindConfigInternodeCompressionParams { + + return &FindConfigInternodeCompressionParams{ + + Context: ctx, + } +} + +// NewFindConfigInternodeCompressionParamsWithHTTPClient creates a new FindConfigInternodeCompressionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInternodeCompressionParamsWithHTTPClient(client *http.Client) *FindConfigInternodeCompressionParams { + + return &FindConfigInternodeCompressionParams{ + HTTPClient: client, + } +} + +/*FindConfigInternodeCompressionParams contains all the parameters to send to the API endpoint +for the find config internode compression operation typically these are written to a http.Request +*/ +type FindConfigInternodeCompressionParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) WithTimeout(timeout time.Duration) *FindConfigInternodeCompressionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) WithContext(ctx context.Context) *FindConfigInternodeCompressionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) WithHTTPClient(client *http.Client) *FindConfigInternodeCompressionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config internode compression params +func (o *FindConfigInternodeCompressionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInternodeCompressionParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_responses.go new file mode 100644 index 00000000000..14722ad58f7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_compression_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInternodeCompressionReader is a Reader for the FindConfigInternodeCompression structure. +type FindConfigInternodeCompressionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInternodeCompressionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInternodeCompressionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInternodeCompressionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInternodeCompressionOK creates a FindConfigInternodeCompressionOK with default headers values +func NewFindConfigInternodeCompressionOK() *FindConfigInternodeCompressionOK { + return &FindConfigInternodeCompressionOK{} +} + +/*FindConfigInternodeCompressionOK handles this case with default header values. + +Config value +*/ +type FindConfigInternodeCompressionOK struct { + Payload string +} + +func (o *FindConfigInternodeCompressionOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigInternodeCompressionOK) 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 +} + +// NewFindConfigInternodeCompressionDefault creates a FindConfigInternodeCompressionDefault with default headers values +func NewFindConfigInternodeCompressionDefault(code int) *FindConfigInternodeCompressionDefault { + return &FindConfigInternodeCompressionDefault{ + _statusCode: code, + } +} + +/*FindConfigInternodeCompressionDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInternodeCompressionDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config internode compression default response +func (o *FindConfigInternodeCompressionDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInternodeCompressionDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInternodeCompressionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInternodeCompressionDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_parameters.go new file mode 100644 index 00000000000..47eaeffc131 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInternodeRecvBuffSizeInBytesParams creates a new FindConfigInternodeRecvBuffSizeInBytesParams object +// with the default values initialized. +func NewFindConfigInternodeRecvBuffSizeInBytesParams() *FindConfigInternodeRecvBuffSizeInBytesParams { + + return &FindConfigInternodeRecvBuffSizeInBytesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInternodeRecvBuffSizeInBytesParamsWithTimeout creates a new FindConfigInternodeRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInternodeRecvBuffSizeInBytesParamsWithTimeout(timeout time.Duration) *FindConfigInternodeRecvBuffSizeInBytesParams { + + return &FindConfigInternodeRecvBuffSizeInBytesParams{ + + timeout: timeout, + } +} + +// NewFindConfigInternodeRecvBuffSizeInBytesParamsWithContext creates a new FindConfigInternodeRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInternodeRecvBuffSizeInBytesParamsWithContext(ctx context.Context) *FindConfigInternodeRecvBuffSizeInBytesParams { + + return &FindConfigInternodeRecvBuffSizeInBytesParams{ + + Context: ctx, + } +} + +// NewFindConfigInternodeRecvBuffSizeInBytesParamsWithHTTPClient creates a new FindConfigInternodeRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInternodeRecvBuffSizeInBytesParamsWithHTTPClient(client *http.Client) *FindConfigInternodeRecvBuffSizeInBytesParams { + + return &FindConfigInternodeRecvBuffSizeInBytesParams{ + HTTPClient: client, + } +} + +/*FindConfigInternodeRecvBuffSizeInBytesParams contains all the parameters to send to the API endpoint +for the find config internode recv buff size in bytes operation typically these are written to a http.Request +*/ +type FindConfigInternodeRecvBuffSizeInBytesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) WithTimeout(timeout time.Duration) *FindConfigInternodeRecvBuffSizeInBytesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) WithContext(ctx context.Context) *FindConfigInternodeRecvBuffSizeInBytesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) WithHTTPClient(client *http.Client) *FindConfigInternodeRecvBuffSizeInBytesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config internode recv buff size in bytes params +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInternodeRecvBuffSizeInBytesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_responses.go new file mode 100644 index 00000000000..c2ecd148a74 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_recv_buff_size_in_bytes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInternodeRecvBuffSizeInBytesReader is a Reader for the FindConfigInternodeRecvBuffSizeInBytes structure. +type FindConfigInternodeRecvBuffSizeInBytesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInternodeRecvBuffSizeInBytesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInternodeRecvBuffSizeInBytesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInternodeRecvBuffSizeInBytesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInternodeRecvBuffSizeInBytesOK creates a FindConfigInternodeRecvBuffSizeInBytesOK with default headers values +func NewFindConfigInternodeRecvBuffSizeInBytesOK() *FindConfigInternodeRecvBuffSizeInBytesOK { + return &FindConfigInternodeRecvBuffSizeInBytesOK{} +} + +/*FindConfigInternodeRecvBuffSizeInBytesOK handles this case with default header values. + +Config value +*/ +type FindConfigInternodeRecvBuffSizeInBytesOK struct { + Payload int64 +} + +func (o *FindConfigInternodeRecvBuffSizeInBytesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigInternodeRecvBuffSizeInBytesOK) 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 +} + +// NewFindConfigInternodeRecvBuffSizeInBytesDefault creates a FindConfigInternodeRecvBuffSizeInBytesDefault with default headers values +func NewFindConfigInternodeRecvBuffSizeInBytesDefault(code int) *FindConfigInternodeRecvBuffSizeInBytesDefault { + return &FindConfigInternodeRecvBuffSizeInBytesDefault{ + _statusCode: code, + } +} + +/*FindConfigInternodeRecvBuffSizeInBytesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInternodeRecvBuffSizeInBytesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config internode recv buff size in bytes default response +func (o *FindConfigInternodeRecvBuffSizeInBytesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInternodeRecvBuffSizeInBytesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInternodeRecvBuffSizeInBytesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInternodeRecvBuffSizeInBytesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_parameters.go new file mode 100644 index 00000000000..11c99686731 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigInternodeSendBuffSizeInBytesParams creates a new FindConfigInternodeSendBuffSizeInBytesParams object +// with the default values initialized. +func NewFindConfigInternodeSendBuffSizeInBytesParams() *FindConfigInternodeSendBuffSizeInBytesParams { + + return &FindConfigInternodeSendBuffSizeInBytesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigInternodeSendBuffSizeInBytesParamsWithTimeout creates a new FindConfigInternodeSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigInternodeSendBuffSizeInBytesParamsWithTimeout(timeout time.Duration) *FindConfigInternodeSendBuffSizeInBytesParams { + + return &FindConfigInternodeSendBuffSizeInBytesParams{ + + timeout: timeout, + } +} + +// NewFindConfigInternodeSendBuffSizeInBytesParamsWithContext creates a new FindConfigInternodeSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigInternodeSendBuffSizeInBytesParamsWithContext(ctx context.Context) *FindConfigInternodeSendBuffSizeInBytesParams { + + return &FindConfigInternodeSendBuffSizeInBytesParams{ + + Context: ctx, + } +} + +// NewFindConfigInternodeSendBuffSizeInBytesParamsWithHTTPClient creates a new FindConfigInternodeSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigInternodeSendBuffSizeInBytesParamsWithHTTPClient(client *http.Client) *FindConfigInternodeSendBuffSizeInBytesParams { + + return &FindConfigInternodeSendBuffSizeInBytesParams{ + HTTPClient: client, + } +} + +/*FindConfigInternodeSendBuffSizeInBytesParams contains all the parameters to send to the API endpoint +for the find config internode send buff size in bytes operation typically these are written to a http.Request +*/ +type FindConfigInternodeSendBuffSizeInBytesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) WithTimeout(timeout time.Duration) *FindConfigInternodeSendBuffSizeInBytesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) WithContext(ctx context.Context) *FindConfigInternodeSendBuffSizeInBytesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) WithHTTPClient(client *http.Client) *FindConfigInternodeSendBuffSizeInBytesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config internode send buff size in bytes params +func (o *FindConfigInternodeSendBuffSizeInBytesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigInternodeSendBuffSizeInBytesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_responses.go new file mode 100644 index 00000000000..54ee1b2e137 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_internode_send_buff_size_in_bytes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigInternodeSendBuffSizeInBytesReader is a Reader for the FindConfigInternodeSendBuffSizeInBytes structure. +type FindConfigInternodeSendBuffSizeInBytesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigInternodeSendBuffSizeInBytesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigInternodeSendBuffSizeInBytesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigInternodeSendBuffSizeInBytesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigInternodeSendBuffSizeInBytesOK creates a FindConfigInternodeSendBuffSizeInBytesOK with default headers values +func NewFindConfigInternodeSendBuffSizeInBytesOK() *FindConfigInternodeSendBuffSizeInBytesOK { + return &FindConfigInternodeSendBuffSizeInBytesOK{} +} + +/*FindConfigInternodeSendBuffSizeInBytesOK handles this case with default header values. + +Config value +*/ +type FindConfigInternodeSendBuffSizeInBytesOK struct { + Payload int64 +} + +func (o *FindConfigInternodeSendBuffSizeInBytesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigInternodeSendBuffSizeInBytesOK) 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 +} + +// NewFindConfigInternodeSendBuffSizeInBytesDefault creates a FindConfigInternodeSendBuffSizeInBytesDefault with default headers values +func NewFindConfigInternodeSendBuffSizeInBytesDefault(code int) *FindConfigInternodeSendBuffSizeInBytesDefault { + return &FindConfigInternodeSendBuffSizeInBytesDefault{ + _statusCode: code, + } +} + +/*FindConfigInternodeSendBuffSizeInBytesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigInternodeSendBuffSizeInBytesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config internode send buff size in bytes default response +func (o *FindConfigInternodeSendBuffSizeInBytesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigInternodeSendBuffSizeInBytesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigInternodeSendBuffSizeInBytesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigInternodeSendBuffSizeInBytesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_parameters.go new file mode 100644 index 00000000000..b2030f4c2bd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigJoinRingParams creates a new FindConfigJoinRingParams object +// with the default values initialized. +func NewFindConfigJoinRingParams() *FindConfigJoinRingParams { + + return &FindConfigJoinRingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigJoinRingParamsWithTimeout creates a new FindConfigJoinRingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigJoinRingParamsWithTimeout(timeout time.Duration) *FindConfigJoinRingParams { + + return &FindConfigJoinRingParams{ + + timeout: timeout, + } +} + +// NewFindConfigJoinRingParamsWithContext creates a new FindConfigJoinRingParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigJoinRingParamsWithContext(ctx context.Context) *FindConfigJoinRingParams { + + return &FindConfigJoinRingParams{ + + Context: ctx, + } +} + +// NewFindConfigJoinRingParamsWithHTTPClient creates a new FindConfigJoinRingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigJoinRingParamsWithHTTPClient(client *http.Client) *FindConfigJoinRingParams { + + return &FindConfigJoinRingParams{ + HTTPClient: client, + } +} + +/*FindConfigJoinRingParams contains all the parameters to send to the API endpoint +for the find config join ring operation typically these are written to a http.Request +*/ +type FindConfigJoinRingParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config join ring params +func (o *FindConfigJoinRingParams) WithTimeout(timeout time.Duration) *FindConfigJoinRingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config join ring params +func (o *FindConfigJoinRingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config join ring params +func (o *FindConfigJoinRingParams) WithContext(ctx context.Context) *FindConfigJoinRingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config join ring params +func (o *FindConfigJoinRingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config join ring params +func (o *FindConfigJoinRingParams) WithHTTPClient(client *http.Client) *FindConfigJoinRingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config join ring params +func (o *FindConfigJoinRingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigJoinRingParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_responses.go new file mode 100644 index 00000000000..02bf5bf4dc5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_join_ring_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigJoinRingReader is a Reader for the FindConfigJoinRing structure. +type FindConfigJoinRingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigJoinRingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigJoinRingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigJoinRingDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigJoinRingOK creates a FindConfigJoinRingOK with default headers values +func NewFindConfigJoinRingOK() *FindConfigJoinRingOK { + return &FindConfigJoinRingOK{} +} + +/*FindConfigJoinRingOK handles this case with default header values. + +Config value +*/ +type FindConfigJoinRingOK struct { + Payload bool +} + +func (o *FindConfigJoinRingOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigJoinRingOK) 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 +} + +// NewFindConfigJoinRingDefault creates a FindConfigJoinRingDefault with default headers values +func NewFindConfigJoinRingDefault(code int) *FindConfigJoinRingDefault { + return &FindConfigJoinRingDefault{ + _statusCode: code, + } +} + +/*FindConfigJoinRingDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigJoinRingDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config join ring default response +func (o *FindConfigJoinRingDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigJoinRingDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigJoinRingDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigJoinRingDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_parameters.go new file mode 100644 index 00000000000..3b08d4212bd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigKeyCacheKeysToSaveParams creates a new FindConfigKeyCacheKeysToSaveParams object +// with the default values initialized. +func NewFindConfigKeyCacheKeysToSaveParams() *FindConfigKeyCacheKeysToSaveParams { + + return &FindConfigKeyCacheKeysToSaveParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigKeyCacheKeysToSaveParamsWithTimeout creates a new FindConfigKeyCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigKeyCacheKeysToSaveParamsWithTimeout(timeout time.Duration) *FindConfigKeyCacheKeysToSaveParams { + + return &FindConfigKeyCacheKeysToSaveParams{ + + timeout: timeout, + } +} + +// NewFindConfigKeyCacheKeysToSaveParamsWithContext creates a new FindConfigKeyCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigKeyCacheKeysToSaveParamsWithContext(ctx context.Context) *FindConfigKeyCacheKeysToSaveParams { + + return &FindConfigKeyCacheKeysToSaveParams{ + + Context: ctx, + } +} + +// NewFindConfigKeyCacheKeysToSaveParamsWithHTTPClient creates a new FindConfigKeyCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigKeyCacheKeysToSaveParamsWithHTTPClient(client *http.Client) *FindConfigKeyCacheKeysToSaveParams { + + return &FindConfigKeyCacheKeysToSaveParams{ + HTTPClient: client, + } +} + +/*FindConfigKeyCacheKeysToSaveParams contains all the parameters to send to the API endpoint +for the find config key cache keys to save operation typically these are written to a http.Request +*/ +type FindConfigKeyCacheKeysToSaveParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) WithTimeout(timeout time.Duration) *FindConfigKeyCacheKeysToSaveParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) WithContext(ctx context.Context) *FindConfigKeyCacheKeysToSaveParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) WithHTTPClient(client *http.Client) *FindConfigKeyCacheKeysToSaveParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config key cache keys to save params +func (o *FindConfigKeyCacheKeysToSaveParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigKeyCacheKeysToSaveParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_responses.go new file mode 100644 index 00000000000..e5536762dc1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_keys_to_save_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigKeyCacheKeysToSaveReader is a Reader for the FindConfigKeyCacheKeysToSave structure. +type FindConfigKeyCacheKeysToSaveReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigKeyCacheKeysToSaveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigKeyCacheKeysToSaveOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigKeyCacheKeysToSaveDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigKeyCacheKeysToSaveOK creates a FindConfigKeyCacheKeysToSaveOK with default headers values +func NewFindConfigKeyCacheKeysToSaveOK() *FindConfigKeyCacheKeysToSaveOK { + return &FindConfigKeyCacheKeysToSaveOK{} +} + +/*FindConfigKeyCacheKeysToSaveOK handles this case with default header values. + +Config value +*/ +type FindConfigKeyCacheKeysToSaveOK struct { + Payload int64 +} + +func (o *FindConfigKeyCacheKeysToSaveOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigKeyCacheKeysToSaveOK) 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 +} + +// NewFindConfigKeyCacheKeysToSaveDefault creates a FindConfigKeyCacheKeysToSaveDefault with default headers values +func NewFindConfigKeyCacheKeysToSaveDefault(code int) *FindConfigKeyCacheKeysToSaveDefault { + return &FindConfigKeyCacheKeysToSaveDefault{ + _statusCode: code, + } +} + +/*FindConfigKeyCacheKeysToSaveDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigKeyCacheKeysToSaveDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config key cache keys to save default response +func (o *FindConfigKeyCacheKeysToSaveDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigKeyCacheKeysToSaveDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigKeyCacheKeysToSaveDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigKeyCacheKeysToSaveDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_parameters.go new file mode 100644 index 00000000000..6fc640def84 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigKeyCacheSavePeriodParams creates a new FindConfigKeyCacheSavePeriodParams object +// with the default values initialized. +func NewFindConfigKeyCacheSavePeriodParams() *FindConfigKeyCacheSavePeriodParams { + + return &FindConfigKeyCacheSavePeriodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigKeyCacheSavePeriodParamsWithTimeout creates a new FindConfigKeyCacheSavePeriodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigKeyCacheSavePeriodParamsWithTimeout(timeout time.Duration) *FindConfigKeyCacheSavePeriodParams { + + return &FindConfigKeyCacheSavePeriodParams{ + + timeout: timeout, + } +} + +// NewFindConfigKeyCacheSavePeriodParamsWithContext creates a new FindConfigKeyCacheSavePeriodParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigKeyCacheSavePeriodParamsWithContext(ctx context.Context) *FindConfigKeyCacheSavePeriodParams { + + return &FindConfigKeyCacheSavePeriodParams{ + + Context: ctx, + } +} + +// NewFindConfigKeyCacheSavePeriodParamsWithHTTPClient creates a new FindConfigKeyCacheSavePeriodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigKeyCacheSavePeriodParamsWithHTTPClient(client *http.Client) *FindConfigKeyCacheSavePeriodParams { + + return &FindConfigKeyCacheSavePeriodParams{ + HTTPClient: client, + } +} + +/*FindConfigKeyCacheSavePeriodParams contains all the parameters to send to the API endpoint +for the find config key cache save period operation typically these are written to a http.Request +*/ +type FindConfigKeyCacheSavePeriodParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) WithTimeout(timeout time.Duration) *FindConfigKeyCacheSavePeriodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) WithContext(ctx context.Context) *FindConfigKeyCacheSavePeriodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) WithHTTPClient(client *http.Client) *FindConfigKeyCacheSavePeriodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config key cache save period params +func (o *FindConfigKeyCacheSavePeriodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigKeyCacheSavePeriodParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_responses.go new file mode 100644 index 00000000000..1963b494d32 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_save_period_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigKeyCacheSavePeriodReader is a Reader for the FindConfigKeyCacheSavePeriod structure. +type FindConfigKeyCacheSavePeriodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigKeyCacheSavePeriodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigKeyCacheSavePeriodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigKeyCacheSavePeriodDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigKeyCacheSavePeriodOK creates a FindConfigKeyCacheSavePeriodOK with default headers values +func NewFindConfigKeyCacheSavePeriodOK() *FindConfigKeyCacheSavePeriodOK { + return &FindConfigKeyCacheSavePeriodOK{} +} + +/*FindConfigKeyCacheSavePeriodOK handles this case with default header values. + +Config value +*/ +type FindConfigKeyCacheSavePeriodOK struct { + Payload int64 +} + +func (o *FindConfigKeyCacheSavePeriodOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigKeyCacheSavePeriodOK) 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 +} + +// NewFindConfigKeyCacheSavePeriodDefault creates a FindConfigKeyCacheSavePeriodDefault with default headers values +func NewFindConfigKeyCacheSavePeriodDefault(code int) *FindConfigKeyCacheSavePeriodDefault { + return &FindConfigKeyCacheSavePeriodDefault{ + _statusCode: code, + } +} + +/*FindConfigKeyCacheSavePeriodDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigKeyCacheSavePeriodDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config key cache save period default response +func (o *FindConfigKeyCacheSavePeriodDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigKeyCacheSavePeriodDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigKeyCacheSavePeriodDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigKeyCacheSavePeriodDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_parameters.go new file mode 100644 index 00000000000..a55140dfc61 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigKeyCacheSizeInMbParams creates a new FindConfigKeyCacheSizeInMbParams object +// with the default values initialized. +func NewFindConfigKeyCacheSizeInMbParams() *FindConfigKeyCacheSizeInMbParams { + + return &FindConfigKeyCacheSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigKeyCacheSizeInMbParamsWithTimeout creates a new FindConfigKeyCacheSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigKeyCacheSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigKeyCacheSizeInMbParams { + + return &FindConfigKeyCacheSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigKeyCacheSizeInMbParamsWithContext creates a new FindConfigKeyCacheSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigKeyCacheSizeInMbParamsWithContext(ctx context.Context) *FindConfigKeyCacheSizeInMbParams { + + return &FindConfigKeyCacheSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigKeyCacheSizeInMbParamsWithHTTPClient creates a new FindConfigKeyCacheSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigKeyCacheSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigKeyCacheSizeInMbParams { + + return &FindConfigKeyCacheSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigKeyCacheSizeInMbParams contains all the parameters to send to the API endpoint +for the find config key cache size in mb operation typically these are written to a http.Request +*/ +type FindConfigKeyCacheSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigKeyCacheSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) WithContext(ctx context.Context) *FindConfigKeyCacheSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigKeyCacheSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config key cache size in mb params +func (o *FindConfigKeyCacheSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigKeyCacheSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_responses.go new file mode 100644 index 00000000000..b9130c9ad0a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_key_cache_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigKeyCacheSizeInMbReader is a Reader for the FindConfigKeyCacheSizeInMb structure. +type FindConfigKeyCacheSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigKeyCacheSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigKeyCacheSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigKeyCacheSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigKeyCacheSizeInMbOK creates a FindConfigKeyCacheSizeInMbOK with default headers values +func NewFindConfigKeyCacheSizeInMbOK() *FindConfigKeyCacheSizeInMbOK { + return &FindConfigKeyCacheSizeInMbOK{} +} + +/*FindConfigKeyCacheSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigKeyCacheSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigKeyCacheSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigKeyCacheSizeInMbOK) 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 +} + +// NewFindConfigKeyCacheSizeInMbDefault creates a FindConfigKeyCacheSizeInMbDefault with default headers values +func NewFindConfigKeyCacheSizeInMbDefault(code int) *FindConfigKeyCacheSizeInMbDefault { + return &FindConfigKeyCacheSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigKeyCacheSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigKeyCacheSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config key cache size in mb default response +func (o *FindConfigKeyCacheSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigKeyCacheSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigKeyCacheSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigKeyCacheSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_parameters.go new file mode 100644 index 00000000000..a38c59ec2c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLargeMemoryAllocationWarningThresholdParams creates a new FindConfigLargeMemoryAllocationWarningThresholdParams object +// with the default values initialized. +func NewFindConfigLargeMemoryAllocationWarningThresholdParams() *FindConfigLargeMemoryAllocationWarningThresholdParams { + + return &FindConfigLargeMemoryAllocationWarningThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithTimeout creates a new FindConfigLargeMemoryAllocationWarningThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithTimeout(timeout time.Duration) *FindConfigLargeMemoryAllocationWarningThresholdParams { + + return &FindConfigLargeMemoryAllocationWarningThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithContext creates a new FindConfigLargeMemoryAllocationWarningThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithContext(ctx context.Context) *FindConfigLargeMemoryAllocationWarningThresholdParams { + + return &FindConfigLargeMemoryAllocationWarningThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithHTTPClient creates a new FindConfigLargeMemoryAllocationWarningThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLargeMemoryAllocationWarningThresholdParamsWithHTTPClient(client *http.Client) *FindConfigLargeMemoryAllocationWarningThresholdParams { + + return &FindConfigLargeMemoryAllocationWarningThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigLargeMemoryAllocationWarningThresholdParams contains all the parameters to send to the API endpoint +for the find config large memory allocation warning threshold operation typically these are written to a http.Request +*/ +type FindConfigLargeMemoryAllocationWarningThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) WithTimeout(timeout time.Duration) *FindConfigLargeMemoryAllocationWarningThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) WithContext(ctx context.Context) *FindConfigLargeMemoryAllocationWarningThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) WithHTTPClient(client *http.Client) *FindConfigLargeMemoryAllocationWarningThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config large memory allocation warning threshold params +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLargeMemoryAllocationWarningThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_responses.go new file mode 100644 index 00000000000..6fdc27fcb41 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_large_memory_allocation_warning_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLargeMemoryAllocationWarningThresholdReader is a Reader for the FindConfigLargeMemoryAllocationWarningThreshold structure. +type FindConfigLargeMemoryAllocationWarningThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLargeMemoryAllocationWarningThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLargeMemoryAllocationWarningThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLargeMemoryAllocationWarningThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLargeMemoryAllocationWarningThresholdOK creates a FindConfigLargeMemoryAllocationWarningThresholdOK with default headers values +func NewFindConfigLargeMemoryAllocationWarningThresholdOK() *FindConfigLargeMemoryAllocationWarningThresholdOK { + return &FindConfigLargeMemoryAllocationWarningThresholdOK{} +} + +/*FindConfigLargeMemoryAllocationWarningThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigLargeMemoryAllocationWarningThresholdOK struct { + Payload int64 +} + +func (o *FindConfigLargeMemoryAllocationWarningThresholdOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigLargeMemoryAllocationWarningThresholdOK) 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 +} + +// NewFindConfigLargeMemoryAllocationWarningThresholdDefault creates a FindConfigLargeMemoryAllocationWarningThresholdDefault with default headers values +func NewFindConfigLargeMemoryAllocationWarningThresholdDefault(code int) *FindConfigLargeMemoryAllocationWarningThresholdDefault { + return &FindConfigLargeMemoryAllocationWarningThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigLargeMemoryAllocationWarningThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLargeMemoryAllocationWarningThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config large memory allocation warning threshold default response +func (o *FindConfigLargeMemoryAllocationWarningThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLargeMemoryAllocationWarningThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLargeMemoryAllocationWarningThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLargeMemoryAllocationWarningThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_parameters.go new file mode 100644 index 00000000000..76eca186f1f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigListenAddressParams creates a new FindConfigListenAddressParams object +// with the default values initialized. +func NewFindConfigListenAddressParams() *FindConfigListenAddressParams { + + return &FindConfigListenAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigListenAddressParamsWithTimeout creates a new FindConfigListenAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigListenAddressParamsWithTimeout(timeout time.Duration) *FindConfigListenAddressParams { + + return &FindConfigListenAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigListenAddressParamsWithContext creates a new FindConfigListenAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigListenAddressParamsWithContext(ctx context.Context) *FindConfigListenAddressParams { + + return &FindConfigListenAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigListenAddressParamsWithHTTPClient creates a new FindConfigListenAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigListenAddressParamsWithHTTPClient(client *http.Client) *FindConfigListenAddressParams { + + return &FindConfigListenAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigListenAddressParams contains all the parameters to send to the API endpoint +for the find config listen address operation typically these are written to a http.Request +*/ +type FindConfigListenAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config listen address params +func (o *FindConfigListenAddressParams) WithTimeout(timeout time.Duration) *FindConfigListenAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config listen address params +func (o *FindConfigListenAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config listen address params +func (o *FindConfigListenAddressParams) WithContext(ctx context.Context) *FindConfigListenAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config listen address params +func (o *FindConfigListenAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config listen address params +func (o *FindConfigListenAddressParams) WithHTTPClient(client *http.Client) *FindConfigListenAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config listen address params +func (o *FindConfigListenAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigListenAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_responses.go new file mode 100644 index 00000000000..aa1709393ec --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigListenAddressReader is a Reader for the FindConfigListenAddress structure. +type FindConfigListenAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigListenAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigListenAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigListenAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigListenAddressOK creates a FindConfigListenAddressOK with default headers values +func NewFindConfigListenAddressOK() *FindConfigListenAddressOK { + return &FindConfigListenAddressOK{} +} + +/*FindConfigListenAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigListenAddressOK struct { + Payload string +} + +func (o *FindConfigListenAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigListenAddressOK) 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 +} + +// NewFindConfigListenAddressDefault creates a FindConfigListenAddressDefault with default headers values +func NewFindConfigListenAddressDefault(code int) *FindConfigListenAddressDefault { + return &FindConfigListenAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigListenAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigListenAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config listen address default response +func (o *FindConfigListenAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigListenAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigListenAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigListenAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_parameters.go new file mode 100644 index 00000000000..e34088cf919 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigListenInterfaceParams creates a new FindConfigListenInterfaceParams object +// with the default values initialized. +func NewFindConfigListenInterfaceParams() *FindConfigListenInterfaceParams { + + return &FindConfigListenInterfaceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigListenInterfaceParamsWithTimeout creates a new FindConfigListenInterfaceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigListenInterfaceParamsWithTimeout(timeout time.Duration) *FindConfigListenInterfaceParams { + + return &FindConfigListenInterfaceParams{ + + timeout: timeout, + } +} + +// NewFindConfigListenInterfaceParamsWithContext creates a new FindConfigListenInterfaceParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigListenInterfaceParamsWithContext(ctx context.Context) *FindConfigListenInterfaceParams { + + return &FindConfigListenInterfaceParams{ + + Context: ctx, + } +} + +// NewFindConfigListenInterfaceParamsWithHTTPClient creates a new FindConfigListenInterfaceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigListenInterfaceParamsWithHTTPClient(client *http.Client) *FindConfigListenInterfaceParams { + + return &FindConfigListenInterfaceParams{ + HTTPClient: client, + } +} + +/*FindConfigListenInterfaceParams contains all the parameters to send to the API endpoint +for the find config listen interface operation typically these are written to a http.Request +*/ +type FindConfigListenInterfaceParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config listen interface params +func (o *FindConfigListenInterfaceParams) WithTimeout(timeout time.Duration) *FindConfigListenInterfaceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config listen interface params +func (o *FindConfigListenInterfaceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config listen interface params +func (o *FindConfigListenInterfaceParams) WithContext(ctx context.Context) *FindConfigListenInterfaceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config listen interface params +func (o *FindConfigListenInterfaceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config listen interface params +func (o *FindConfigListenInterfaceParams) WithHTTPClient(client *http.Client) *FindConfigListenInterfaceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config listen interface params +func (o *FindConfigListenInterfaceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigListenInterfaceParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_responses.go new file mode 100644 index 00000000000..2dfa08605f3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_interface_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigListenInterfaceReader is a Reader for the FindConfigListenInterface structure. +type FindConfigListenInterfaceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigListenInterfaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigListenInterfaceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigListenInterfaceDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigListenInterfaceOK creates a FindConfigListenInterfaceOK with default headers values +func NewFindConfigListenInterfaceOK() *FindConfigListenInterfaceOK { + return &FindConfigListenInterfaceOK{} +} + +/*FindConfigListenInterfaceOK handles this case with default header values. + +Config value +*/ +type FindConfigListenInterfaceOK struct { + Payload string +} + +func (o *FindConfigListenInterfaceOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigListenInterfaceOK) 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 +} + +// NewFindConfigListenInterfaceDefault creates a FindConfigListenInterfaceDefault with default headers values +func NewFindConfigListenInterfaceDefault(code int) *FindConfigListenInterfaceDefault { + return &FindConfigListenInterfaceDefault{ + _statusCode: code, + } +} + +/*FindConfigListenInterfaceDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigListenInterfaceDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config listen interface default response +func (o *FindConfigListenInterfaceDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigListenInterfaceDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigListenInterfaceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigListenInterfaceDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_parameters.go new file mode 100644 index 00000000000..1024cedb770 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigListenOnBroadcastAddressParams creates a new FindConfigListenOnBroadcastAddressParams object +// with the default values initialized. +func NewFindConfigListenOnBroadcastAddressParams() *FindConfigListenOnBroadcastAddressParams { + + return &FindConfigListenOnBroadcastAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigListenOnBroadcastAddressParamsWithTimeout creates a new FindConfigListenOnBroadcastAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigListenOnBroadcastAddressParamsWithTimeout(timeout time.Duration) *FindConfigListenOnBroadcastAddressParams { + + return &FindConfigListenOnBroadcastAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigListenOnBroadcastAddressParamsWithContext creates a new FindConfigListenOnBroadcastAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigListenOnBroadcastAddressParamsWithContext(ctx context.Context) *FindConfigListenOnBroadcastAddressParams { + + return &FindConfigListenOnBroadcastAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigListenOnBroadcastAddressParamsWithHTTPClient creates a new FindConfigListenOnBroadcastAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigListenOnBroadcastAddressParamsWithHTTPClient(client *http.Client) *FindConfigListenOnBroadcastAddressParams { + + return &FindConfigListenOnBroadcastAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigListenOnBroadcastAddressParams contains all the parameters to send to the API endpoint +for the find config listen on broadcast address operation typically these are written to a http.Request +*/ +type FindConfigListenOnBroadcastAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) WithTimeout(timeout time.Duration) *FindConfigListenOnBroadcastAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) WithContext(ctx context.Context) *FindConfigListenOnBroadcastAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) WithHTTPClient(client *http.Client) *FindConfigListenOnBroadcastAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config listen on broadcast address params +func (o *FindConfigListenOnBroadcastAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigListenOnBroadcastAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_responses.go new file mode 100644 index 00000000000..1953205cf8f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_listen_on_broadcast_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigListenOnBroadcastAddressReader is a Reader for the FindConfigListenOnBroadcastAddress structure. +type FindConfigListenOnBroadcastAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigListenOnBroadcastAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigListenOnBroadcastAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigListenOnBroadcastAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigListenOnBroadcastAddressOK creates a FindConfigListenOnBroadcastAddressOK with default headers values +func NewFindConfigListenOnBroadcastAddressOK() *FindConfigListenOnBroadcastAddressOK { + return &FindConfigListenOnBroadcastAddressOK{} +} + +/*FindConfigListenOnBroadcastAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigListenOnBroadcastAddressOK struct { + Payload bool +} + +func (o *FindConfigListenOnBroadcastAddressOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigListenOnBroadcastAddressOK) 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 +} + +// NewFindConfigListenOnBroadcastAddressDefault creates a FindConfigListenOnBroadcastAddressDefault with default headers values +func NewFindConfigListenOnBroadcastAddressDefault(code int) *FindConfigListenOnBroadcastAddressDefault { + return &FindConfigListenOnBroadcastAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigListenOnBroadcastAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigListenOnBroadcastAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config listen on broadcast address default response +func (o *FindConfigListenOnBroadcastAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigListenOnBroadcastAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigListenOnBroadcastAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigListenOnBroadcastAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_parameters.go new file mode 100644 index 00000000000..983f13e1c78 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLoadBalanceParams creates a new FindConfigLoadBalanceParams object +// with the default values initialized. +func NewFindConfigLoadBalanceParams() *FindConfigLoadBalanceParams { + + return &FindConfigLoadBalanceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLoadBalanceParamsWithTimeout creates a new FindConfigLoadBalanceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLoadBalanceParamsWithTimeout(timeout time.Duration) *FindConfigLoadBalanceParams { + + return &FindConfigLoadBalanceParams{ + + timeout: timeout, + } +} + +// NewFindConfigLoadBalanceParamsWithContext creates a new FindConfigLoadBalanceParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLoadBalanceParamsWithContext(ctx context.Context) *FindConfigLoadBalanceParams { + + return &FindConfigLoadBalanceParams{ + + Context: ctx, + } +} + +// NewFindConfigLoadBalanceParamsWithHTTPClient creates a new FindConfigLoadBalanceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLoadBalanceParamsWithHTTPClient(client *http.Client) *FindConfigLoadBalanceParams { + + return &FindConfigLoadBalanceParams{ + HTTPClient: client, + } +} + +/*FindConfigLoadBalanceParams contains all the parameters to send to the API endpoint +for the find config load balance operation typically these are written to a http.Request +*/ +type FindConfigLoadBalanceParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config load balance params +func (o *FindConfigLoadBalanceParams) WithTimeout(timeout time.Duration) *FindConfigLoadBalanceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config load balance params +func (o *FindConfigLoadBalanceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config load balance params +func (o *FindConfigLoadBalanceParams) WithContext(ctx context.Context) *FindConfigLoadBalanceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config load balance params +func (o *FindConfigLoadBalanceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config load balance params +func (o *FindConfigLoadBalanceParams) WithHTTPClient(client *http.Client) *FindConfigLoadBalanceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config load balance params +func (o *FindConfigLoadBalanceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLoadBalanceParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_responses.go new file mode 100644 index 00000000000..7655d08fa29 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_balance_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLoadBalanceReader is a Reader for the FindConfigLoadBalance structure. +type FindConfigLoadBalanceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLoadBalanceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLoadBalanceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLoadBalanceDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLoadBalanceOK creates a FindConfigLoadBalanceOK with default headers values +func NewFindConfigLoadBalanceOK() *FindConfigLoadBalanceOK { + return &FindConfigLoadBalanceOK{} +} + +/*FindConfigLoadBalanceOK handles this case with default header values. + +Config value +*/ +type FindConfigLoadBalanceOK struct { + Payload string +} + +func (o *FindConfigLoadBalanceOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigLoadBalanceOK) 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 +} + +// NewFindConfigLoadBalanceDefault creates a FindConfigLoadBalanceDefault with default headers values +func NewFindConfigLoadBalanceDefault(code int) *FindConfigLoadBalanceDefault { + return &FindConfigLoadBalanceDefault{ + _statusCode: code, + } +} + +/*FindConfigLoadBalanceDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLoadBalanceDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config load balance default response +func (o *FindConfigLoadBalanceDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLoadBalanceDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLoadBalanceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLoadBalanceDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_parameters.go new file mode 100644 index 00000000000..e510b644746 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLoadRingStateParams creates a new FindConfigLoadRingStateParams object +// with the default values initialized. +func NewFindConfigLoadRingStateParams() *FindConfigLoadRingStateParams { + + return &FindConfigLoadRingStateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLoadRingStateParamsWithTimeout creates a new FindConfigLoadRingStateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLoadRingStateParamsWithTimeout(timeout time.Duration) *FindConfigLoadRingStateParams { + + return &FindConfigLoadRingStateParams{ + + timeout: timeout, + } +} + +// NewFindConfigLoadRingStateParamsWithContext creates a new FindConfigLoadRingStateParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLoadRingStateParamsWithContext(ctx context.Context) *FindConfigLoadRingStateParams { + + return &FindConfigLoadRingStateParams{ + + Context: ctx, + } +} + +// NewFindConfigLoadRingStateParamsWithHTTPClient creates a new FindConfigLoadRingStateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLoadRingStateParamsWithHTTPClient(client *http.Client) *FindConfigLoadRingStateParams { + + return &FindConfigLoadRingStateParams{ + HTTPClient: client, + } +} + +/*FindConfigLoadRingStateParams contains all the parameters to send to the API endpoint +for the find config load ring state operation typically these are written to a http.Request +*/ +type FindConfigLoadRingStateParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config load ring state params +func (o *FindConfigLoadRingStateParams) WithTimeout(timeout time.Duration) *FindConfigLoadRingStateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config load ring state params +func (o *FindConfigLoadRingStateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config load ring state params +func (o *FindConfigLoadRingStateParams) WithContext(ctx context.Context) *FindConfigLoadRingStateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config load ring state params +func (o *FindConfigLoadRingStateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config load ring state params +func (o *FindConfigLoadRingStateParams) WithHTTPClient(client *http.Client) *FindConfigLoadRingStateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config load ring state params +func (o *FindConfigLoadRingStateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLoadRingStateParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_responses.go new file mode 100644 index 00000000000..074c5c6fdb0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_load_ring_state_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLoadRingStateReader is a Reader for the FindConfigLoadRingState structure. +type FindConfigLoadRingStateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLoadRingStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLoadRingStateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLoadRingStateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLoadRingStateOK creates a FindConfigLoadRingStateOK with default headers values +func NewFindConfigLoadRingStateOK() *FindConfigLoadRingStateOK { + return &FindConfigLoadRingStateOK{} +} + +/*FindConfigLoadRingStateOK handles this case with default header values. + +Config value +*/ +type FindConfigLoadRingStateOK struct { + Payload bool +} + +func (o *FindConfigLoadRingStateOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigLoadRingStateOK) 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 +} + +// NewFindConfigLoadRingStateDefault creates a FindConfigLoadRingStateDefault with default headers values +func NewFindConfigLoadRingStateDefault(code int) *FindConfigLoadRingStateDefault { + return &FindConfigLoadRingStateDefault{ + _statusCode: code, + } +} + +/*FindConfigLoadRingStateDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLoadRingStateDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config load ring state default response +func (o *FindConfigLoadRingStateDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLoadRingStateDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLoadRingStateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLoadRingStateDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_parameters.go new file mode 100644 index 00000000000..662db2c83c1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLogToStdoutParams creates a new FindConfigLogToStdoutParams object +// with the default values initialized. +func NewFindConfigLogToStdoutParams() *FindConfigLogToStdoutParams { + + return &FindConfigLogToStdoutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLogToStdoutParamsWithTimeout creates a new FindConfigLogToStdoutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLogToStdoutParamsWithTimeout(timeout time.Duration) *FindConfigLogToStdoutParams { + + return &FindConfigLogToStdoutParams{ + + timeout: timeout, + } +} + +// NewFindConfigLogToStdoutParamsWithContext creates a new FindConfigLogToStdoutParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLogToStdoutParamsWithContext(ctx context.Context) *FindConfigLogToStdoutParams { + + return &FindConfigLogToStdoutParams{ + + Context: ctx, + } +} + +// NewFindConfigLogToStdoutParamsWithHTTPClient creates a new FindConfigLogToStdoutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLogToStdoutParamsWithHTTPClient(client *http.Client) *FindConfigLogToStdoutParams { + + return &FindConfigLogToStdoutParams{ + HTTPClient: client, + } +} + +/*FindConfigLogToStdoutParams contains all the parameters to send to the API endpoint +for the find config log to stdout operation typically these are written to a http.Request +*/ +type FindConfigLogToStdoutParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) WithTimeout(timeout time.Duration) *FindConfigLogToStdoutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) WithContext(ctx context.Context) *FindConfigLogToStdoutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) WithHTTPClient(client *http.Client) *FindConfigLogToStdoutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config log to stdout params +func (o *FindConfigLogToStdoutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLogToStdoutParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_responses.go new file mode 100644 index 00000000000..e39a3777d3c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_stdout_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLogToStdoutReader is a Reader for the FindConfigLogToStdout structure. +type FindConfigLogToStdoutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLogToStdoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLogToStdoutOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLogToStdoutDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLogToStdoutOK creates a FindConfigLogToStdoutOK with default headers values +func NewFindConfigLogToStdoutOK() *FindConfigLogToStdoutOK { + return &FindConfigLogToStdoutOK{} +} + +/*FindConfigLogToStdoutOK handles this case with default header values. + +Config value +*/ +type FindConfigLogToStdoutOK struct { + Payload bool +} + +func (o *FindConfigLogToStdoutOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigLogToStdoutOK) 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 +} + +// NewFindConfigLogToStdoutDefault creates a FindConfigLogToStdoutDefault with default headers values +func NewFindConfigLogToStdoutDefault(code int) *FindConfigLogToStdoutDefault { + return &FindConfigLogToStdoutDefault{ + _statusCode: code, + } +} + +/*FindConfigLogToStdoutDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLogToStdoutDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config log to stdout default response +func (o *FindConfigLogToStdoutDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLogToStdoutDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLogToStdoutDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLogToStdoutDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_parameters.go new file mode 100644 index 00000000000..9651afdfb8f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLogToSyslogParams creates a new FindConfigLogToSyslogParams object +// with the default values initialized. +func NewFindConfigLogToSyslogParams() *FindConfigLogToSyslogParams { + + return &FindConfigLogToSyslogParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLogToSyslogParamsWithTimeout creates a new FindConfigLogToSyslogParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLogToSyslogParamsWithTimeout(timeout time.Duration) *FindConfigLogToSyslogParams { + + return &FindConfigLogToSyslogParams{ + + timeout: timeout, + } +} + +// NewFindConfigLogToSyslogParamsWithContext creates a new FindConfigLogToSyslogParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLogToSyslogParamsWithContext(ctx context.Context) *FindConfigLogToSyslogParams { + + return &FindConfigLogToSyslogParams{ + + Context: ctx, + } +} + +// NewFindConfigLogToSyslogParamsWithHTTPClient creates a new FindConfigLogToSyslogParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLogToSyslogParamsWithHTTPClient(client *http.Client) *FindConfigLogToSyslogParams { + + return &FindConfigLogToSyslogParams{ + HTTPClient: client, + } +} + +/*FindConfigLogToSyslogParams contains all the parameters to send to the API endpoint +for the find config log to syslog operation typically these are written to a http.Request +*/ +type FindConfigLogToSyslogParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) WithTimeout(timeout time.Duration) *FindConfigLogToSyslogParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) WithContext(ctx context.Context) *FindConfigLogToSyslogParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) WithHTTPClient(client *http.Client) *FindConfigLogToSyslogParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config log to syslog params +func (o *FindConfigLogToSyslogParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLogToSyslogParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_responses.go new file mode 100644 index 00000000000..cb80751f374 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_log_to_syslog_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLogToSyslogReader is a Reader for the FindConfigLogToSyslog structure. +type FindConfigLogToSyslogReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLogToSyslogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLogToSyslogOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLogToSyslogDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLogToSyslogOK creates a FindConfigLogToSyslogOK with default headers values +func NewFindConfigLogToSyslogOK() *FindConfigLogToSyslogOK { + return &FindConfigLogToSyslogOK{} +} + +/*FindConfigLogToSyslogOK handles this case with default header values. + +Config value +*/ +type FindConfigLogToSyslogOK struct { + Payload bool +} + +func (o *FindConfigLogToSyslogOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigLogToSyslogOK) 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 +} + +// NewFindConfigLogToSyslogDefault creates a FindConfigLogToSyslogDefault with default headers values +func NewFindConfigLogToSyslogDefault(code int) *FindConfigLogToSyslogDefault { + return &FindConfigLogToSyslogDefault{ + _statusCode: code, + } +} + +/*FindConfigLogToSyslogDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLogToSyslogDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config log to syslog default response +func (o *FindConfigLogToSyslogDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLogToSyslogDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLogToSyslogDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLogToSyslogDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_parameters.go new file mode 100644 index 00000000000..b60706f469e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLoggerLogLevelParams creates a new FindConfigLoggerLogLevelParams object +// with the default values initialized. +func NewFindConfigLoggerLogLevelParams() *FindConfigLoggerLogLevelParams { + + return &FindConfigLoggerLogLevelParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLoggerLogLevelParamsWithTimeout creates a new FindConfigLoggerLogLevelParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLoggerLogLevelParamsWithTimeout(timeout time.Duration) *FindConfigLoggerLogLevelParams { + + return &FindConfigLoggerLogLevelParams{ + + timeout: timeout, + } +} + +// NewFindConfigLoggerLogLevelParamsWithContext creates a new FindConfigLoggerLogLevelParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLoggerLogLevelParamsWithContext(ctx context.Context) *FindConfigLoggerLogLevelParams { + + return &FindConfigLoggerLogLevelParams{ + + Context: ctx, + } +} + +// NewFindConfigLoggerLogLevelParamsWithHTTPClient creates a new FindConfigLoggerLogLevelParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLoggerLogLevelParamsWithHTTPClient(client *http.Client) *FindConfigLoggerLogLevelParams { + + return &FindConfigLoggerLogLevelParams{ + HTTPClient: client, + } +} + +/*FindConfigLoggerLogLevelParams contains all the parameters to send to the API endpoint +for the find config logger log level operation typically these are written to a http.Request +*/ +type FindConfigLoggerLogLevelParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) WithTimeout(timeout time.Duration) *FindConfigLoggerLogLevelParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) WithContext(ctx context.Context) *FindConfigLoggerLogLevelParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) WithHTTPClient(client *http.Client) *FindConfigLoggerLogLevelParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config logger log level params +func (o *FindConfigLoggerLogLevelParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLoggerLogLevelParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_responses.go new file mode 100644 index 00000000000..14b4c6e993d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_logger_log_level_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLoggerLogLevelReader is a Reader for the FindConfigLoggerLogLevel structure. +type FindConfigLoggerLogLevelReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLoggerLogLevelReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLoggerLogLevelOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLoggerLogLevelDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLoggerLogLevelOK creates a FindConfigLoggerLogLevelOK with default headers values +func NewFindConfigLoggerLogLevelOK() *FindConfigLoggerLogLevelOK { + return &FindConfigLoggerLogLevelOK{} +} + +/*FindConfigLoggerLogLevelOK handles this case with default header values. + +Config value +*/ +type FindConfigLoggerLogLevelOK struct { + Payload []string +} + +func (o *FindConfigLoggerLogLevelOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigLoggerLogLevelOK) 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 +} + +// NewFindConfigLoggerLogLevelDefault creates a FindConfigLoggerLogLevelDefault with default headers values +func NewFindConfigLoggerLogLevelDefault(code int) *FindConfigLoggerLogLevelDefault { + return &FindConfigLoggerLogLevelDefault{ + _statusCode: code, + } +} + +/*FindConfigLoggerLogLevelDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLoggerLogLevelDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config logger log level default response +func (o *FindConfigLoggerLogLevelDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLoggerLogLevelDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLoggerLogLevelDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLoggerLogLevelDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_parameters.go new file mode 100644 index 00000000000..cd122d49a43 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigLsaReclamationStepParams creates a new FindConfigLsaReclamationStepParams object +// with the default values initialized. +func NewFindConfigLsaReclamationStepParams() *FindConfigLsaReclamationStepParams { + + return &FindConfigLsaReclamationStepParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigLsaReclamationStepParamsWithTimeout creates a new FindConfigLsaReclamationStepParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigLsaReclamationStepParamsWithTimeout(timeout time.Duration) *FindConfigLsaReclamationStepParams { + + return &FindConfigLsaReclamationStepParams{ + + timeout: timeout, + } +} + +// NewFindConfigLsaReclamationStepParamsWithContext creates a new FindConfigLsaReclamationStepParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigLsaReclamationStepParamsWithContext(ctx context.Context) *FindConfigLsaReclamationStepParams { + + return &FindConfigLsaReclamationStepParams{ + + Context: ctx, + } +} + +// NewFindConfigLsaReclamationStepParamsWithHTTPClient creates a new FindConfigLsaReclamationStepParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigLsaReclamationStepParamsWithHTTPClient(client *http.Client) *FindConfigLsaReclamationStepParams { + + return &FindConfigLsaReclamationStepParams{ + HTTPClient: client, + } +} + +/*FindConfigLsaReclamationStepParams contains all the parameters to send to the API endpoint +for the find config lsa reclamation step operation typically these are written to a http.Request +*/ +type FindConfigLsaReclamationStepParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) WithTimeout(timeout time.Duration) *FindConfigLsaReclamationStepParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) WithContext(ctx context.Context) *FindConfigLsaReclamationStepParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) WithHTTPClient(client *http.Client) *FindConfigLsaReclamationStepParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config lsa reclamation step params +func (o *FindConfigLsaReclamationStepParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigLsaReclamationStepParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_responses.go new file mode 100644 index 00000000000..7e70a39cb04 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_lsa_reclamation_step_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigLsaReclamationStepReader is a Reader for the FindConfigLsaReclamationStep structure. +type FindConfigLsaReclamationStepReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigLsaReclamationStepReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigLsaReclamationStepOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigLsaReclamationStepDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigLsaReclamationStepOK creates a FindConfigLsaReclamationStepOK with default headers values +func NewFindConfigLsaReclamationStepOK() *FindConfigLsaReclamationStepOK { + return &FindConfigLsaReclamationStepOK{} +} + +/*FindConfigLsaReclamationStepOK handles this case with default header values. + +Config value +*/ +type FindConfigLsaReclamationStepOK struct { + Payload int64 +} + +func (o *FindConfigLsaReclamationStepOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigLsaReclamationStepOK) 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 +} + +// NewFindConfigLsaReclamationStepDefault creates a FindConfigLsaReclamationStepDefault with default headers values +func NewFindConfigLsaReclamationStepDefault(code int) *FindConfigLsaReclamationStepDefault { + return &FindConfigLsaReclamationStepDefault{ + _statusCode: code, + } +} + +/*FindConfigLsaReclamationStepDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigLsaReclamationStepDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config lsa reclamation step default response +func (o *FindConfigLsaReclamationStepDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigLsaReclamationStepDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigLsaReclamationStepDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigLsaReclamationStepDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_parameters.go new file mode 100644 index 00000000000..0f0956a3eeb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMaxHintWindowInMsParams creates a new FindConfigMaxHintWindowInMsParams object +// with the default values initialized. +func NewFindConfigMaxHintWindowInMsParams() *FindConfigMaxHintWindowInMsParams { + + return &FindConfigMaxHintWindowInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMaxHintWindowInMsParamsWithTimeout creates a new FindConfigMaxHintWindowInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMaxHintWindowInMsParamsWithTimeout(timeout time.Duration) *FindConfigMaxHintWindowInMsParams { + + return &FindConfigMaxHintWindowInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigMaxHintWindowInMsParamsWithContext creates a new FindConfigMaxHintWindowInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMaxHintWindowInMsParamsWithContext(ctx context.Context) *FindConfigMaxHintWindowInMsParams { + + return &FindConfigMaxHintWindowInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigMaxHintWindowInMsParamsWithHTTPClient creates a new FindConfigMaxHintWindowInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMaxHintWindowInMsParamsWithHTTPClient(client *http.Client) *FindConfigMaxHintWindowInMsParams { + + return &FindConfigMaxHintWindowInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigMaxHintWindowInMsParams contains all the parameters to send to the API endpoint +for the find config max hint window in ms operation typically these are written to a http.Request +*/ +type FindConfigMaxHintWindowInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) WithTimeout(timeout time.Duration) *FindConfigMaxHintWindowInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) WithContext(ctx context.Context) *FindConfigMaxHintWindowInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) WithHTTPClient(client *http.Client) *FindConfigMaxHintWindowInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config max hint window in ms params +func (o *FindConfigMaxHintWindowInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMaxHintWindowInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_responses.go new file mode 100644 index 00000000000..f27d6f9c3a3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hint_window_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMaxHintWindowInMsReader is a Reader for the FindConfigMaxHintWindowInMs structure. +type FindConfigMaxHintWindowInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMaxHintWindowInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMaxHintWindowInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMaxHintWindowInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMaxHintWindowInMsOK creates a FindConfigMaxHintWindowInMsOK with default headers values +func NewFindConfigMaxHintWindowInMsOK() *FindConfigMaxHintWindowInMsOK { + return &FindConfigMaxHintWindowInMsOK{} +} + +/*FindConfigMaxHintWindowInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigMaxHintWindowInMsOK struct { + Payload int64 +} + +func (o *FindConfigMaxHintWindowInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMaxHintWindowInMsOK) 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 +} + +// NewFindConfigMaxHintWindowInMsDefault creates a FindConfigMaxHintWindowInMsDefault with default headers values +func NewFindConfigMaxHintWindowInMsDefault(code int) *FindConfigMaxHintWindowInMsDefault { + return &FindConfigMaxHintWindowInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigMaxHintWindowInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMaxHintWindowInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config max hint window in ms default response +func (o *FindConfigMaxHintWindowInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMaxHintWindowInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMaxHintWindowInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMaxHintWindowInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_parameters.go new file mode 100644 index 00000000000..b74e860343e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMaxHintsDeliveryThreadsParams creates a new FindConfigMaxHintsDeliveryThreadsParams object +// with the default values initialized. +func NewFindConfigMaxHintsDeliveryThreadsParams() *FindConfigMaxHintsDeliveryThreadsParams { + + return &FindConfigMaxHintsDeliveryThreadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMaxHintsDeliveryThreadsParamsWithTimeout creates a new FindConfigMaxHintsDeliveryThreadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMaxHintsDeliveryThreadsParamsWithTimeout(timeout time.Duration) *FindConfigMaxHintsDeliveryThreadsParams { + + return &FindConfigMaxHintsDeliveryThreadsParams{ + + timeout: timeout, + } +} + +// NewFindConfigMaxHintsDeliveryThreadsParamsWithContext creates a new FindConfigMaxHintsDeliveryThreadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMaxHintsDeliveryThreadsParamsWithContext(ctx context.Context) *FindConfigMaxHintsDeliveryThreadsParams { + + return &FindConfigMaxHintsDeliveryThreadsParams{ + + Context: ctx, + } +} + +// NewFindConfigMaxHintsDeliveryThreadsParamsWithHTTPClient creates a new FindConfigMaxHintsDeliveryThreadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMaxHintsDeliveryThreadsParamsWithHTTPClient(client *http.Client) *FindConfigMaxHintsDeliveryThreadsParams { + + return &FindConfigMaxHintsDeliveryThreadsParams{ + HTTPClient: client, + } +} + +/*FindConfigMaxHintsDeliveryThreadsParams contains all the parameters to send to the API endpoint +for the find config max hints delivery threads operation typically these are written to a http.Request +*/ +type FindConfigMaxHintsDeliveryThreadsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) WithTimeout(timeout time.Duration) *FindConfigMaxHintsDeliveryThreadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) WithContext(ctx context.Context) *FindConfigMaxHintsDeliveryThreadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) WithHTTPClient(client *http.Client) *FindConfigMaxHintsDeliveryThreadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config max hints delivery threads params +func (o *FindConfigMaxHintsDeliveryThreadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMaxHintsDeliveryThreadsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_responses.go new file mode 100644 index 00000000000..a8c33168e55 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_max_hints_delivery_threads_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMaxHintsDeliveryThreadsReader is a Reader for the FindConfigMaxHintsDeliveryThreads structure. +type FindConfigMaxHintsDeliveryThreadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMaxHintsDeliveryThreadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMaxHintsDeliveryThreadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMaxHintsDeliveryThreadsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMaxHintsDeliveryThreadsOK creates a FindConfigMaxHintsDeliveryThreadsOK with default headers values +func NewFindConfigMaxHintsDeliveryThreadsOK() *FindConfigMaxHintsDeliveryThreadsOK { + return &FindConfigMaxHintsDeliveryThreadsOK{} +} + +/*FindConfigMaxHintsDeliveryThreadsOK handles this case with default header values. + +Config value +*/ +type FindConfigMaxHintsDeliveryThreadsOK struct { + Payload int64 +} + +func (o *FindConfigMaxHintsDeliveryThreadsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMaxHintsDeliveryThreadsOK) 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 +} + +// NewFindConfigMaxHintsDeliveryThreadsDefault creates a FindConfigMaxHintsDeliveryThreadsDefault with default headers values +func NewFindConfigMaxHintsDeliveryThreadsDefault(code int) *FindConfigMaxHintsDeliveryThreadsDefault { + return &FindConfigMaxHintsDeliveryThreadsDefault{ + _statusCode: code, + } +} + +/*FindConfigMaxHintsDeliveryThreadsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMaxHintsDeliveryThreadsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config max hints delivery threads default response +func (o *FindConfigMaxHintsDeliveryThreadsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMaxHintsDeliveryThreadsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMaxHintsDeliveryThreadsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMaxHintsDeliveryThreadsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_parameters.go new file mode 100644 index 00000000000..a8120b13027 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemoryAllocatorParams creates a new FindConfigMemoryAllocatorParams object +// with the default values initialized. +func NewFindConfigMemoryAllocatorParams() *FindConfigMemoryAllocatorParams { + + return &FindConfigMemoryAllocatorParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemoryAllocatorParamsWithTimeout creates a new FindConfigMemoryAllocatorParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemoryAllocatorParamsWithTimeout(timeout time.Duration) *FindConfigMemoryAllocatorParams { + + return &FindConfigMemoryAllocatorParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemoryAllocatorParamsWithContext creates a new FindConfigMemoryAllocatorParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemoryAllocatorParamsWithContext(ctx context.Context) *FindConfigMemoryAllocatorParams { + + return &FindConfigMemoryAllocatorParams{ + + Context: ctx, + } +} + +// NewFindConfigMemoryAllocatorParamsWithHTTPClient creates a new FindConfigMemoryAllocatorParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemoryAllocatorParamsWithHTTPClient(client *http.Client) *FindConfigMemoryAllocatorParams { + + return &FindConfigMemoryAllocatorParams{ + HTTPClient: client, + } +} + +/*FindConfigMemoryAllocatorParams contains all the parameters to send to the API endpoint +for the find config memory allocator operation typically these are written to a http.Request +*/ +type FindConfigMemoryAllocatorParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) WithTimeout(timeout time.Duration) *FindConfigMemoryAllocatorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) WithContext(ctx context.Context) *FindConfigMemoryAllocatorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) WithHTTPClient(client *http.Client) *FindConfigMemoryAllocatorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memory allocator params +func (o *FindConfigMemoryAllocatorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemoryAllocatorParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_responses.go new file mode 100644 index 00000000000..992071d94f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memory_allocator_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemoryAllocatorReader is a Reader for the FindConfigMemoryAllocator structure. +type FindConfigMemoryAllocatorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemoryAllocatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemoryAllocatorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemoryAllocatorDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemoryAllocatorOK creates a FindConfigMemoryAllocatorOK with default headers values +func NewFindConfigMemoryAllocatorOK() *FindConfigMemoryAllocatorOK { + return &FindConfigMemoryAllocatorOK{} +} + +/*FindConfigMemoryAllocatorOK handles this case with default header values. + +Config value +*/ +type FindConfigMemoryAllocatorOK struct { + Payload string +} + +func (o *FindConfigMemoryAllocatorOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigMemoryAllocatorOK) 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 +} + +// NewFindConfigMemoryAllocatorDefault creates a FindConfigMemoryAllocatorDefault with default headers values +func NewFindConfigMemoryAllocatorDefault(code int) *FindConfigMemoryAllocatorDefault { + return &FindConfigMemoryAllocatorDefault{ + _statusCode: code, + } +} + +/*FindConfigMemoryAllocatorDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemoryAllocatorDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memory allocator default response +func (o *FindConfigMemoryAllocatorDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemoryAllocatorDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemoryAllocatorDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemoryAllocatorDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_parameters.go new file mode 100644 index 00000000000..4c39b6a21bf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableAllocationTypeParams creates a new FindConfigMemtableAllocationTypeParams object +// with the default values initialized. +func NewFindConfigMemtableAllocationTypeParams() *FindConfigMemtableAllocationTypeParams { + + return &FindConfigMemtableAllocationTypeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableAllocationTypeParamsWithTimeout creates a new FindConfigMemtableAllocationTypeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableAllocationTypeParamsWithTimeout(timeout time.Duration) *FindConfigMemtableAllocationTypeParams { + + return &FindConfigMemtableAllocationTypeParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableAllocationTypeParamsWithContext creates a new FindConfigMemtableAllocationTypeParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableAllocationTypeParamsWithContext(ctx context.Context) *FindConfigMemtableAllocationTypeParams { + + return &FindConfigMemtableAllocationTypeParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableAllocationTypeParamsWithHTTPClient creates a new FindConfigMemtableAllocationTypeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableAllocationTypeParamsWithHTTPClient(client *http.Client) *FindConfigMemtableAllocationTypeParams { + + return &FindConfigMemtableAllocationTypeParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableAllocationTypeParams contains all the parameters to send to the API endpoint +for the find config memtable allocation type operation typically these are written to a http.Request +*/ +type FindConfigMemtableAllocationTypeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) WithTimeout(timeout time.Duration) *FindConfigMemtableAllocationTypeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) WithContext(ctx context.Context) *FindConfigMemtableAllocationTypeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) WithHTTPClient(client *http.Client) *FindConfigMemtableAllocationTypeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable allocation type params +func (o *FindConfigMemtableAllocationTypeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableAllocationTypeParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_responses.go new file mode 100644 index 00000000000..f8c1c2db059 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_allocation_type_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableAllocationTypeReader is a Reader for the FindConfigMemtableAllocationType structure. +type FindConfigMemtableAllocationTypeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableAllocationTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableAllocationTypeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableAllocationTypeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableAllocationTypeOK creates a FindConfigMemtableAllocationTypeOK with default headers values +func NewFindConfigMemtableAllocationTypeOK() *FindConfigMemtableAllocationTypeOK { + return &FindConfigMemtableAllocationTypeOK{} +} + +/*FindConfigMemtableAllocationTypeOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableAllocationTypeOK struct { + Payload string +} + +func (o *FindConfigMemtableAllocationTypeOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigMemtableAllocationTypeOK) 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 +} + +// NewFindConfigMemtableAllocationTypeDefault creates a FindConfigMemtableAllocationTypeDefault with default headers values +func NewFindConfigMemtableAllocationTypeDefault(code int) *FindConfigMemtableAllocationTypeDefault { + return &FindConfigMemtableAllocationTypeDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableAllocationTypeDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableAllocationTypeDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable allocation type default response +func (o *FindConfigMemtableAllocationTypeDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableAllocationTypeDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableAllocationTypeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableAllocationTypeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_parameters.go new file mode 100644 index 00000000000..2cae2e161b5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableCleanupThresholdParams creates a new FindConfigMemtableCleanupThresholdParams object +// with the default values initialized. +func NewFindConfigMemtableCleanupThresholdParams() *FindConfigMemtableCleanupThresholdParams { + + return &FindConfigMemtableCleanupThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableCleanupThresholdParamsWithTimeout creates a new FindConfigMemtableCleanupThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableCleanupThresholdParamsWithTimeout(timeout time.Duration) *FindConfigMemtableCleanupThresholdParams { + + return &FindConfigMemtableCleanupThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableCleanupThresholdParamsWithContext creates a new FindConfigMemtableCleanupThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableCleanupThresholdParamsWithContext(ctx context.Context) *FindConfigMemtableCleanupThresholdParams { + + return &FindConfigMemtableCleanupThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableCleanupThresholdParamsWithHTTPClient creates a new FindConfigMemtableCleanupThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableCleanupThresholdParamsWithHTTPClient(client *http.Client) *FindConfigMemtableCleanupThresholdParams { + + return &FindConfigMemtableCleanupThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableCleanupThresholdParams contains all the parameters to send to the API endpoint +for the find config memtable cleanup threshold operation typically these are written to a http.Request +*/ +type FindConfigMemtableCleanupThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) WithTimeout(timeout time.Duration) *FindConfigMemtableCleanupThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) WithContext(ctx context.Context) *FindConfigMemtableCleanupThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) WithHTTPClient(client *http.Client) *FindConfigMemtableCleanupThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable cleanup threshold params +func (o *FindConfigMemtableCleanupThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableCleanupThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_responses.go new file mode 100644 index 00000000000..bcf0dd714aa --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_cleanup_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableCleanupThresholdReader is a Reader for the FindConfigMemtableCleanupThreshold structure. +type FindConfigMemtableCleanupThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableCleanupThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableCleanupThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableCleanupThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableCleanupThresholdOK creates a FindConfigMemtableCleanupThresholdOK with default headers values +func NewFindConfigMemtableCleanupThresholdOK() *FindConfigMemtableCleanupThresholdOK { + return &FindConfigMemtableCleanupThresholdOK{} +} + +/*FindConfigMemtableCleanupThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableCleanupThresholdOK struct { + Payload float64 +} + +func (o *FindConfigMemtableCleanupThresholdOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigMemtableCleanupThresholdOK) 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 +} + +// NewFindConfigMemtableCleanupThresholdDefault creates a FindConfigMemtableCleanupThresholdDefault with default headers values +func NewFindConfigMemtableCleanupThresholdDefault(code int) *FindConfigMemtableCleanupThresholdDefault { + return &FindConfigMemtableCleanupThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableCleanupThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableCleanupThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable cleanup threshold default response +func (o *FindConfigMemtableCleanupThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableCleanupThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableCleanupThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableCleanupThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_parameters.go new file mode 100644 index 00000000000..6a465c09131 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableFlushQueueSizeParams creates a new FindConfigMemtableFlushQueueSizeParams object +// with the default values initialized. +func NewFindConfigMemtableFlushQueueSizeParams() *FindConfigMemtableFlushQueueSizeParams { + + return &FindConfigMemtableFlushQueueSizeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableFlushQueueSizeParamsWithTimeout creates a new FindConfigMemtableFlushQueueSizeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableFlushQueueSizeParamsWithTimeout(timeout time.Duration) *FindConfigMemtableFlushQueueSizeParams { + + return &FindConfigMemtableFlushQueueSizeParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableFlushQueueSizeParamsWithContext creates a new FindConfigMemtableFlushQueueSizeParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableFlushQueueSizeParamsWithContext(ctx context.Context) *FindConfigMemtableFlushQueueSizeParams { + + return &FindConfigMemtableFlushQueueSizeParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableFlushQueueSizeParamsWithHTTPClient creates a new FindConfigMemtableFlushQueueSizeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableFlushQueueSizeParamsWithHTTPClient(client *http.Client) *FindConfigMemtableFlushQueueSizeParams { + + return &FindConfigMemtableFlushQueueSizeParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableFlushQueueSizeParams contains all the parameters to send to the API endpoint +for the find config memtable flush queue size operation typically these are written to a http.Request +*/ +type FindConfigMemtableFlushQueueSizeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) WithTimeout(timeout time.Duration) *FindConfigMemtableFlushQueueSizeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) WithContext(ctx context.Context) *FindConfigMemtableFlushQueueSizeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) WithHTTPClient(client *http.Client) *FindConfigMemtableFlushQueueSizeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable flush queue size params +func (o *FindConfigMemtableFlushQueueSizeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableFlushQueueSizeParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_responses.go new file mode 100644 index 00000000000..d3e1c62f0f0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_queue_size_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableFlushQueueSizeReader is a Reader for the FindConfigMemtableFlushQueueSize structure. +type FindConfigMemtableFlushQueueSizeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableFlushQueueSizeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableFlushQueueSizeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableFlushQueueSizeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableFlushQueueSizeOK creates a FindConfigMemtableFlushQueueSizeOK with default headers values +func NewFindConfigMemtableFlushQueueSizeOK() *FindConfigMemtableFlushQueueSizeOK { + return &FindConfigMemtableFlushQueueSizeOK{} +} + +/*FindConfigMemtableFlushQueueSizeOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableFlushQueueSizeOK struct { + Payload int64 +} + +func (o *FindConfigMemtableFlushQueueSizeOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMemtableFlushQueueSizeOK) 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 +} + +// NewFindConfigMemtableFlushQueueSizeDefault creates a FindConfigMemtableFlushQueueSizeDefault with default headers values +func NewFindConfigMemtableFlushQueueSizeDefault(code int) *FindConfigMemtableFlushQueueSizeDefault { + return &FindConfigMemtableFlushQueueSizeDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableFlushQueueSizeDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableFlushQueueSizeDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable flush queue size default response +func (o *FindConfigMemtableFlushQueueSizeDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableFlushQueueSizeDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableFlushQueueSizeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableFlushQueueSizeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_parameters.go new file mode 100644 index 00000000000..dc56b5bc624 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableFlushStaticSharesParams creates a new FindConfigMemtableFlushStaticSharesParams object +// with the default values initialized. +func NewFindConfigMemtableFlushStaticSharesParams() *FindConfigMemtableFlushStaticSharesParams { + + return &FindConfigMemtableFlushStaticSharesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableFlushStaticSharesParamsWithTimeout creates a new FindConfigMemtableFlushStaticSharesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableFlushStaticSharesParamsWithTimeout(timeout time.Duration) *FindConfigMemtableFlushStaticSharesParams { + + return &FindConfigMemtableFlushStaticSharesParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableFlushStaticSharesParamsWithContext creates a new FindConfigMemtableFlushStaticSharesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableFlushStaticSharesParamsWithContext(ctx context.Context) *FindConfigMemtableFlushStaticSharesParams { + + return &FindConfigMemtableFlushStaticSharesParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableFlushStaticSharesParamsWithHTTPClient creates a new FindConfigMemtableFlushStaticSharesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableFlushStaticSharesParamsWithHTTPClient(client *http.Client) *FindConfigMemtableFlushStaticSharesParams { + + return &FindConfigMemtableFlushStaticSharesParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableFlushStaticSharesParams contains all the parameters to send to the API endpoint +for the find config memtable flush static shares operation typically these are written to a http.Request +*/ +type FindConfigMemtableFlushStaticSharesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) WithTimeout(timeout time.Duration) *FindConfigMemtableFlushStaticSharesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) WithContext(ctx context.Context) *FindConfigMemtableFlushStaticSharesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) WithHTTPClient(client *http.Client) *FindConfigMemtableFlushStaticSharesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable flush static shares params +func (o *FindConfigMemtableFlushStaticSharesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableFlushStaticSharesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_responses.go new file mode 100644 index 00000000000..abf262b4551 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_static_shares_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableFlushStaticSharesReader is a Reader for the FindConfigMemtableFlushStaticShares structure. +type FindConfigMemtableFlushStaticSharesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableFlushStaticSharesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableFlushStaticSharesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableFlushStaticSharesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableFlushStaticSharesOK creates a FindConfigMemtableFlushStaticSharesOK with default headers values +func NewFindConfigMemtableFlushStaticSharesOK() *FindConfigMemtableFlushStaticSharesOK { + return &FindConfigMemtableFlushStaticSharesOK{} +} + +/*FindConfigMemtableFlushStaticSharesOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableFlushStaticSharesOK struct { + Payload float64 +} + +func (o *FindConfigMemtableFlushStaticSharesOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigMemtableFlushStaticSharesOK) 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 +} + +// NewFindConfigMemtableFlushStaticSharesDefault creates a FindConfigMemtableFlushStaticSharesDefault with default headers values +func NewFindConfigMemtableFlushStaticSharesDefault(code int) *FindConfigMemtableFlushStaticSharesDefault { + return &FindConfigMemtableFlushStaticSharesDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableFlushStaticSharesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableFlushStaticSharesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable flush static shares default response +func (o *FindConfigMemtableFlushStaticSharesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableFlushStaticSharesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableFlushStaticSharesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableFlushStaticSharesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_parameters.go new file mode 100644 index 00000000000..0715279f90b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableFlushWritersParams creates a new FindConfigMemtableFlushWritersParams object +// with the default values initialized. +func NewFindConfigMemtableFlushWritersParams() *FindConfigMemtableFlushWritersParams { + + return &FindConfigMemtableFlushWritersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableFlushWritersParamsWithTimeout creates a new FindConfigMemtableFlushWritersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableFlushWritersParamsWithTimeout(timeout time.Duration) *FindConfigMemtableFlushWritersParams { + + return &FindConfigMemtableFlushWritersParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableFlushWritersParamsWithContext creates a new FindConfigMemtableFlushWritersParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableFlushWritersParamsWithContext(ctx context.Context) *FindConfigMemtableFlushWritersParams { + + return &FindConfigMemtableFlushWritersParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableFlushWritersParamsWithHTTPClient creates a new FindConfigMemtableFlushWritersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableFlushWritersParamsWithHTTPClient(client *http.Client) *FindConfigMemtableFlushWritersParams { + + return &FindConfigMemtableFlushWritersParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableFlushWritersParams contains all the parameters to send to the API endpoint +for the find config memtable flush writers operation typically these are written to a http.Request +*/ +type FindConfigMemtableFlushWritersParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) WithTimeout(timeout time.Duration) *FindConfigMemtableFlushWritersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) WithContext(ctx context.Context) *FindConfigMemtableFlushWritersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) WithHTTPClient(client *http.Client) *FindConfigMemtableFlushWritersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable flush writers params +func (o *FindConfigMemtableFlushWritersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableFlushWritersParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_responses.go new file mode 100644 index 00000000000..4861414c711 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_flush_writers_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableFlushWritersReader is a Reader for the FindConfigMemtableFlushWriters structure. +type FindConfigMemtableFlushWritersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableFlushWritersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableFlushWritersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableFlushWritersDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableFlushWritersOK creates a FindConfigMemtableFlushWritersOK with default headers values +func NewFindConfigMemtableFlushWritersOK() *FindConfigMemtableFlushWritersOK { + return &FindConfigMemtableFlushWritersOK{} +} + +/*FindConfigMemtableFlushWritersOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableFlushWritersOK struct { + Payload int64 +} + +func (o *FindConfigMemtableFlushWritersOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMemtableFlushWritersOK) 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 +} + +// NewFindConfigMemtableFlushWritersDefault creates a FindConfigMemtableFlushWritersDefault with default headers values +func NewFindConfigMemtableFlushWritersDefault(code int) *FindConfigMemtableFlushWritersDefault { + return &FindConfigMemtableFlushWritersDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableFlushWritersDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableFlushWritersDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable flush writers default response +func (o *FindConfigMemtableFlushWritersDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableFlushWritersDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableFlushWritersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableFlushWritersDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_parameters.go new file mode 100644 index 00000000000..a2a72720927 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableHeapSpaceInMbParams creates a new FindConfigMemtableHeapSpaceInMbParams object +// with the default values initialized. +func NewFindConfigMemtableHeapSpaceInMbParams() *FindConfigMemtableHeapSpaceInMbParams { + + return &FindConfigMemtableHeapSpaceInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableHeapSpaceInMbParamsWithTimeout creates a new FindConfigMemtableHeapSpaceInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableHeapSpaceInMbParamsWithTimeout(timeout time.Duration) *FindConfigMemtableHeapSpaceInMbParams { + + return &FindConfigMemtableHeapSpaceInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableHeapSpaceInMbParamsWithContext creates a new FindConfigMemtableHeapSpaceInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableHeapSpaceInMbParamsWithContext(ctx context.Context) *FindConfigMemtableHeapSpaceInMbParams { + + return &FindConfigMemtableHeapSpaceInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableHeapSpaceInMbParamsWithHTTPClient creates a new FindConfigMemtableHeapSpaceInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableHeapSpaceInMbParamsWithHTTPClient(client *http.Client) *FindConfigMemtableHeapSpaceInMbParams { + + return &FindConfigMemtableHeapSpaceInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableHeapSpaceInMbParams contains all the parameters to send to the API endpoint +for the find config memtable heap space in mb operation typically these are written to a http.Request +*/ +type FindConfigMemtableHeapSpaceInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) WithTimeout(timeout time.Duration) *FindConfigMemtableHeapSpaceInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) WithContext(ctx context.Context) *FindConfigMemtableHeapSpaceInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) WithHTTPClient(client *http.Client) *FindConfigMemtableHeapSpaceInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable heap space in mb params +func (o *FindConfigMemtableHeapSpaceInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableHeapSpaceInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_responses.go new file mode 100644 index 00000000000..4339667801c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_heap_space_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableHeapSpaceInMbReader is a Reader for the FindConfigMemtableHeapSpaceInMb structure. +type FindConfigMemtableHeapSpaceInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableHeapSpaceInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableHeapSpaceInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableHeapSpaceInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableHeapSpaceInMbOK creates a FindConfigMemtableHeapSpaceInMbOK with default headers values +func NewFindConfigMemtableHeapSpaceInMbOK() *FindConfigMemtableHeapSpaceInMbOK { + return &FindConfigMemtableHeapSpaceInMbOK{} +} + +/*FindConfigMemtableHeapSpaceInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableHeapSpaceInMbOK struct { + Payload int64 +} + +func (o *FindConfigMemtableHeapSpaceInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMemtableHeapSpaceInMbOK) 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 +} + +// NewFindConfigMemtableHeapSpaceInMbDefault creates a FindConfigMemtableHeapSpaceInMbDefault with default headers values +func NewFindConfigMemtableHeapSpaceInMbDefault(code int) *FindConfigMemtableHeapSpaceInMbDefault { + return &FindConfigMemtableHeapSpaceInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableHeapSpaceInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableHeapSpaceInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable heap space in mb default response +func (o *FindConfigMemtableHeapSpaceInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableHeapSpaceInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableHeapSpaceInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableHeapSpaceInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_parameters.go new file mode 100644 index 00000000000..444dd52a620 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableOffheapSpaceInMbParams creates a new FindConfigMemtableOffheapSpaceInMbParams object +// with the default values initialized. +func NewFindConfigMemtableOffheapSpaceInMbParams() *FindConfigMemtableOffheapSpaceInMbParams { + + return &FindConfigMemtableOffheapSpaceInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableOffheapSpaceInMbParamsWithTimeout creates a new FindConfigMemtableOffheapSpaceInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableOffheapSpaceInMbParamsWithTimeout(timeout time.Duration) *FindConfigMemtableOffheapSpaceInMbParams { + + return &FindConfigMemtableOffheapSpaceInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableOffheapSpaceInMbParamsWithContext creates a new FindConfigMemtableOffheapSpaceInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableOffheapSpaceInMbParamsWithContext(ctx context.Context) *FindConfigMemtableOffheapSpaceInMbParams { + + return &FindConfigMemtableOffheapSpaceInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableOffheapSpaceInMbParamsWithHTTPClient creates a new FindConfigMemtableOffheapSpaceInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableOffheapSpaceInMbParamsWithHTTPClient(client *http.Client) *FindConfigMemtableOffheapSpaceInMbParams { + + return &FindConfigMemtableOffheapSpaceInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableOffheapSpaceInMbParams contains all the parameters to send to the API endpoint +for the find config memtable offheap space in mb operation typically these are written to a http.Request +*/ +type FindConfigMemtableOffheapSpaceInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) WithTimeout(timeout time.Duration) *FindConfigMemtableOffheapSpaceInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) WithContext(ctx context.Context) *FindConfigMemtableOffheapSpaceInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) WithHTTPClient(client *http.Client) *FindConfigMemtableOffheapSpaceInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable offheap space in mb params +func (o *FindConfigMemtableOffheapSpaceInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableOffheapSpaceInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_responses.go new file mode 100644 index 00000000000..41eedf03ab5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_offheap_space_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableOffheapSpaceInMbReader is a Reader for the FindConfigMemtableOffheapSpaceInMb structure. +type FindConfigMemtableOffheapSpaceInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableOffheapSpaceInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableOffheapSpaceInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableOffheapSpaceInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableOffheapSpaceInMbOK creates a FindConfigMemtableOffheapSpaceInMbOK with default headers values +func NewFindConfigMemtableOffheapSpaceInMbOK() *FindConfigMemtableOffheapSpaceInMbOK { + return &FindConfigMemtableOffheapSpaceInMbOK{} +} + +/*FindConfigMemtableOffheapSpaceInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableOffheapSpaceInMbOK struct { + Payload int64 +} + +func (o *FindConfigMemtableOffheapSpaceInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMemtableOffheapSpaceInMbOK) 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 +} + +// NewFindConfigMemtableOffheapSpaceInMbDefault creates a FindConfigMemtableOffheapSpaceInMbDefault with default headers values +func NewFindConfigMemtableOffheapSpaceInMbDefault(code int) *FindConfigMemtableOffheapSpaceInMbDefault { + return &FindConfigMemtableOffheapSpaceInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableOffheapSpaceInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableOffheapSpaceInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable offheap space in mb default response +func (o *FindConfigMemtableOffheapSpaceInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableOffheapSpaceInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableOffheapSpaceInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableOffheapSpaceInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_parameters.go new file mode 100644 index 00000000000..bcc72c3e7d5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMemtableTotalSpaceInMbParams creates a new FindConfigMemtableTotalSpaceInMbParams object +// with the default values initialized. +func NewFindConfigMemtableTotalSpaceInMbParams() *FindConfigMemtableTotalSpaceInMbParams { + + return &FindConfigMemtableTotalSpaceInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMemtableTotalSpaceInMbParamsWithTimeout creates a new FindConfigMemtableTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMemtableTotalSpaceInMbParamsWithTimeout(timeout time.Duration) *FindConfigMemtableTotalSpaceInMbParams { + + return &FindConfigMemtableTotalSpaceInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigMemtableTotalSpaceInMbParamsWithContext creates a new FindConfigMemtableTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMemtableTotalSpaceInMbParamsWithContext(ctx context.Context) *FindConfigMemtableTotalSpaceInMbParams { + + return &FindConfigMemtableTotalSpaceInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigMemtableTotalSpaceInMbParamsWithHTTPClient creates a new FindConfigMemtableTotalSpaceInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMemtableTotalSpaceInMbParamsWithHTTPClient(client *http.Client) *FindConfigMemtableTotalSpaceInMbParams { + + return &FindConfigMemtableTotalSpaceInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigMemtableTotalSpaceInMbParams contains all the parameters to send to the API endpoint +for the find config memtable total space in mb operation typically these are written to a http.Request +*/ +type FindConfigMemtableTotalSpaceInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) WithTimeout(timeout time.Duration) *FindConfigMemtableTotalSpaceInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) WithContext(ctx context.Context) *FindConfigMemtableTotalSpaceInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) WithHTTPClient(client *http.Client) *FindConfigMemtableTotalSpaceInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config memtable total space in mb params +func (o *FindConfigMemtableTotalSpaceInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMemtableTotalSpaceInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_responses.go new file mode 100644 index 00000000000..9d7f8385240 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_memtable_total_space_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMemtableTotalSpaceInMbReader is a Reader for the FindConfigMemtableTotalSpaceInMb structure. +type FindConfigMemtableTotalSpaceInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMemtableTotalSpaceInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMemtableTotalSpaceInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMemtableTotalSpaceInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMemtableTotalSpaceInMbOK creates a FindConfigMemtableTotalSpaceInMbOK with default headers values +func NewFindConfigMemtableTotalSpaceInMbOK() *FindConfigMemtableTotalSpaceInMbOK { + return &FindConfigMemtableTotalSpaceInMbOK{} +} + +/*FindConfigMemtableTotalSpaceInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigMemtableTotalSpaceInMbOK struct { + Payload int64 +} + +func (o *FindConfigMemtableTotalSpaceInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMemtableTotalSpaceInMbOK) 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 +} + +// NewFindConfigMemtableTotalSpaceInMbDefault creates a FindConfigMemtableTotalSpaceInMbDefault with default headers values +func NewFindConfigMemtableTotalSpaceInMbDefault(code int) *FindConfigMemtableTotalSpaceInMbDefault { + return &FindConfigMemtableTotalSpaceInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigMemtableTotalSpaceInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMemtableTotalSpaceInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config memtable total space in mb default response +func (o *FindConfigMemtableTotalSpaceInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMemtableTotalSpaceInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMemtableTotalSpaceInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMemtableTotalSpaceInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_parameters.go new file mode 100644 index 00000000000..1358bea14ac --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsParams creates a new FindConfigMurmur3PartitionerIgnoreMsbBitsParams object +// with the default values initialized. +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsParams() *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + + return &FindConfigMurmur3PartitionerIgnoreMsbBitsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithTimeout creates a new FindConfigMurmur3PartitionerIgnoreMsbBitsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithTimeout(timeout time.Duration) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + + return &FindConfigMurmur3PartitionerIgnoreMsbBitsParams{ + + timeout: timeout, + } +} + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithContext creates a new FindConfigMurmur3PartitionerIgnoreMsbBitsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithContext(ctx context.Context) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + + return &FindConfigMurmur3PartitionerIgnoreMsbBitsParams{ + + Context: ctx, + } +} + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithHTTPClient creates a new FindConfigMurmur3PartitionerIgnoreMsbBitsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsParamsWithHTTPClient(client *http.Client) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + + return &FindConfigMurmur3PartitionerIgnoreMsbBitsParams{ + HTTPClient: client, + } +} + +/*FindConfigMurmur3PartitionerIgnoreMsbBitsParams contains all the parameters to send to the API endpoint +for the find config murmur3 partitioner ignore msb bits operation typically these are written to a http.Request +*/ +type FindConfigMurmur3PartitionerIgnoreMsbBitsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) WithTimeout(timeout time.Duration) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) WithContext(ctx context.Context) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) WithHTTPClient(client *http.Client) *FindConfigMurmur3PartitionerIgnoreMsbBitsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config murmur3 partitioner ignore msb bits params +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_responses.go new file mode 100644 index 00000000000..2577d737570 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_murmur3_partitioner_ignore_msb_bits_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigMurmur3PartitionerIgnoreMsbBitsReader is a Reader for the FindConfigMurmur3PartitionerIgnoreMsbBits structure. +type FindConfigMurmur3PartitionerIgnoreMsbBitsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigMurmur3PartitionerIgnoreMsbBitsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigMurmur3PartitionerIgnoreMsbBitsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsOK creates a FindConfigMurmur3PartitionerIgnoreMsbBitsOK with default headers values +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsOK() *FindConfigMurmur3PartitionerIgnoreMsbBitsOK { + return &FindConfigMurmur3PartitionerIgnoreMsbBitsOK{} +} + +/*FindConfigMurmur3PartitionerIgnoreMsbBitsOK handles this case with default header values. + +Config value +*/ +type FindConfigMurmur3PartitionerIgnoreMsbBitsOK struct { + Payload int64 +} + +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsOK) 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 +} + +// NewFindConfigMurmur3PartitionerIgnoreMsbBitsDefault creates a FindConfigMurmur3PartitionerIgnoreMsbBitsDefault with default headers values +func NewFindConfigMurmur3PartitionerIgnoreMsbBitsDefault(code int) *FindConfigMurmur3PartitionerIgnoreMsbBitsDefault { + return &FindConfigMurmur3PartitionerIgnoreMsbBitsDefault{ + _statusCode: code, + } +} + +/*FindConfigMurmur3PartitionerIgnoreMsbBitsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigMurmur3PartitionerIgnoreMsbBitsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config murmur3 partitioner ignore msb bits default response +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigMurmur3PartitionerIgnoreMsbBitsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_parameters.go new file mode 100644 index 00000000000..b61610a3556 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigNativeTransportMaxFrameSizeInMbParams creates a new FindConfigNativeTransportMaxFrameSizeInMbParams object +// with the default values initialized. +func NewFindConfigNativeTransportMaxFrameSizeInMbParams() *FindConfigNativeTransportMaxFrameSizeInMbParams { + + return &FindConfigNativeTransportMaxFrameSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithTimeout creates a new FindConfigNativeTransportMaxFrameSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigNativeTransportMaxFrameSizeInMbParams { + + return &FindConfigNativeTransportMaxFrameSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithContext creates a new FindConfigNativeTransportMaxFrameSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithContext(ctx context.Context) *FindConfigNativeTransportMaxFrameSizeInMbParams { + + return &FindConfigNativeTransportMaxFrameSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithHTTPClient creates a new FindConfigNativeTransportMaxFrameSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigNativeTransportMaxFrameSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigNativeTransportMaxFrameSizeInMbParams { + + return &FindConfigNativeTransportMaxFrameSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigNativeTransportMaxFrameSizeInMbParams contains all the parameters to send to the API endpoint +for the find config native transport max frame size in mb operation typically these are written to a http.Request +*/ +type FindConfigNativeTransportMaxFrameSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigNativeTransportMaxFrameSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) WithContext(ctx context.Context) *FindConfigNativeTransportMaxFrameSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigNativeTransportMaxFrameSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config native transport max frame size in mb params +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigNativeTransportMaxFrameSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_responses.go new file mode 100644 index 00000000000..e966b601e2d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_frame_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigNativeTransportMaxFrameSizeInMbReader is a Reader for the FindConfigNativeTransportMaxFrameSizeInMb structure. +type FindConfigNativeTransportMaxFrameSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigNativeTransportMaxFrameSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigNativeTransportMaxFrameSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigNativeTransportMaxFrameSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigNativeTransportMaxFrameSizeInMbOK creates a FindConfigNativeTransportMaxFrameSizeInMbOK with default headers values +func NewFindConfigNativeTransportMaxFrameSizeInMbOK() *FindConfigNativeTransportMaxFrameSizeInMbOK { + return &FindConfigNativeTransportMaxFrameSizeInMbOK{} +} + +/*FindConfigNativeTransportMaxFrameSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigNativeTransportMaxFrameSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigNativeTransportMaxFrameSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigNativeTransportMaxFrameSizeInMbOK) 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 +} + +// NewFindConfigNativeTransportMaxFrameSizeInMbDefault creates a FindConfigNativeTransportMaxFrameSizeInMbDefault with default headers values +func NewFindConfigNativeTransportMaxFrameSizeInMbDefault(code int) *FindConfigNativeTransportMaxFrameSizeInMbDefault { + return &FindConfigNativeTransportMaxFrameSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigNativeTransportMaxFrameSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigNativeTransportMaxFrameSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config native transport max frame size in mb default response +func (o *FindConfigNativeTransportMaxFrameSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigNativeTransportMaxFrameSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigNativeTransportMaxFrameSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigNativeTransportMaxFrameSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_parameters.go new file mode 100644 index 00000000000..3e4eebd44f9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigNativeTransportMaxThreadsParams creates a new FindConfigNativeTransportMaxThreadsParams object +// with the default values initialized. +func NewFindConfigNativeTransportMaxThreadsParams() *FindConfigNativeTransportMaxThreadsParams { + + return &FindConfigNativeTransportMaxThreadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigNativeTransportMaxThreadsParamsWithTimeout creates a new FindConfigNativeTransportMaxThreadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigNativeTransportMaxThreadsParamsWithTimeout(timeout time.Duration) *FindConfigNativeTransportMaxThreadsParams { + + return &FindConfigNativeTransportMaxThreadsParams{ + + timeout: timeout, + } +} + +// NewFindConfigNativeTransportMaxThreadsParamsWithContext creates a new FindConfigNativeTransportMaxThreadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigNativeTransportMaxThreadsParamsWithContext(ctx context.Context) *FindConfigNativeTransportMaxThreadsParams { + + return &FindConfigNativeTransportMaxThreadsParams{ + + Context: ctx, + } +} + +// NewFindConfigNativeTransportMaxThreadsParamsWithHTTPClient creates a new FindConfigNativeTransportMaxThreadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigNativeTransportMaxThreadsParamsWithHTTPClient(client *http.Client) *FindConfigNativeTransportMaxThreadsParams { + + return &FindConfigNativeTransportMaxThreadsParams{ + HTTPClient: client, + } +} + +/*FindConfigNativeTransportMaxThreadsParams contains all the parameters to send to the API endpoint +for the find config native transport max threads operation typically these are written to a http.Request +*/ +type FindConfigNativeTransportMaxThreadsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) WithTimeout(timeout time.Duration) *FindConfigNativeTransportMaxThreadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) WithContext(ctx context.Context) *FindConfigNativeTransportMaxThreadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) WithHTTPClient(client *http.Client) *FindConfigNativeTransportMaxThreadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config native transport max threads params +func (o *FindConfigNativeTransportMaxThreadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigNativeTransportMaxThreadsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_responses.go new file mode 100644 index 00000000000..836a6415679 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_max_threads_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigNativeTransportMaxThreadsReader is a Reader for the FindConfigNativeTransportMaxThreads structure. +type FindConfigNativeTransportMaxThreadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigNativeTransportMaxThreadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigNativeTransportMaxThreadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigNativeTransportMaxThreadsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigNativeTransportMaxThreadsOK creates a FindConfigNativeTransportMaxThreadsOK with default headers values +func NewFindConfigNativeTransportMaxThreadsOK() *FindConfigNativeTransportMaxThreadsOK { + return &FindConfigNativeTransportMaxThreadsOK{} +} + +/*FindConfigNativeTransportMaxThreadsOK handles this case with default header values. + +Config value +*/ +type FindConfigNativeTransportMaxThreadsOK struct { + Payload int64 +} + +func (o *FindConfigNativeTransportMaxThreadsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigNativeTransportMaxThreadsOK) 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 +} + +// NewFindConfigNativeTransportMaxThreadsDefault creates a FindConfigNativeTransportMaxThreadsDefault with default headers values +func NewFindConfigNativeTransportMaxThreadsDefault(code int) *FindConfigNativeTransportMaxThreadsDefault { + return &FindConfigNativeTransportMaxThreadsDefault{ + _statusCode: code, + } +} + +/*FindConfigNativeTransportMaxThreadsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigNativeTransportMaxThreadsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config native transport max threads default response +func (o *FindConfigNativeTransportMaxThreadsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigNativeTransportMaxThreadsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigNativeTransportMaxThreadsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigNativeTransportMaxThreadsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_parameters.go new file mode 100644 index 00000000000..cb6ea1f559f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigNativeTransportPortParams creates a new FindConfigNativeTransportPortParams object +// with the default values initialized. +func NewFindConfigNativeTransportPortParams() *FindConfigNativeTransportPortParams { + + return &FindConfigNativeTransportPortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigNativeTransportPortParamsWithTimeout creates a new FindConfigNativeTransportPortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigNativeTransportPortParamsWithTimeout(timeout time.Duration) *FindConfigNativeTransportPortParams { + + return &FindConfigNativeTransportPortParams{ + + timeout: timeout, + } +} + +// NewFindConfigNativeTransportPortParamsWithContext creates a new FindConfigNativeTransportPortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigNativeTransportPortParamsWithContext(ctx context.Context) *FindConfigNativeTransportPortParams { + + return &FindConfigNativeTransportPortParams{ + + Context: ctx, + } +} + +// NewFindConfigNativeTransportPortParamsWithHTTPClient creates a new FindConfigNativeTransportPortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigNativeTransportPortParamsWithHTTPClient(client *http.Client) *FindConfigNativeTransportPortParams { + + return &FindConfigNativeTransportPortParams{ + HTTPClient: client, + } +} + +/*FindConfigNativeTransportPortParams contains all the parameters to send to the API endpoint +for the find config native transport port operation typically these are written to a http.Request +*/ +type FindConfigNativeTransportPortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) WithTimeout(timeout time.Duration) *FindConfigNativeTransportPortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) WithContext(ctx context.Context) *FindConfigNativeTransportPortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) WithHTTPClient(client *http.Client) *FindConfigNativeTransportPortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config native transport port params +func (o *FindConfigNativeTransportPortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigNativeTransportPortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_responses.go new file mode 100644 index 00000000000..6abf9d5d629 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigNativeTransportPortReader is a Reader for the FindConfigNativeTransportPort structure. +type FindConfigNativeTransportPortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigNativeTransportPortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigNativeTransportPortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigNativeTransportPortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigNativeTransportPortOK creates a FindConfigNativeTransportPortOK with default headers values +func NewFindConfigNativeTransportPortOK() *FindConfigNativeTransportPortOK { + return &FindConfigNativeTransportPortOK{} +} + +/*FindConfigNativeTransportPortOK handles this case with default header values. + +Config value +*/ +type FindConfigNativeTransportPortOK struct { + Payload int64 +} + +func (o *FindConfigNativeTransportPortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigNativeTransportPortOK) 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 +} + +// NewFindConfigNativeTransportPortDefault creates a FindConfigNativeTransportPortDefault with default headers values +func NewFindConfigNativeTransportPortDefault(code int) *FindConfigNativeTransportPortDefault { + return &FindConfigNativeTransportPortDefault{ + _statusCode: code, + } +} + +/*FindConfigNativeTransportPortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigNativeTransportPortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config native transport port default response +func (o *FindConfigNativeTransportPortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigNativeTransportPortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigNativeTransportPortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigNativeTransportPortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_parameters.go new file mode 100644 index 00000000000..5e5ba8306a5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigNativeTransportPortSslParams creates a new FindConfigNativeTransportPortSslParams object +// with the default values initialized. +func NewFindConfigNativeTransportPortSslParams() *FindConfigNativeTransportPortSslParams { + + return &FindConfigNativeTransportPortSslParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigNativeTransportPortSslParamsWithTimeout creates a new FindConfigNativeTransportPortSslParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigNativeTransportPortSslParamsWithTimeout(timeout time.Duration) *FindConfigNativeTransportPortSslParams { + + return &FindConfigNativeTransportPortSslParams{ + + timeout: timeout, + } +} + +// NewFindConfigNativeTransportPortSslParamsWithContext creates a new FindConfigNativeTransportPortSslParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigNativeTransportPortSslParamsWithContext(ctx context.Context) *FindConfigNativeTransportPortSslParams { + + return &FindConfigNativeTransportPortSslParams{ + + Context: ctx, + } +} + +// NewFindConfigNativeTransportPortSslParamsWithHTTPClient creates a new FindConfigNativeTransportPortSslParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigNativeTransportPortSslParamsWithHTTPClient(client *http.Client) *FindConfigNativeTransportPortSslParams { + + return &FindConfigNativeTransportPortSslParams{ + HTTPClient: client, + } +} + +/*FindConfigNativeTransportPortSslParams contains all the parameters to send to the API endpoint +for the find config native transport port ssl operation typically these are written to a http.Request +*/ +type FindConfigNativeTransportPortSslParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) WithTimeout(timeout time.Duration) *FindConfigNativeTransportPortSslParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) WithContext(ctx context.Context) *FindConfigNativeTransportPortSslParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) WithHTTPClient(client *http.Client) *FindConfigNativeTransportPortSslParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config native transport port ssl params +func (o *FindConfigNativeTransportPortSslParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigNativeTransportPortSslParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_responses.go new file mode 100644 index 00000000000..daeccfc9bd0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_native_transport_port_ssl_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigNativeTransportPortSslReader is a Reader for the FindConfigNativeTransportPortSsl structure. +type FindConfigNativeTransportPortSslReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigNativeTransportPortSslReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigNativeTransportPortSslOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigNativeTransportPortSslDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigNativeTransportPortSslOK creates a FindConfigNativeTransportPortSslOK with default headers values +func NewFindConfigNativeTransportPortSslOK() *FindConfigNativeTransportPortSslOK { + return &FindConfigNativeTransportPortSslOK{} +} + +/*FindConfigNativeTransportPortSslOK handles this case with default header values. + +Config value +*/ +type FindConfigNativeTransportPortSslOK struct { + Payload int64 +} + +func (o *FindConfigNativeTransportPortSslOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigNativeTransportPortSslOK) 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 +} + +// NewFindConfigNativeTransportPortSslDefault creates a FindConfigNativeTransportPortSslDefault with default headers values +func NewFindConfigNativeTransportPortSslDefault(code int) *FindConfigNativeTransportPortSslDefault { + return &FindConfigNativeTransportPortSslDefault{ + _statusCode: code, + } +} + +/*FindConfigNativeTransportPortSslDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigNativeTransportPortSslDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config native transport port ssl default response +func (o *FindConfigNativeTransportPortSslDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigNativeTransportPortSslDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigNativeTransportPortSslDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigNativeTransportPortSslDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_parameters.go new file mode 100644 index 00000000000..2e8bb46aea6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigNumTokensParams creates a new FindConfigNumTokensParams object +// with the default values initialized. +func NewFindConfigNumTokensParams() *FindConfigNumTokensParams { + + return &FindConfigNumTokensParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigNumTokensParamsWithTimeout creates a new FindConfigNumTokensParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigNumTokensParamsWithTimeout(timeout time.Duration) *FindConfigNumTokensParams { + + return &FindConfigNumTokensParams{ + + timeout: timeout, + } +} + +// NewFindConfigNumTokensParamsWithContext creates a new FindConfigNumTokensParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigNumTokensParamsWithContext(ctx context.Context) *FindConfigNumTokensParams { + + return &FindConfigNumTokensParams{ + + Context: ctx, + } +} + +// NewFindConfigNumTokensParamsWithHTTPClient creates a new FindConfigNumTokensParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigNumTokensParamsWithHTTPClient(client *http.Client) *FindConfigNumTokensParams { + + return &FindConfigNumTokensParams{ + HTTPClient: client, + } +} + +/*FindConfigNumTokensParams contains all the parameters to send to the API endpoint +for the find config num tokens operation typically these are written to a http.Request +*/ +type FindConfigNumTokensParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config num tokens params +func (o *FindConfigNumTokensParams) WithTimeout(timeout time.Duration) *FindConfigNumTokensParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config num tokens params +func (o *FindConfigNumTokensParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config num tokens params +func (o *FindConfigNumTokensParams) WithContext(ctx context.Context) *FindConfigNumTokensParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config num tokens params +func (o *FindConfigNumTokensParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config num tokens params +func (o *FindConfigNumTokensParams) WithHTTPClient(client *http.Client) *FindConfigNumTokensParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config num tokens params +func (o *FindConfigNumTokensParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigNumTokensParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_responses.go new file mode 100644 index 00000000000..e6dfc34b9e1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_num_tokens_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigNumTokensReader is a Reader for the FindConfigNumTokens structure. +type FindConfigNumTokensReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigNumTokensReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigNumTokensOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigNumTokensDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigNumTokensOK creates a FindConfigNumTokensOK with default headers values +func NewFindConfigNumTokensOK() *FindConfigNumTokensOK { + return &FindConfigNumTokensOK{} +} + +/*FindConfigNumTokensOK handles this case with default header values. + +Config value +*/ +type FindConfigNumTokensOK struct { + Payload int64 +} + +func (o *FindConfigNumTokensOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigNumTokensOK) 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 +} + +// NewFindConfigNumTokensDefault creates a FindConfigNumTokensDefault with default headers values +func NewFindConfigNumTokensDefault(code int) *FindConfigNumTokensDefault { + return &FindConfigNumTokensDefault{ + _statusCode: code, + } +} + +/*FindConfigNumTokensDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigNumTokensDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config num tokens default response +func (o *FindConfigNumTokensDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigNumTokensDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigNumTokensDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigNumTokensDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_parameters.go new file mode 100644 index 00000000000..dc71d995eb3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigOverrideDecommissionParams creates a new FindConfigOverrideDecommissionParams object +// with the default values initialized. +func NewFindConfigOverrideDecommissionParams() *FindConfigOverrideDecommissionParams { + + return &FindConfigOverrideDecommissionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigOverrideDecommissionParamsWithTimeout creates a new FindConfigOverrideDecommissionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigOverrideDecommissionParamsWithTimeout(timeout time.Duration) *FindConfigOverrideDecommissionParams { + + return &FindConfigOverrideDecommissionParams{ + + timeout: timeout, + } +} + +// NewFindConfigOverrideDecommissionParamsWithContext creates a new FindConfigOverrideDecommissionParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigOverrideDecommissionParamsWithContext(ctx context.Context) *FindConfigOverrideDecommissionParams { + + return &FindConfigOverrideDecommissionParams{ + + Context: ctx, + } +} + +// NewFindConfigOverrideDecommissionParamsWithHTTPClient creates a new FindConfigOverrideDecommissionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigOverrideDecommissionParamsWithHTTPClient(client *http.Client) *FindConfigOverrideDecommissionParams { + + return &FindConfigOverrideDecommissionParams{ + HTTPClient: client, + } +} + +/*FindConfigOverrideDecommissionParams contains all the parameters to send to the API endpoint +for the find config override decommission operation typically these are written to a http.Request +*/ +type FindConfigOverrideDecommissionParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) WithTimeout(timeout time.Duration) *FindConfigOverrideDecommissionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) WithContext(ctx context.Context) *FindConfigOverrideDecommissionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) WithHTTPClient(client *http.Client) *FindConfigOverrideDecommissionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config override decommission params +func (o *FindConfigOverrideDecommissionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigOverrideDecommissionParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_responses.go new file mode 100644 index 00000000000..87e4373061d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_override_decommission_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigOverrideDecommissionReader is a Reader for the FindConfigOverrideDecommission structure. +type FindConfigOverrideDecommissionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigOverrideDecommissionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigOverrideDecommissionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigOverrideDecommissionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigOverrideDecommissionOK creates a FindConfigOverrideDecommissionOK with default headers values +func NewFindConfigOverrideDecommissionOK() *FindConfigOverrideDecommissionOK { + return &FindConfigOverrideDecommissionOK{} +} + +/*FindConfigOverrideDecommissionOK handles this case with default header values. + +Config value +*/ +type FindConfigOverrideDecommissionOK struct { + Payload bool +} + +func (o *FindConfigOverrideDecommissionOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigOverrideDecommissionOK) 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 +} + +// NewFindConfigOverrideDecommissionDefault creates a FindConfigOverrideDecommissionDefault with default headers values +func NewFindConfigOverrideDecommissionDefault(code int) *FindConfigOverrideDecommissionDefault { + return &FindConfigOverrideDecommissionDefault{ + _statusCode: code, + } +} + +/*FindConfigOverrideDecommissionDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigOverrideDecommissionDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config override decommission default response +func (o *FindConfigOverrideDecommissionDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigOverrideDecommissionDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigOverrideDecommissionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigOverrideDecommissionDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_parameters.go new file mode 100644 index 00000000000..ca026f42352 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPartitionerParams creates a new FindConfigPartitionerParams object +// with the default values initialized. +func NewFindConfigPartitionerParams() *FindConfigPartitionerParams { + + return &FindConfigPartitionerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPartitionerParamsWithTimeout creates a new FindConfigPartitionerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPartitionerParamsWithTimeout(timeout time.Duration) *FindConfigPartitionerParams { + + return &FindConfigPartitionerParams{ + + timeout: timeout, + } +} + +// NewFindConfigPartitionerParamsWithContext creates a new FindConfigPartitionerParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPartitionerParamsWithContext(ctx context.Context) *FindConfigPartitionerParams { + + return &FindConfigPartitionerParams{ + + Context: ctx, + } +} + +// NewFindConfigPartitionerParamsWithHTTPClient creates a new FindConfigPartitionerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPartitionerParamsWithHTTPClient(client *http.Client) *FindConfigPartitionerParams { + + return &FindConfigPartitionerParams{ + HTTPClient: client, + } +} + +/*FindConfigPartitionerParams contains all the parameters to send to the API endpoint +for the find config partitioner operation typically these are written to a http.Request +*/ +type FindConfigPartitionerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config partitioner params +func (o *FindConfigPartitionerParams) WithTimeout(timeout time.Duration) *FindConfigPartitionerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config partitioner params +func (o *FindConfigPartitionerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config partitioner params +func (o *FindConfigPartitionerParams) WithContext(ctx context.Context) *FindConfigPartitionerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config partitioner params +func (o *FindConfigPartitionerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config partitioner params +func (o *FindConfigPartitionerParams) WithHTTPClient(client *http.Client) *FindConfigPartitionerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config partitioner params +func (o *FindConfigPartitionerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPartitionerParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_responses.go new file mode 100644 index 00000000000..764066a7daf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_partitioner_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPartitionerReader is a Reader for the FindConfigPartitioner structure. +type FindConfigPartitionerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPartitionerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPartitionerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPartitionerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPartitionerOK creates a FindConfigPartitionerOK with default headers values +func NewFindConfigPartitionerOK() *FindConfigPartitionerOK { + return &FindConfigPartitionerOK{} +} + +/*FindConfigPartitionerOK handles this case with default header values. + +Config value +*/ +type FindConfigPartitionerOK struct { + Payload string +} + +func (o *FindConfigPartitionerOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigPartitionerOK) 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 +} + +// NewFindConfigPartitionerDefault creates a FindConfigPartitionerDefault with default headers values +func NewFindConfigPartitionerDefault(code int) *FindConfigPartitionerDefault { + return &FindConfigPartitionerDefault{ + _statusCode: code, + } +} + +/*FindConfigPartitionerDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPartitionerDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config partitioner default response +func (o *FindConfigPartitionerDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPartitionerDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPartitionerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPartitionerDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_parameters.go new file mode 100644 index 00000000000..5c85bfa88e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPermissionsCacheMaxEntriesParams creates a new FindConfigPermissionsCacheMaxEntriesParams object +// with the default values initialized. +func NewFindConfigPermissionsCacheMaxEntriesParams() *FindConfigPermissionsCacheMaxEntriesParams { + + return &FindConfigPermissionsCacheMaxEntriesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPermissionsCacheMaxEntriesParamsWithTimeout creates a new FindConfigPermissionsCacheMaxEntriesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPermissionsCacheMaxEntriesParamsWithTimeout(timeout time.Duration) *FindConfigPermissionsCacheMaxEntriesParams { + + return &FindConfigPermissionsCacheMaxEntriesParams{ + + timeout: timeout, + } +} + +// NewFindConfigPermissionsCacheMaxEntriesParamsWithContext creates a new FindConfigPermissionsCacheMaxEntriesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPermissionsCacheMaxEntriesParamsWithContext(ctx context.Context) *FindConfigPermissionsCacheMaxEntriesParams { + + return &FindConfigPermissionsCacheMaxEntriesParams{ + + Context: ctx, + } +} + +// NewFindConfigPermissionsCacheMaxEntriesParamsWithHTTPClient creates a new FindConfigPermissionsCacheMaxEntriesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPermissionsCacheMaxEntriesParamsWithHTTPClient(client *http.Client) *FindConfigPermissionsCacheMaxEntriesParams { + + return &FindConfigPermissionsCacheMaxEntriesParams{ + HTTPClient: client, + } +} + +/*FindConfigPermissionsCacheMaxEntriesParams contains all the parameters to send to the API endpoint +for the find config permissions cache max entries operation typically these are written to a http.Request +*/ +type FindConfigPermissionsCacheMaxEntriesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) WithTimeout(timeout time.Duration) *FindConfigPermissionsCacheMaxEntriesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) WithContext(ctx context.Context) *FindConfigPermissionsCacheMaxEntriesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) WithHTTPClient(client *http.Client) *FindConfigPermissionsCacheMaxEntriesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config permissions cache max entries params +func (o *FindConfigPermissionsCacheMaxEntriesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPermissionsCacheMaxEntriesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_responses.go new file mode 100644 index 00000000000..42a6d773b8c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_cache_max_entries_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPermissionsCacheMaxEntriesReader is a Reader for the FindConfigPermissionsCacheMaxEntries structure. +type FindConfigPermissionsCacheMaxEntriesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPermissionsCacheMaxEntriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPermissionsCacheMaxEntriesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPermissionsCacheMaxEntriesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPermissionsCacheMaxEntriesOK creates a FindConfigPermissionsCacheMaxEntriesOK with default headers values +func NewFindConfigPermissionsCacheMaxEntriesOK() *FindConfigPermissionsCacheMaxEntriesOK { + return &FindConfigPermissionsCacheMaxEntriesOK{} +} + +/*FindConfigPermissionsCacheMaxEntriesOK handles this case with default header values. + +Config value +*/ +type FindConfigPermissionsCacheMaxEntriesOK struct { + Payload int64 +} + +func (o *FindConfigPermissionsCacheMaxEntriesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigPermissionsCacheMaxEntriesOK) 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 +} + +// NewFindConfigPermissionsCacheMaxEntriesDefault creates a FindConfigPermissionsCacheMaxEntriesDefault with default headers values +func NewFindConfigPermissionsCacheMaxEntriesDefault(code int) *FindConfigPermissionsCacheMaxEntriesDefault { + return &FindConfigPermissionsCacheMaxEntriesDefault{ + _statusCode: code, + } +} + +/*FindConfigPermissionsCacheMaxEntriesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPermissionsCacheMaxEntriesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config permissions cache max entries default response +func (o *FindConfigPermissionsCacheMaxEntriesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPermissionsCacheMaxEntriesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPermissionsCacheMaxEntriesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPermissionsCacheMaxEntriesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_parameters.go new file mode 100644 index 00000000000..b0a8ceefde9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPermissionsUpdateIntervalInMsParams creates a new FindConfigPermissionsUpdateIntervalInMsParams object +// with the default values initialized. +func NewFindConfigPermissionsUpdateIntervalInMsParams() *FindConfigPermissionsUpdateIntervalInMsParams { + + return &FindConfigPermissionsUpdateIntervalInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPermissionsUpdateIntervalInMsParamsWithTimeout creates a new FindConfigPermissionsUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPermissionsUpdateIntervalInMsParamsWithTimeout(timeout time.Duration) *FindConfigPermissionsUpdateIntervalInMsParams { + + return &FindConfigPermissionsUpdateIntervalInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigPermissionsUpdateIntervalInMsParamsWithContext creates a new FindConfigPermissionsUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPermissionsUpdateIntervalInMsParamsWithContext(ctx context.Context) *FindConfigPermissionsUpdateIntervalInMsParams { + + return &FindConfigPermissionsUpdateIntervalInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigPermissionsUpdateIntervalInMsParamsWithHTTPClient creates a new FindConfigPermissionsUpdateIntervalInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPermissionsUpdateIntervalInMsParamsWithHTTPClient(client *http.Client) *FindConfigPermissionsUpdateIntervalInMsParams { + + return &FindConfigPermissionsUpdateIntervalInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigPermissionsUpdateIntervalInMsParams contains all the parameters to send to the API endpoint +for the find config permissions update interval in ms operation typically these are written to a http.Request +*/ +type FindConfigPermissionsUpdateIntervalInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) WithTimeout(timeout time.Duration) *FindConfigPermissionsUpdateIntervalInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) WithContext(ctx context.Context) *FindConfigPermissionsUpdateIntervalInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) WithHTTPClient(client *http.Client) *FindConfigPermissionsUpdateIntervalInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config permissions update interval in ms params +func (o *FindConfigPermissionsUpdateIntervalInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPermissionsUpdateIntervalInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_responses.go new file mode 100644 index 00000000000..71a58ed8476 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_update_interval_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPermissionsUpdateIntervalInMsReader is a Reader for the FindConfigPermissionsUpdateIntervalInMs structure. +type FindConfigPermissionsUpdateIntervalInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPermissionsUpdateIntervalInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPermissionsUpdateIntervalInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPermissionsUpdateIntervalInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPermissionsUpdateIntervalInMsOK creates a FindConfigPermissionsUpdateIntervalInMsOK with default headers values +func NewFindConfigPermissionsUpdateIntervalInMsOK() *FindConfigPermissionsUpdateIntervalInMsOK { + return &FindConfigPermissionsUpdateIntervalInMsOK{} +} + +/*FindConfigPermissionsUpdateIntervalInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigPermissionsUpdateIntervalInMsOK struct { + Payload int64 +} + +func (o *FindConfigPermissionsUpdateIntervalInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigPermissionsUpdateIntervalInMsOK) 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 +} + +// NewFindConfigPermissionsUpdateIntervalInMsDefault creates a FindConfigPermissionsUpdateIntervalInMsDefault with default headers values +func NewFindConfigPermissionsUpdateIntervalInMsDefault(code int) *FindConfigPermissionsUpdateIntervalInMsDefault { + return &FindConfigPermissionsUpdateIntervalInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigPermissionsUpdateIntervalInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPermissionsUpdateIntervalInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config permissions update interval in ms default response +func (o *FindConfigPermissionsUpdateIntervalInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPermissionsUpdateIntervalInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPermissionsUpdateIntervalInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPermissionsUpdateIntervalInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_parameters.go new file mode 100644 index 00000000000..58e1ac5169b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPermissionsValidityInMsParams creates a new FindConfigPermissionsValidityInMsParams object +// with the default values initialized. +func NewFindConfigPermissionsValidityInMsParams() *FindConfigPermissionsValidityInMsParams { + + return &FindConfigPermissionsValidityInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPermissionsValidityInMsParamsWithTimeout creates a new FindConfigPermissionsValidityInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPermissionsValidityInMsParamsWithTimeout(timeout time.Duration) *FindConfigPermissionsValidityInMsParams { + + return &FindConfigPermissionsValidityInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigPermissionsValidityInMsParamsWithContext creates a new FindConfigPermissionsValidityInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPermissionsValidityInMsParamsWithContext(ctx context.Context) *FindConfigPermissionsValidityInMsParams { + + return &FindConfigPermissionsValidityInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigPermissionsValidityInMsParamsWithHTTPClient creates a new FindConfigPermissionsValidityInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPermissionsValidityInMsParamsWithHTTPClient(client *http.Client) *FindConfigPermissionsValidityInMsParams { + + return &FindConfigPermissionsValidityInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigPermissionsValidityInMsParams contains all the parameters to send to the API endpoint +for the find config permissions validity in ms operation typically these are written to a http.Request +*/ +type FindConfigPermissionsValidityInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) WithTimeout(timeout time.Duration) *FindConfigPermissionsValidityInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) WithContext(ctx context.Context) *FindConfigPermissionsValidityInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) WithHTTPClient(client *http.Client) *FindConfigPermissionsValidityInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config permissions validity in ms params +func (o *FindConfigPermissionsValidityInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPermissionsValidityInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_responses.go new file mode 100644 index 00000000000..b4e88be4319 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_permissions_validity_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPermissionsValidityInMsReader is a Reader for the FindConfigPermissionsValidityInMs structure. +type FindConfigPermissionsValidityInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPermissionsValidityInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPermissionsValidityInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPermissionsValidityInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPermissionsValidityInMsOK creates a FindConfigPermissionsValidityInMsOK with default headers values +func NewFindConfigPermissionsValidityInMsOK() *FindConfigPermissionsValidityInMsOK { + return &FindConfigPermissionsValidityInMsOK{} +} + +/*FindConfigPermissionsValidityInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigPermissionsValidityInMsOK struct { + Payload int64 +} + +func (o *FindConfigPermissionsValidityInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigPermissionsValidityInMsOK) 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 +} + +// NewFindConfigPermissionsValidityInMsDefault creates a FindConfigPermissionsValidityInMsDefault with default headers values +func NewFindConfigPermissionsValidityInMsDefault(code int) *FindConfigPermissionsValidityInMsDefault { + return &FindConfigPermissionsValidityInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigPermissionsValidityInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPermissionsValidityInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config permissions validity in ms default response +func (o *FindConfigPermissionsValidityInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPermissionsValidityInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPermissionsValidityInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPermissionsValidityInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_parameters.go new file mode 100644 index 00000000000..a7fed842c82 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPhiConvictThresholdParams creates a new FindConfigPhiConvictThresholdParams object +// with the default values initialized. +func NewFindConfigPhiConvictThresholdParams() *FindConfigPhiConvictThresholdParams { + + return &FindConfigPhiConvictThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPhiConvictThresholdParamsWithTimeout creates a new FindConfigPhiConvictThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPhiConvictThresholdParamsWithTimeout(timeout time.Duration) *FindConfigPhiConvictThresholdParams { + + return &FindConfigPhiConvictThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigPhiConvictThresholdParamsWithContext creates a new FindConfigPhiConvictThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPhiConvictThresholdParamsWithContext(ctx context.Context) *FindConfigPhiConvictThresholdParams { + + return &FindConfigPhiConvictThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigPhiConvictThresholdParamsWithHTTPClient creates a new FindConfigPhiConvictThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPhiConvictThresholdParamsWithHTTPClient(client *http.Client) *FindConfigPhiConvictThresholdParams { + + return &FindConfigPhiConvictThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigPhiConvictThresholdParams contains all the parameters to send to the API endpoint +for the find config phi convict threshold operation typically these are written to a http.Request +*/ +type FindConfigPhiConvictThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) WithTimeout(timeout time.Duration) *FindConfigPhiConvictThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) WithContext(ctx context.Context) *FindConfigPhiConvictThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) WithHTTPClient(client *http.Client) *FindConfigPhiConvictThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config phi convict threshold params +func (o *FindConfigPhiConvictThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPhiConvictThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_responses.go new file mode 100644 index 00000000000..0e26f3e75e8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_phi_convict_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPhiConvictThresholdReader is a Reader for the FindConfigPhiConvictThreshold structure. +type FindConfigPhiConvictThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPhiConvictThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPhiConvictThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPhiConvictThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPhiConvictThresholdOK creates a FindConfigPhiConvictThresholdOK with default headers values +func NewFindConfigPhiConvictThresholdOK() *FindConfigPhiConvictThresholdOK { + return &FindConfigPhiConvictThresholdOK{} +} + +/*FindConfigPhiConvictThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigPhiConvictThresholdOK struct { + Payload int64 +} + +func (o *FindConfigPhiConvictThresholdOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigPhiConvictThresholdOK) 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 +} + +// NewFindConfigPhiConvictThresholdDefault creates a FindConfigPhiConvictThresholdDefault with default headers values +func NewFindConfigPhiConvictThresholdDefault(code int) *FindConfigPhiConvictThresholdDefault { + return &FindConfigPhiConvictThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigPhiConvictThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPhiConvictThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config phi convict threshold default response +func (o *FindConfigPhiConvictThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPhiConvictThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPhiConvictThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPhiConvictThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_parameters.go new file mode 100644 index 00000000000..03a16c3b911 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPreheatKernelPageCacheParams creates a new FindConfigPreheatKernelPageCacheParams object +// with the default values initialized. +func NewFindConfigPreheatKernelPageCacheParams() *FindConfigPreheatKernelPageCacheParams { + + return &FindConfigPreheatKernelPageCacheParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPreheatKernelPageCacheParamsWithTimeout creates a new FindConfigPreheatKernelPageCacheParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPreheatKernelPageCacheParamsWithTimeout(timeout time.Duration) *FindConfigPreheatKernelPageCacheParams { + + return &FindConfigPreheatKernelPageCacheParams{ + + timeout: timeout, + } +} + +// NewFindConfigPreheatKernelPageCacheParamsWithContext creates a new FindConfigPreheatKernelPageCacheParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPreheatKernelPageCacheParamsWithContext(ctx context.Context) *FindConfigPreheatKernelPageCacheParams { + + return &FindConfigPreheatKernelPageCacheParams{ + + Context: ctx, + } +} + +// NewFindConfigPreheatKernelPageCacheParamsWithHTTPClient creates a new FindConfigPreheatKernelPageCacheParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPreheatKernelPageCacheParamsWithHTTPClient(client *http.Client) *FindConfigPreheatKernelPageCacheParams { + + return &FindConfigPreheatKernelPageCacheParams{ + HTTPClient: client, + } +} + +/*FindConfigPreheatKernelPageCacheParams contains all the parameters to send to the API endpoint +for the find config preheat kernel page cache operation typically these are written to a http.Request +*/ +type FindConfigPreheatKernelPageCacheParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) WithTimeout(timeout time.Duration) *FindConfigPreheatKernelPageCacheParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) WithContext(ctx context.Context) *FindConfigPreheatKernelPageCacheParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) WithHTTPClient(client *http.Client) *FindConfigPreheatKernelPageCacheParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config preheat kernel page cache params +func (o *FindConfigPreheatKernelPageCacheParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPreheatKernelPageCacheParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_responses.go new file mode 100644 index 00000000000..398fb700848 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_preheat_kernel_page_cache_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPreheatKernelPageCacheReader is a Reader for the FindConfigPreheatKernelPageCache structure. +type FindConfigPreheatKernelPageCacheReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPreheatKernelPageCacheReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPreheatKernelPageCacheOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPreheatKernelPageCacheDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPreheatKernelPageCacheOK creates a FindConfigPreheatKernelPageCacheOK with default headers values +func NewFindConfigPreheatKernelPageCacheOK() *FindConfigPreheatKernelPageCacheOK { + return &FindConfigPreheatKernelPageCacheOK{} +} + +/*FindConfigPreheatKernelPageCacheOK handles this case with default header values. + +Config value +*/ +type FindConfigPreheatKernelPageCacheOK struct { + Payload bool +} + +func (o *FindConfigPreheatKernelPageCacheOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigPreheatKernelPageCacheOK) 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 +} + +// NewFindConfigPreheatKernelPageCacheDefault creates a FindConfigPreheatKernelPageCacheDefault with default headers values +func NewFindConfigPreheatKernelPageCacheDefault(code int) *FindConfigPreheatKernelPageCacheDefault { + return &FindConfigPreheatKernelPageCacheDefault{ + _statusCode: code, + } +} + +/*FindConfigPreheatKernelPageCacheDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPreheatKernelPageCacheDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config preheat kernel page cache default response +func (o *FindConfigPreheatKernelPageCacheDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPreheatKernelPageCacheDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPreheatKernelPageCacheDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPreheatKernelPageCacheDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_parameters.go new file mode 100644 index 00000000000..a843227d56a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPrometheusAddressParams creates a new FindConfigPrometheusAddressParams object +// with the default values initialized. +func NewFindConfigPrometheusAddressParams() *FindConfigPrometheusAddressParams { + + return &FindConfigPrometheusAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPrometheusAddressParamsWithTimeout creates a new FindConfigPrometheusAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPrometheusAddressParamsWithTimeout(timeout time.Duration) *FindConfigPrometheusAddressParams { + + return &FindConfigPrometheusAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigPrometheusAddressParamsWithContext creates a new FindConfigPrometheusAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPrometheusAddressParamsWithContext(ctx context.Context) *FindConfigPrometheusAddressParams { + + return &FindConfigPrometheusAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigPrometheusAddressParamsWithHTTPClient creates a new FindConfigPrometheusAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPrometheusAddressParamsWithHTTPClient(client *http.Client) *FindConfigPrometheusAddressParams { + + return &FindConfigPrometheusAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigPrometheusAddressParams contains all the parameters to send to the API endpoint +for the find config prometheus address operation typically these are written to a http.Request +*/ +type FindConfigPrometheusAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) WithTimeout(timeout time.Duration) *FindConfigPrometheusAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) WithContext(ctx context.Context) *FindConfigPrometheusAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) WithHTTPClient(client *http.Client) *FindConfigPrometheusAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config prometheus address params +func (o *FindConfigPrometheusAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPrometheusAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_responses.go new file mode 100644 index 00000000000..a1d5e9be3a7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPrometheusAddressReader is a Reader for the FindConfigPrometheusAddress structure. +type FindConfigPrometheusAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPrometheusAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPrometheusAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPrometheusAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPrometheusAddressOK creates a FindConfigPrometheusAddressOK with default headers values +func NewFindConfigPrometheusAddressOK() *FindConfigPrometheusAddressOK { + return &FindConfigPrometheusAddressOK{} +} + +/*FindConfigPrometheusAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigPrometheusAddressOK struct { + Payload string +} + +func (o *FindConfigPrometheusAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigPrometheusAddressOK) 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 +} + +// NewFindConfigPrometheusAddressDefault creates a FindConfigPrometheusAddressDefault with default headers values +func NewFindConfigPrometheusAddressDefault(code int) *FindConfigPrometheusAddressDefault { + return &FindConfigPrometheusAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigPrometheusAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPrometheusAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config prometheus address default response +func (o *FindConfigPrometheusAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPrometheusAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPrometheusAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPrometheusAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_parameters.go new file mode 100644 index 00000000000..a94f75553c7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPrometheusPortParams creates a new FindConfigPrometheusPortParams object +// with the default values initialized. +func NewFindConfigPrometheusPortParams() *FindConfigPrometheusPortParams { + + return &FindConfigPrometheusPortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPrometheusPortParamsWithTimeout creates a new FindConfigPrometheusPortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPrometheusPortParamsWithTimeout(timeout time.Duration) *FindConfigPrometheusPortParams { + + return &FindConfigPrometheusPortParams{ + + timeout: timeout, + } +} + +// NewFindConfigPrometheusPortParamsWithContext creates a new FindConfigPrometheusPortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPrometheusPortParamsWithContext(ctx context.Context) *FindConfigPrometheusPortParams { + + return &FindConfigPrometheusPortParams{ + + Context: ctx, + } +} + +// NewFindConfigPrometheusPortParamsWithHTTPClient creates a new FindConfigPrometheusPortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPrometheusPortParamsWithHTTPClient(client *http.Client) *FindConfigPrometheusPortParams { + + return &FindConfigPrometheusPortParams{ + HTTPClient: client, + } +} + +/*FindConfigPrometheusPortParams contains all the parameters to send to the API endpoint +for the find config prometheus port operation typically these are written to a http.Request +*/ +type FindConfigPrometheusPortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) WithTimeout(timeout time.Duration) *FindConfigPrometheusPortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) WithContext(ctx context.Context) *FindConfigPrometheusPortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) WithHTTPClient(client *http.Client) *FindConfigPrometheusPortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config prometheus port params +func (o *FindConfigPrometheusPortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPrometheusPortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_responses.go new file mode 100644 index 00000000000..fa9277ad809 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPrometheusPortReader is a Reader for the FindConfigPrometheusPort structure. +type FindConfigPrometheusPortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPrometheusPortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPrometheusPortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPrometheusPortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPrometheusPortOK creates a FindConfigPrometheusPortOK with default headers values +func NewFindConfigPrometheusPortOK() *FindConfigPrometheusPortOK { + return &FindConfigPrometheusPortOK{} +} + +/*FindConfigPrometheusPortOK handles this case with default header values. + +Config value +*/ +type FindConfigPrometheusPortOK struct { + Payload int64 +} + +func (o *FindConfigPrometheusPortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigPrometheusPortOK) 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 +} + +// NewFindConfigPrometheusPortDefault creates a FindConfigPrometheusPortDefault with default headers values +func NewFindConfigPrometheusPortDefault(code int) *FindConfigPrometheusPortDefault { + return &FindConfigPrometheusPortDefault{ + _statusCode: code, + } +} + +/*FindConfigPrometheusPortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPrometheusPortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config prometheus port default response +func (o *FindConfigPrometheusPortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPrometheusPortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPrometheusPortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPrometheusPortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_parameters.go new file mode 100644 index 00000000000..464df6ba1b5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigPrometheusPrefixParams creates a new FindConfigPrometheusPrefixParams object +// with the default values initialized. +func NewFindConfigPrometheusPrefixParams() *FindConfigPrometheusPrefixParams { + + return &FindConfigPrometheusPrefixParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigPrometheusPrefixParamsWithTimeout creates a new FindConfigPrometheusPrefixParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigPrometheusPrefixParamsWithTimeout(timeout time.Duration) *FindConfigPrometheusPrefixParams { + + return &FindConfigPrometheusPrefixParams{ + + timeout: timeout, + } +} + +// NewFindConfigPrometheusPrefixParamsWithContext creates a new FindConfigPrometheusPrefixParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigPrometheusPrefixParamsWithContext(ctx context.Context) *FindConfigPrometheusPrefixParams { + + return &FindConfigPrometheusPrefixParams{ + + Context: ctx, + } +} + +// NewFindConfigPrometheusPrefixParamsWithHTTPClient creates a new FindConfigPrometheusPrefixParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigPrometheusPrefixParamsWithHTTPClient(client *http.Client) *FindConfigPrometheusPrefixParams { + + return &FindConfigPrometheusPrefixParams{ + HTTPClient: client, + } +} + +/*FindConfigPrometheusPrefixParams contains all the parameters to send to the API endpoint +for the find config prometheus prefix operation typically these are written to a http.Request +*/ +type FindConfigPrometheusPrefixParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) WithTimeout(timeout time.Duration) *FindConfigPrometheusPrefixParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) WithContext(ctx context.Context) *FindConfigPrometheusPrefixParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) WithHTTPClient(client *http.Client) *FindConfigPrometheusPrefixParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config prometheus prefix params +func (o *FindConfigPrometheusPrefixParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigPrometheusPrefixParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_responses.go new file mode 100644 index 00000000000..0d59eaaf267 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_prometheus_prefix_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigPrometheusPrefixReader is a Reader for the FindConfigPrometheusPrefix structure. +type FindConfigPrometheusPrefixReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigPrometheusPrefixReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigPrometheusPrefixOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigPrometheusPrefixDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigPrometheusPrefixOK creates a FindConfigPrometheusPrefixOK with default headers values +func NewFindConfigPrometheusPrefixOK() *FindConfigPrometheusPrefixOK { + return &FindConfigPrometheusPrefixOK{} +} + +/*FindConfigPrometheusPrefixOK handles this case with default header values. + +Config value +*/ +type FindConfigPrometheusPrefixOK struct { + Payload string +} + +func (o *FindConfigPrometheusPrefixOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigPrometheusPrefixOK) 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 +} + +// NewFindConfigPrometheusPrefixDefault creates a FindConfigPrometheusPrefixDefault with default headers values +func NewFindConfigPrometheusPrefixDefault(code int) *FindConfigPrometheusPrefixDefault { + return &FindConfigPrometheusPrefixDefault{ + _statusCode: code, + } +} + +/*FindConfigPrometheusPrefixDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigPrometheusPrefixDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config prometheus prefix default response +func (o *FindConfigPrometheusPrefixDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigPrometheusPrefixDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigPrometheusPrefixDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigPrometheusPrefixDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..e16636aea3b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRangeRequestTimeoutInMsParams creates a new FindConfigRangeRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigRangeRequestTimeoutInMsParams() *FindConfigRangeRequestTimeoutInMsParams { + + return &FindConfigRangeRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRangeRequestTimeoutInMsParamsWithTimeout creates a new FindConfigRangeRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRangeRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigRangeRequestTimeoutInMsParams { + + return &FindConfigRangeRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRangeRequestTimeoutInMsParamsWithContext creates a new FindConfigRangeRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRangeRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigRangeRequestTimeoutInMsParams { + + return &FindConfigRangeRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigRangeRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigRangeRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRangeRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigRangeRequestTimeoutInMsParams { + + return &FindConfigRangeRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigRangeRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config range request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigRangeRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigRangeRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigRangeRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigRangeRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config range request timeout in ms params +func (o *FindConfigRangeRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRangeRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..1aef3a522c9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_range_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRangeRequestTimeoutInMsReader is a Reader for the FindConfigRangeRequestTimeoutInMs structure. +type FindConfigRangeRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRangeRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRangeRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRangeRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRangeRequestTimeoutInMsOK creates a FindConfigRangeRequestTimeoutInMsOK with default headers values +func NewFindConfigRangeRequestTimeoutInMsOK() *FindConfigRangeRequestTimeoutInMsOK { + return &FindConfigRangeRequestTimeoutInMsOK{} +} + +/*FindConfigRangeRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigRangeRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigRangeRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRangeRequestTimeoutInMsOK) 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 +} + +// NewFindConfigRangeRequestTimeoutInMsDefault creates a FindConfigRangeRequestTimeoutInMsDefault with default headers values +func NewFindConfigRangeRequestTimeoutInMsDefault(code int) *FindConfigRangeRequestTimeoutInMsDefault { + return &FindConfigRangeRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigRangeRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRangeRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config range request timeout in ms default response +func (o *FindConfigRangeRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRangeRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRangeRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRangeRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..893dcaad1a4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReadRequestTimeoutInMsParams creates a new FindConfigReadRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigReadRequestTimeoutInMsParams() *FindConfigReadRequestTimeoutInMsParams { + + return &FindConfigReadRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReadRequestTimeoutInMsParamsWithTimeout creates a new FindConfigReadRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReadRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigReadRequestTimeoutInMsParams { + + return &FindConfigReadRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigReadRequestTimeoutInMsParamsWithContext creates a new FindConfigReadRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReadRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigReadRequestTimeoutInMsParams { + + return &FindConfigReadRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigReadRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigReadRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReadRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigReadRequestTimeoutInMsParams { + + return &FindConfigReadRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigReadRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config read request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigReadRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigReadRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigReadRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigReadRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config read request timeout in ms params +func (o *FindConfigReadRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReadRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..01215874773 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_read_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReadRequestTimeoutInMsReader is a Reader for the FindConfigReadRequestTimeoutInMs structure. +type FindConfigReadRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReadRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReadRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReadRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReadRequestTimeoutInMsOK creates a FindConfigReadRequestTimeoutInMsOK with default headers values +func NewFindConfigReadRequestTimeoutInMsOK() *FindConfigReadRequestTimeoutInMsOK { + return &FindConfigReadRequestTimeoutInMsOK{} +} + +/*FindConfigReadRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigReadRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigReadRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigReadRequestTimeoutInMsOK) 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 +} + +// NewFindConfigReadRequestTimeoutInMsDefault creates a FindConfigReadRequestTimeoutInMsDefault with default headers values +func NewFindConfigReadRequestTimeoutInMsDefault(code int) *FindConfigReadRequestTimeoutInMsDefault { + return &FindConfigReadRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigReadRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReadRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config read request timeout in ms default response +func (o *FindConfigReadRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReadRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReadRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReadRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_parameters.go new file mode 100644 index 00000000000..d05d6702b96 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReduceCacheCapacityToParams creates a new FindConfigReduceCacheCapacityToParams object +// with the default values initialized. +func NewFindConfigReduceCacheCapacityToParams() *FindConfigReduceCacheCapacityToParams { + + return &FindConfigReduceCacheCapacityToParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReduceCacheCapacityToParamsWithTimeout creates a new FindConfigReduceCacheCapacityToParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReduceCacheCapacityToParamsWithTimeout(timeout time.Duration) *FindConfigReduceCacheCapacityToParams { + + return &FindConfigReduceCacheCapacityToParams{ + + timeout: timeout, + } +} + +// NewFindConfigReduceCacheCapacityToParamsWithContext creates a new FindConfigReduceCacheCapacityToParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReduceCacheCapacityToParamsWithContext(ctx context.Context) *FindConfigReduceCacheCapacityToParams { + + return &FindConfigReduceCacheCapacityToParams{ + + Context: ctx, + } +} + +// NewFindConfigReduceCacheCapacityToParamsWithHTTPClient creates a new FindConfigReduceCacheCapacityToParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReduceCacheCapacityToParamsWithHTTPClient(client *http.Client) *FindConfigReduceCacheCapacityToParams { + + return &FindConfigReduceCacheCapacityToParams{ + HTTPClient: client, + } +} + +/*FindConfigReduceCacheCapacityToParams contains all the parameters to send to the API endpoint +for the find config reduce cache capacity to operation typically these are written to a http.Request +*/ +type FindConfigReduceCacheCapacityToParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) WithTimeout(timeout time.Duration) *FindConfigReduceCacheCapacityToParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) WithContext(ctx context.Context) *FindConfigReduceCacheCapacityToParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) WithHTTPClient(client *http.Client) *FindConfigReduceCacheCapacityToParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config reduce cache capacity to params +func (o *FindConfigReduceCacheCapacityToParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReduceCacheCapacityToParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_responses.go new file mode 100644 index 00000000000..692ff89d90d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_capacity_to_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReduceCacheCapacityToReader is a Reader for the FindConfigReduceCacheCapacityTo structure. +type FindConfigReduceCacheCapacityToReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReduceCacheCapacityToReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReduceCacheCapacityToOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReduceCacheCapacityToDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReduceCacheCapacityToOK creates a FindConfigReduceCacheCapacityToOK with default headers values +func NewFindConfigReduceCacheCapacityToOK() *FindConfigReduceCacheCapacityToOK { + return &FindConfigReduceCacheCapacityToOK{} +} + +/*FindConfigReduceCacheCapacityToOK handles this case with default header values. + +Config value +*/ +type FindConfigReduceCacheCapacityToOK struct { + Payload float64 +} + +func (o *FindConfigReduceCacheCapacityToOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigReduceCacheCapacityToOK) 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 +} + +// NewFindConfigReduceCacheCapacityToDefault creates a FindConfigReduceCacheCapacityToDefault with default headers values +func NewFindConfigReduceCacheCapacityToDefault(code int) *FindConfigReduceCacheCapacityToDefault { + return &FindConfigReduceCacheCapacityToDefault{ + _statusCode: code, + } +} + +/*FindConfigReduceCacheCapacityToDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReduceCacheCapacityToDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config reduce cache capacity to default response +func (o *FindConfigReduceCacheCapacityToDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReduceCacheCapacityToDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReduceCacheCapacityToDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReduceCacheCapacityToDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_parameters.go new file mode 100644 index 00000000000..a3a4b7bd168 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReduceCacheSizesAtParams creates a new FindConfigReduceCacheSizesAtParams object +// with the default values initialized. +func NewFindConfigReduceCacheSizesAtParams() *FindConfigReduceCacheSizesAtParams { + + return &FindConfigReduceCacheSizesAtParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReduceCacheSizesAtParamsWithTimeout creates a new FindConfigReduceCacheSizesAtParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReduceCacheSizesAtParamsWithTimeout(timeout time.Duration) *FindConfigReduceCacheSizesAtParams { + + return &FindConfigReduceCacheSizesAtParams{ + + timeout: timeout, + } +} + +// NewFindConfigReduceCacheSizesAtParamsWithContext creates a new FindConfigReduceCacheSizesAtParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReduceCacheSizesAtParamsWithContext(ctx context.Context) *FindConfigReduceCacheSizesAtParams { + + return &FindConfigReduceCacheSizesAtParams{ + + Context: ctx, + } +} + +// NewFindConfigReduceCacheSizesAtParamsWithHTTPClient creates a new FindConfigReduceCacheSizesAtParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReduceCacheSizesAtParamsWithHTTPClient(client *http.Client) *FindConfigReduceCacheSizesAtParams { + + return &FindConfigReduceCacheSizesAtParams{ + HTTPClient: client, + } +} + +/*FindConfigReduceCacheSizesAtParams contains all the parameters to send to the API endpoint +for the find config reduce cache sizes at operation typically these are written to a http.Request +*/ +type FindConfigReduceCacheSizesAtParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) WithTimeout(timeout time.Duration) *FindConfigReduceCacheSizesAtParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) WithContext(ctx context.Context) *FindConfigReduceCacheSizesAtParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) WithHTTPClient(client *http.Client) *FindConfigReduceCacheSizesAtParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config reduce cache sizes at params +func (o *FindConfigReduceCacheSizesAtParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReduceCacheSizesAtParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_responses.go new file mode 100644 index 00000000000..ac76c8317c2 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_reduce_cache_sizes_at_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReduceCacheSizesAtReader is a Reader for the FindConfigReduceCacheSizesAt structure. +type FindConfigReduceCacheSizesAtReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReduceCacheSizesAtReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReduceCacheSizesAtOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReduceCacheSizesAtDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReduceCacheSizesAtOK creates a FindConfigReduceCacheSizesAtOK with default headers values +func NewFindConfigReduceCacheSizesAtOK() *FindConfigReduceCacheSizesAtOK { + return &FindConfigReduceCacheSizesAtOK{} +} + +/*FindConfigReduceCacheSizesAtOK handles this case with default header values. + +Config value +*/ +type FindConfigReduceCacheSizesAtOK struct { + Payload float64 +} + +func (o *FindConfigReduceCacheSizesAtOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigReduceCacheSizesAtOK) 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 +} + +// NewFindConfigReduceCacheSizesAtDefault creates a FindConfigReduceCacheSizesAtDefault with default headers values +func NewFindConfigReduceCacheSizesAtDefault(code int) *FindConfigReduceCacheSizesAtDefault { + return &FindConfigReduceCacheSizesAtDefault{ + _statusCode: code, + } +} + +/*FindConfigReduceCacheSizesAtDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReduceCacheSizesAtDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config reduce cache sizes at default response +func (o *FindConfigReduceCacheSizesAtDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReduceCacheSizesAtDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReduceCacheSizesAtDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReduceCacheSizesAtDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_parameters.go new file mode 100644 index 00000000000..1e963acce9a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReplaceAddressFirstBootParams creates a new FindConfigReplaceAddressFirstBootParams object +// with the default values initialized. +func NewFindConfigReplaceAddressFirstBootParams() *FindConfigReplaceAddressFirstBootParams { + + return &FindConfigReplaceAddressFirstBootParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReplaceAddressFirstBootParamsWithTimeout creates a new FindConfigReplaceAddressFirstBootParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReplaceAddressFirstBootParamsWithTimeout(timeout time.Duration) *FindConfigReplaceAddressFirstBootParams { + + return &FindConfigReplaceAddressFirstBootParams{ + + timeout: timeout, + } +} + +// NewFindConfigReplaceAddressFirstBootParamsWithContext creates a new FindConfigReplaceAddressFirstBootParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReplaceAddressFirstBootParamsWithContext(ctx context.Context) *FindConfigReplaceAddressFirstBootParams { + + return &FindConfigReplaceAddressFirstBootParams{ + + Context: ctx, + } +} + +// NewFindConfigReplaceAddressFirstBootParamsWithHTTPClient creates a new FindConfigReplaceAddressFirstBootParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReplaceAddressFirstBootParamsWithHTTPClient(client *http.Client) *FindConfigReplaceAddressFirstBootParams { + + return &FindConfigReplaceAddressFirstBootParams{ + HTTPClient: client, + } +} + +/*FindConfigReplaceAddressFirstBootParams contains all the parameters to send to the API endpoint +for the find config replace address first boot operation typically these are written to a http.Request +*/ +type FindConfigReplaceAddressFirstBootParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) WithTimeout(timeout time.Duration) *FindConfigReplaceAddressFirstBootParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) WithContext(ctx context.Context) *FindConfigReplaceAddressFirstBootParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) WithHTTPClient(client *http.Client) *FindConfigReplaceAddressFirstBootParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config replace address first boot params +func (o *FindConfigReplaceAddressFirstBootParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReplaceAddressFirstBootParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_responses.go new file mode 100644 index 00000000000..48c7c50970b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_first_boot_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReplaceAddressFirstBootReader is a Reader for the FindConfigReplaceAddressFirstBoot structure. +type FindConfigReplaceAddressFirstBootReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReplaceAddressFirstBootReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReplaceAddressFirstBootOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReplaceAddressFirstBootDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReplaceAddressFirstBootOK creates a FindConfigReplaceAddressFirstBootOK with default headers values +func NewFindConfigReplaceAddressFirstBootOK() *FindConfigReplaceAddressFirstBootOK { + return &FindConfigReplaceAddressFirstBootOK{} +} + +/*FindConfigReplaceAddressFirstBootOK handles this case with default header values. + +Config value +*/ +type FindConfigReplaceAddressFirstBootOK struct { + Payload string +} + +func (o *FindConfigReplaceAddressFirstBootOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigReplaceAddressFirstBootOK) 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 +} + +// NewFindConfigReplaceAddressFirstBootDefault creates a FindConfigReplaceAddressFirstBootDefault with default headers values +func NewFindConfigReplaceAddressFirstBootDefault(code int) *FindConfigReplaceAddressFirstBootDefault { + return &FindConfigReplaceAddressFirstBootDefault{ + _statusCode: code, + } +} + +/*FindConfigReplaceAddressFirstBootDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReplaceAddressFirstBootDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config replace address first boot default response +func (o *FindConfigReplaceAddressFirstBootDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReplaceAddressFirstBootDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReplaceAddressFirstBootDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReplaceAddressFirstBootDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_parameters.go new file mode 100644 index 00000000000..9957613a19e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReplaceAddressParams creates a new FindConfigReplaceAddressParams object +// with the default values initialized. +func NewFindConfigReplaceAddressParams() *FindConfigReplaceAddressParams { + + return &FindConfigReplaceAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReplaceAddressParamsWithTimeout creates a new FindConfigReplaceAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReplaceAddressParamsWithTimeout(timeout time.Duration) *FindConfigReplaceAddressParams { + + return &FindConfigReplaceAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigReplaceAddressParamsWithContext creates a new FindConfigReplaceAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReplaceAddressParamsWithContext(ctx context.Context) *FindConfigReplaceAddressParams { + + return &FindConfigReplaceAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigReplaceAddressParamsWithHTTPClient creates a new FindConfigReplaceAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReplaceAddressParamsWithHTTPClient(client *http.Client) *FindConfigReplaceAddressParams { + + return &FindConfigReplaceAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigReplaceAddressParams contains all the parameters to send to the API endpoint +for the find config replace address operation typically these are written to a http.Request +*/ +type FindConfigReplaceAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config replace address params +func (o *FindConfigReplaceAddressParams) WithTimeout(timeout time.Duration) *FindConfigReplaceAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config replace address params +func (o *FindConfigReplaceAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config replace address params +func (o *FindConfigReplaceAddressParams) WithContext(ctx context.Context) *FindConfigReplaceAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config replace address params +func (o *FindConfigReplaceAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config replace address params +func (o *FindConfigReplaceAddressParams) WithHTTPClient(client *http.Client) *FindConfigReplaceAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config replace address params +func (o *FindConfigReplaceAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReplaceAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_responses.go new file mode 100644 index 00000000000..4e764a4335f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReplaceAddressReader is a Reader for the FindConfigReplaceAddress structure. +type FindConfigReplaceAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReplaceAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReplaceAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReplaceAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReplaceAddressOK creates a FindConfigReplaceAddressOK with default headers values +func NewFindConfigReplaceAddressOK() *FindConfigReplaceAddressOK { + return &FindConfigReplaceAddressOK{} +} + +/*FindConfigReplaceAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigReplaceAddressOK struct { + Payload string +} + +func (o *FindConfigReplaceAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigReplaceAddressOK) 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 +} + +// NewFindConfigReplaceAddressDefault creates a FindConfigReplaceAddressDefault with default headers values +func NewFindConfigReplaceAddressDefault(code int) *FindConfigReplaceAddressDefault { + return &FindConfigReplaceAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigReplaceAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReplaceAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config replace address default response +func (o *FindConfigReplaceAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReplaceAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReplaceAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReplaceAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_parameters.go new file mode 100644 index 00000000000..d54cf5e0760 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReplaceNodeParams creates a new FindConfigReplaceNodeParams object +// with the default values initialized. +func NewFindConfigReplaceNodeParams() *FindConfigReplaceNodeParams { + + return &FindConfigReplaceNodeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReplaceNodeParamsWithTimeout creates a new FindConfigReplaceNodeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReplaceNodeParamsWithTimeout(timeout time.Duration) *FindConfigReplaceNodeParams { + + return &FindConfigReplaceNodeParams{ + + timeout: timeout, + } +} + +// NewFindConfigReplaceNodeParamsWithContext creates a new FindConfigReplaceNodeParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReplaceNodeParamsWithContext(ctx context.Context) *FindConfigReplaceNodeParams { + + return &FindConfigReplaceNodeParams{ + + Context: ctx, + } +} + +// NewFindConfigReplaceNodeParamsWithHTTPClient creates a new FindConfigReplaceNodeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReplaceNodeParamsWithHTTPClient(client *http.Client) *FindConfigReplaceNodeParams { + + return &FindConfigReplaceNodeParams{ + HTTPClient: client, + } +} + +/*FindConfigReplaceNodeParams contains all the parameters to send to the API endpoint +for the find config replace node operation typically these are written to a http.Request +*/ +type FindConfigReplaceNodeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config replace node params +func (o *FindConfigReplaceNodeParams) WithTimeout(timeout time.Duration) *FindConfigReplaceNodeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config replace node params +func (o *FindConfigReplaceNodeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config replace node params +func (o *FindConfigReplaceNodeParams) WithContext(ctx context.Context) *FindConfigReplaceNodeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config replace node params +func (o *FindConfigReplaceNodeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config replace node params +func (o *FindConfigReplaceNodeParams) WithHTTPClient(client *http.Client) *FindConfigReplaceNodeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config replace node params +func (o *FindConfigReplaceNodeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReplaceNodeParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_responses.go new file mode 100644 index 00000000000..0b67a736a0f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_node_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReplaceNodeReader is a Reader for the FindConfigReplaceNode structure. +type FindConfigReplaceNodeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReplaceNodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReplaceNodeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReplaceNodeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReplaceNodeOK creates a FindConfigReplaceNodeOK with default headers values +func NewFindConfigReplaceNodeOK() *FindConfigReplaceNodeOK { + return &FindConfigReplaceNodeOK{} +} + +/*FindConfigReplaceNodeOK handles this case with default header values. + +Config value +*/ +type FindConfigReplaceNodeOK struct { + Payload string +} + +func (o *FindConfigReplaceNodeOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigReplaceNodeOK) 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 +} + +// NewFindConfigReplaceNodeDefault creates a FindConfigReplaceNodeDefault with default headers values +func NewFindConfigReplaceNodeDefault(code int) *FindConfigReplaceNodeDefault { + return &FindConfigReplaceNodeDefault{ + _statusCode: code, + } +} + +/*FindConfigReplaceNodeDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReplaceNodeDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config replace node default response +func (o *FindConfigReplaceNodeDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReplaceNodeDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReplaceNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReplaceNodeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_parameters.go new file mode 100644 index 00000000000..6521a3c7507 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigReplaceTokenParams creates a new FindConfigReplaceTokenParams object +// with the default values initialized. +func NewFindConfigReplaceTokenParams() *FindConfigReplaceTokenParams { + + return &FindConfigReplaceTokenParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigReplaceTokenParamsWithTimeout creates a new FindConfigReplaceTokenParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigReplaceTokenParamsWithTimeout(timeout time.Duration) *FindConfigReplaceTokenParams { + + return &FindConfigReplaceTokenParams{ + + timeout: timeout, + } +} + +// NewFindConfigReplaceTokenParamsWithContext creates a new FindConfigReplaceTokenParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigReplaceTokenParamsWithContext(ctx context.Context) *FindConfigReplaceTokenParams { + + return &FindConfigReplaceTokenParams{ + + Context: ctx, + } +} + +// NewFindConfigReplaceTokenParamsWithHTTPClient creates a new FindConfigReplaceTokenParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigReplaceTokenParamsWithHTTPClient(client *http.Client) *FindConfigReplaceTokenParams { + + return &FindConfigReplaceTokenParams{ + HTTPClient: client, + } +} + +/*FindConfigReplaceTokenParams contains all the parameters to send to the API endpoint +for the find config replace token operation typically these are written to a http.Request +*/ +type FindConfigReplaceTokenParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config replace token params +func (o *FindConfigReplaceTokenParams) WithTimeout(timeout time.Duration) *FindConfigReplaceTokenParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config replace token params +func (o *FindConfigReplaceTokenParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config replace token params +func (o *FindConfigReplaceTokenParams) WithContext(ctx context.Context) *FindConfigReplaceTokenParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config replace token params +func (o *FindConfigReplaceTokenParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config replace token params +func (o *FindConfigReplaceTokenParams) WithHTTPClient(client *http.Client) *FindConfigReplaceTokenParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config replace token params +func (o *FindConfigReplaceTokenParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigReplaceTokenParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_responses.go new file mode 100644 index 00000000000..238226329fd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_replace_token_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigReplaceTokenReader is a Reader for the FindConfigReplaceToken structure. +type FindConfigReplaceTokenReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigReplaceTokenReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigReplaceTokenOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigReplaceTokenDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigReplaceTokenOK creates a FindConfigReplaceTokenOK with default headers values +func NewFindConfigReplaceTokenOK() *FindConfigReplaceTokenOK { + return &FindConfigReplaceTokenOK{} +} + +/*FindConfigReplaceTokenOK handles this case with default header values. + +Config value +*/ +type FindConfigReplaceTokenOK struct { + Payload string +} + +func (o *FindConfigReplaceTokenOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigReplaceTokenOK) 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 +} + +// NewFindConfigReplaceTokenDefault creates a FindConfigReplaceTokenDefault with default headers values +func NewFindConfigReplaceTokenDefault(code int) *FindConfigReplaceTokenDefault { + return &FindConfigReplaceTokenDefault{ + _statusCode: code, + } +} + +/*FindConfigReplaceTokenDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigReplaceTokenDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config replace token default response +func (o *FindConfigReplaceTokenDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigReplaceTokenDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigReplaceTokenDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigReplaceTokenDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_parameters.go new file mode 100644 index 00000000000..dae6c5464bd --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRequestSchedulerIDParams creates a new FindConfigRequestSchedulerIDParams object +// with the default values initialized. +func NewFindConfigRequestSchedulerIDParams() *FindConfigRequestSchedulerIDParams { + + return &FindConfigRequestSchedulerIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRequestSchedulerIDParamsWithTimeout creates a new FindConfigRequestSchedulerIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRequestSchedulerIDParamsWithTimeout(timeout time.Duration) *FindConfigRequestSchedulerIDParams { + + return &FindConfigRequestSchedulerIDParams{ + + timeout: timeout, + } +} + +// NewFindConfigRequestSchedulerIDParamsWithContext creates a new FindConfigRequestSchedulerIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRequestSchedulerIDParamsWithContext(ctx context.Context) *FindConfigRequestSchedulerIDParams { + + return &FindConfigRequestSchedulerIDParams{ + + Context: ctx, + } +} + +// NewFindConfigRequestSchedulerIDParamsWithHTTPClient creates a new FindConfigRequestSchedulerIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRequestSchedulerIDParamsWithHTTPClient(client *http.Client) *FindConfigRequestSchedulerIDParams { + + return &FindConfigRequestSchedulerIDParams{ + HTTPClient: client, + } +} + +/*FindConfigRequestSchedulerIDParams contains all the parameters to send to the API endpoint +for the find config request scheduler id operation typically these are written to a http.Request +*/ +type FindConfigRequestSchedulerIDParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) WithTimeout(timeout time.Duration) *FindConfigRequestSchedulerIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) WithContext(ctx context.Context) *FindConfigRequestSchedulerIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) WithHTTPClient(client *http.Client) *FindConfigRequestSchedulerIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config request scheduler id params +func (o *FindConfigRequestSchedulerIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRequestSchedulerIDParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_responses.go new file mode 100644 index 00000000000..6b630e82e8a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_id_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRequestSchedulerIDReader is a Reader for the FindConfigRequestSchedulerID structure. +type FindConfigRequestSchedulerIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRequestSchedulerIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRequestSchedulerIDOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRequestSchedulerIDDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRequestSchedulerIDOK creates a FindConfigRequestSchedulerIDOK with default headers values +func NewFindConfigRequestSchedulerIDOK() *FindConfigRequestSchedulerIDOK { + return &FindConfigRequestSchedulerIDOK{} +} + +/*FindConfigRequestSchedulerIDOK handles this case with default header values. + +Config value +*/ +type FindConfigRequestSchedulerIDOK struct { + Payload string +} + +func (o *FindConfigRequestSchedulerIDOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRequestSchedulerIDOK) 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 +} + +// NewFindConfigRequestSchedulerIDDefault creates a FindConfigRequestSchedulerIDDefault with default headers values +func NewFindConfigRequestSchedulerIDDefault(code int) *FindConfigRequestSchedulerIDDefault { + return &FindConfigRequestSchedulerIDDefault{ + _statusCode: code, + } +} + +/*FindConfigRequestSchedulerIDDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRequestSchedulerIDDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config request scheduler id default response +func (o *FindConfigRequestSchedulerIDDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRequestSchedulerIDDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRequestSchedulerIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRequestSchedulerIDDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_parameters.go new file mode 100644 index 00000000000..70302ce26f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRequestSchedulerOptionsParams creates a new FindConfigRequestSchedulerOptionsParams object +// with the default values initialized. +func NewFindConfigRequestSchedulerOptionsParams() *FindConfigRequestSchedulerOptionsParams { + + return &FindConfigRequestSchedulerOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRequestSchedulerOptionsParamsWithTimeout creates a new FindConfigRequestSchedulerOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRequestSchedulerOptionsParamsWithTimeout(timeout time.Duration) *FindConfigRequestSchedulerOptionsParams { + + return &FindConfigRequestSchedulerOptionsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRequestSchedulerOptionsParamsWithContext creates a new FindConfigRequestSchedulerOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRequestSchedulerOptionsParamsWithContext(ctx context.Context) *FindConfigRequestSchedulerOptionsParams { + + return &FindConfigRequestSchedulerOptionsParams{ + + Context: ctx, + } +} + +// NewFindConfigRequestSchedulerOptionsParamsWithHTTPClient creates a new FindConfigRequestSchedulerOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRequestSchedulerOptionsParamsWithHTTPClient(client *http.Client) *FindConfigRequestSchedulerOptionsParams { + + return &FindConfigRequestSchedulerOptionsParams{ + HTTPClient: client, + } +} + +/*FindConfigRequestSchedulerOptionsParams contains all the parameters to send to the API endpoint +for the find config request scheduler options operation typically these are written to a http.Request +*/ +type FindConfigRequestSchedulerOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) WithTimeout(timeout time.Duration) *FindConfigRequestSchedulerOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) WithContext(ctx context.Context) *FindConfigRequestSchedulerOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) WithHTTPClient(client *http.Client) *FindConfigRequestSchedulerOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config request scheduler options params +func (o *FindConfigRequestSchedulerOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRequestSchedulerOptionsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_responses.go new file mode 100644 index 00000000000..04e81ab9d5b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_options_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRequestSchedulerOptionsReader is a Reader for the FindConfigRequestSchedulerOptions structure. +type FindConfigRequestSchedulerOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRequestSchedulerOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRequestSchedulerOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRequestSchedulerOptionsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRequestSchedulerOptionsOK creates a FindConfigRequestSchedulerOptionsOK with default headers values +func NewFindConfigRequestSchedulerOptionsOK() *FindConfigRequestSchedulerOptionsOK { + return &FindConfigRequestSchedulerOptionsOK{} +} + +/*FindConfigRequestSchedulerOptionsOK handles this case with default header values. + +Config value +*/ +type FindConfigRequestSchedulerOptionsOK struct { + Payload []string +} + +func (o *FindConfigRequestSchedulerOptionsOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigRequestSchedulerOptionsOK) 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 +} + +// NewFindConfigRequestSchedulerOptionsDefault creates a FindConfigRequestSchedulerOptionsDefault with default headers values +func NewFindConfigRequestSchedulerOptionsDefault(code int) *FindConfigRequestSchedulerOptionsDefault { + return &FindConfigRequestSchedulerOptionsDefault{ + _statusCode: code, + } +} + +/*FindConfigRequestSchedulerOptionsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRequestSchedulerOptionsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config request scheduler options default response +func (o *FindConfigRequestSchedulerOptionsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRequestSchedulerOptionsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRequestSchedulerOptionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRequestSchedulerOptionsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_parameters.go new file mode 100644 index 00000000000..d9a1c96532d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRequestSchedulerParams creates a new FindConfigRequestSchedulerParams object +// with the default values initialized. +func NewFindConfigRequestSchedulerParams() *FindConfigRequestSchedulerParams { + + return &FindConfigRequestSchedulerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRequestSchedulerParamsWithTimeout creates a new FindConfigRequestSchedulerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRequestSchedulerParamsWithTimeout(timeout time.Duration) *FindConfigRequestSchedulerParams { + + return &FindConfigRequestSchedulerParams{ + + timeout: timeout, + } +} + +// NewFindConfigRequestSchedulerParamsWithContext creates a new FindConfigRequestSchedulerParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRequestSchedulerParamsWithContext(ctx context.Context) *FindConfigRequestSchedulerParams { + + return &FindConfigRequestSchedulerParams{ + + Context: ctx, + } +} + +// NewFindConfigRequestSchedulerParamsWithHTTPClient creates a new FindConfigRequestSchedulerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRequestSchedulerParamsWithHTTPClient(client *http.Client) *FindConfigRequestSchedulerParams { + + return &FindConfigRequestSchedulerParams{ + HTTPClient: client, + } +} + +/*FindConfigRequestSchedulerParams contains all the parameters to send to the API endpoint +for the find config request scheduler operation typically these are written to a http.Request +*/ +type FindConfigRequestSchedulerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) WithTimeout(timeout time.Duration) *FindConfigRequestSchedulerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) WithContext(ctx context.Context) *FindConfigRequestSchedulerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) WithHTTPClient(client *http.Client) *FindConfigRequestSchedulerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config request scheduler params +func (o *FindConfigRequestSchedulerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRequestSchedulerParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_responses.go new file mode 100644 index 00000000000..f388196622e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_scheduler_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRequestSchedulerReader is a Reader for the FindConfigRequestScheduler structure. +type FindConfigRequestSchedulerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRequestSchedulerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRequestSchedulerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRequestSchedulerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRequestSchedulerOK creates a FindConfigRequestSchedulerOK with default headers values +func NewFindConfigRequestSchedulerOK() *FindConfigRequestSchedulerOK { + return &FindConfigRequestSchedulerOK{} +} + +/*FindConfigRequestSchedulerOK handles this case with default header values. + +Config value +*/ +type FindConfigRequestSchedulerOK struct { + Payload string +} + +func (o *FindConfigRequestSchedulerOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRequestSchedulerOK) 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 +} + +// NewFindConfigRequestSchedulerDefault creates a FindConfigRequestSchedulerDefault with default headers values +func NewFindConfigRequestSchedulerDefault(code int) *FindConfigRequestSchedulerDefault { + return &FindConfigRequestSchedulerDefault{ + _statusCode: code, + } +} + +/*FindConfigRequestSchedulerDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRequestSchedulerDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config request scheduler default response +func (o *FindConfigRequestSchedulerDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRequestSchedulerDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRequestSchedulerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRequestSchedulerDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..7d7f7333162 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRequestTimeoutInMsParams creates a new FindConfigRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigRequestTimeoutInMsParams() *FindConfigRequestTimeoutInMsParams { + + return &FindConfigRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRequestTimeoutInMsParamsWithTimeout creates a new FindConfigRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigRequestTimeoutInMsParams { + + return &FindConfigRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRequestTimeoutInMsParamsWithContext creates a new FindConfigRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigRequestTimeoutInMsParams { + + return &FindConfigRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigRequestTimeoutInMsParams { + + return &FindConfigRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config request timeout in ms params +func (o *FindConfigRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..9b67202fb53 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRequestTimeoutInMsReader is a Reader for the FindConfigRequestTimeoutInMs structure. +type FindConfigRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRequestTimeoutInMsOK creates a FindConfigRequestTimeoutInMsOK with default headers values +func NewFindConfigRequestTimeoutInMsOK() *FindConfigRequestTimeoutInMsOK { + return &FindConfigRequestTimeoutInMsOK{} +} + +/*FindConfigRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRequestTimeoutInMsOK) 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 +} + +// NewFindConfigRequestTimeoutInMsDefault creates a FindConfigRequestTimeoutInMsDefault with default headers values +func NewFindConfigRequestTimeoutInMsDefault(code int) *FindConfigRequestTimeoutInMsDefault { + return &FindConfigRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config request timeout in ms default response +func (o *FindConfigRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_parameters.go new file mode 100644 index 00000000000..2d13412b2d6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRingDelayMsParams creates a new FindConfigRingDelayMsParams object +// with the default values initialized. +func NewFindConfigRingDelayMsParams() *FindConfigRingDelayMsParams { + + return &FindConfigRingDelayMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRingDelayMsParamsWithTimeout creates a new FindConfigRingDelayMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRingDelayMsParamsWithTimeout(timeout time.Duration) *FindConfigRingDelayMsParams { + + return &FindConfigRingDelayMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRingDelayMsParamsWithContext creates a new FindConfigRingDelayMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRingDelayMsParamsWithContext(ctx context.Context) *FindConfigRingDelayMsParams { + + return &FindConfigRingDelayMsParams{ + + Context: ctx, + } +} + +// NewFindConfigRingDelayMsParamsWithHTTPClient creates a new FindConfigRingDelayMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRingDelayMsParamsWithHTTPClient(client *http.Client) *FindConfigRingDelayMsParams { + + return &FindConfigRingDelayMsParams{ + HTTPClient: client, + } +} + +/*FindConfigRingDelayMsParams contains all the parameters to send to the API endpoint +for the find config ring delay ms operation typically these are written to a http.Request +*/ +type FindConfigRingDelayMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) WithTimeout(timeout time.Duration) *FindConfigRingDelayMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) WithContext(ctx context.Context) *FindConfigRingDelayMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) WithHTTPClient(client *http.Client) *FindConfigRingDelayMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config ring delay ms params +func (o *FindConfigRingDelayMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRingDelayMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_responses.go new file mode 100644 index 00000000000..d10a432529e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ring_delay_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRingDelayMsReader is a Reader for the FindConfigRingDelayMs structure. +type FindConfigRingDelayMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRingDelayMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRingDelayMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRingDelayMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRingDelayMsOK creates a FindConfigRingDelayMsOK with default headers values +func NewFindConfigRingDelayMsOK() *FindConfigRingDelayMsOK { + return &FindConfigRingDelayMsOK{} +} + +/*FindConfigRingDelayMsOK handles this case with default header values. + +Config value +*/ +type FindConfigRingDelayMsOK struct { + Payload int64 +} + +func (o *FindConfigRingDelayMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRingDelayMsOK) 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 +} + +// NewFindConfigRingDelayMsDefault creates a FindConfigRingDelayMsDefault with default headers values +func NewFindConfigRingDelayMsDefault(code int) *FindConfigRingDelayMsDefault { + return &FindConfigRingDelayMsDefault{ + _statusCode: code, + } +} + +/*FindConfigRingDelayMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRingDelayMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config ring delay ms default response +func (o *FindConfigRingDelayMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRingDelayMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRingDelayMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRingDelayMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_parameters.go new file mode 100644 index 00000000000..341f85e497f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRoleManagerParams creates a new FindConfigRoleManagerParams object +// with the default values initialized. +func NewFindConfigRoleManagerParams() *FindConfigRoleManagerParams { + + return &FindConfigRoleManagerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRoleManagerParamsWithTimeout creates a new FindConfigRoleManagerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRoleManagerParamsWithTimeout(timeout time.Duration) *FindConfigRoleManagerParams { + + return &FindConfigRoleManagerParams{ + + timeout: timeout, + } +} + +// NewFindConfigRoleManagerParamsWithContext creates a new FindConfigRoleManagerParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRoleManagerParamsWithContext(ctx context.Context) *FindConfigRoleManagerParams { + + return &FindConfigRoleManagerParams{ + + Context: ctx, + } +} + +// NewFindConfigRoleManagerParamsWithHTTPClient creates a new FindConfigRoleManagerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRoleManagerParamsWithHTTPClient(client *http.Client) *FindConfigRoleManagerParams { + + return &FindConfigRoleManagerParams{ + HTTPClient: client, + } +} + +/*FindConfigRoleManagerParams contains all the parameters to send to the API endpoint +for the find config role manager operation typically these are written to a http.Request +*/ +type FindConfigRoleManagerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config role manager params +func (o *FindConfigRoleManagerParams) WithTimeout(timeout time.Duration) *FindConfigRoleManagerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config role manager params +func (o *FindConfigRoleManagerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config role manager params +func (o *FindConfigRoleManagerParams) WithContext(ctx context.Context) *FindConfigRoleManagerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config role manager params +func (o *FindConfigRoleManagerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config role manager params +func (o *FindConfigRoleManagerParams) WithHTTPClient(client *http.Client) *FindConfigRoleManagerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config role manager params +func (o *FindConfigRoleManagerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRoleManagerParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_responses.go new file mode 100644 index 00000000000..b0910fe3595 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_role_manager_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRoleManagerReader is a Reader for the FindConfigRoleManager structure. +type FindConfigRoleManagerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRoleManagerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRoleManagerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRoleManagerDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRoleManagerOK creates a FindConfigRoleManagerOK with default headers values +func NewFindConfigRoleManagerOK() *FindConfigRoleManagerOK { + return &FindConfigRoleManagerOK{} +} + +/*FindConfigRoleManagerOK handles this case with default header values. + +Config value +*/ +type FindConfigRoleManagerOK struct { + Payload string +} + +func (o *FindConfigRoleManagerOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRoleManagerOK) 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 +} + +// NewFindConfigRoleManagerDefault creates a FindConfigRoleManagerDefault with default headers values +func NewFindConfigRoleManagerDefault(code int) *FindConfigRoleManagerDefault { + return &FindConfigRoleManagerDefault{ + _statusCode: code, + } +} + +/*FindConfigRoleManagerDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRoleManagerDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config role manager default response +func (o *FindConfigRoleManagerDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRoleManagerDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRoleManagerDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRoleManagerDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_parameters.go new file mode 100644 index 00000000000..1cfdabb626d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRowCacheKeysToSaveParams creates a new FindConfigRowCacheKeysToSaveParams object +// with the default values initialized. +func NewFindConfigRowCacheKeysToSaveParams() *FindConfigRowCacheKeysToSaveParams { + + return &FindConfigRowCacheKeysToSaveParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRowCacheKeysToSaveParamsWithTimeout creates a new FindConfigRowCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRowCacheKeysToSaveParamsWithTimeout(timeout time.Duration) *FindConfigRowCacheKeysToSaveParams { + + return &FindConfigRowCacheKeysToSaveParams{ + + timeout: timeout, + } +} + +// NewFindConfigRowCacheKeysToSaveParamsWithContext creates a new FindConfigRowCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRowCacheKeysToSaveParamsWithContext(ctx context.Context) *FindConfigRowCacheKeysToSaveParams { + + return &FindConfigRowCacheKeysToSaveParams{ + + Context: ctx, + } +} + +// NewFindConfigRowCacheKeysToSaveParamsWithHTTPClient creates a new FindConfigRowCacheKeysToSaveParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRowCacheKeysToSaveParamsWithHTTPClient(client *http.Client) *FindConfigRowCacheKeysToSaveParams { + + return &FindConfigRowCacheKeysToSaveParams{ + HTTPClient: client, + } +} + +/*FindConfigRowCacheKeysToSaveParams contains all the parameters to send to the API endpoint +for the find config row cache keys to save operation typically these are written to a http.Request +*/ +type FindConfigRowCacheKeysToSaveParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) WithTimeout(timeout time.Duration) *FindConfigRowCacheKeysToSaveParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) WithContext(ctx context.Context) *FindConfigRowCacheKeysToSaveParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) WithHTTPClient(client *http.Client) *FindConfigRowCacheKeysToSaveParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config row cache keys to save params +func (o *FindConfigRowCacheKeysToSaveParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRowCacheKeysToSaveParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_responses.go new file mode 100644 index 00000000000..627cc534efb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_keys_to_save_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRowCacheKeysToSaveReader is a Reader for the FindConfigRowCacheKeysToSave structure. +type FindConfigRowCacheKeysToSaveReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRowCacheKeysToSaveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRowCacheKeysToSaveOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRowCacheKeysToSaveDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRowCacheKeysToSaveOK creates a FindConfigRowCacheKeysToSaveOK with default headers values +func NewFindConfigRowCacheKeysToSaveOK() *FindConfigRowCacheKeysToSaveOK { + return &FindConfigRowCacheKeysToSaveOK{} +} + +/*FindConfigRowCacheKeysToSaveOK handles this case with default header values. + +Config value +*/ +type FindConfigRowCacheKeysToSaveOK struct { + Payload int64 +} + +func (o *FindConfigRowCacheKeysToSaveOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRowCacheKeysToSaveOK) 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 +} + +// NewFindConfigRowCacheKeysToSaveDefault creates a FindConfigRowCacheKeysToSaveDefault with default headers values +func NewFindConfigRowCacheKeysToSaveDefault(code int) *FindConfigRowCacheKeysToSaveDefault { + return &FindConfigRowCacheKeysToSaveDefault{ + _statusCode: code, + } +} + +/*FindConfigRowCacheKeysToSaveDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRowCacheKeysToSaveDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config row cache keys to save default response +func (o *FindConfigRowCacheKeysToSaveDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRowCacheKeysToSaveDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRowCacheKeysToSaveDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRowCacheKeysToSaveDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_parameters.go new file mode 100644 index 00000000000..9836d8f56fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRowCacheSavePeriodParams creates a new FindConfigRowCacheSavePeriodParams object +// with the default values initialized. +func NewFindConfigRowCacheSavePeriodParams() *FindConfigRowCacheSavePeriodParams { + + return &FindConfigRowCacheSavePeriodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRowCacheSavePeriodParamsWithTimeout creates a new FindConfigRowCacheSavePeriodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRowCacheSavePeriodParamsWithTimeout(timeout time.Duration) *FindConfigRowCacheSavePeriodParams { + + return &FindConfigRowCacheSavePeriodParams{ + + timeout: timeout, + } +} + +// NewFindConfigRowCacheSavePeriodParamsWithContext creates a new FindConfigRowCacheSavePeriodParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRowCacheSavePeriodParamsWithContext(ctx context.Context) *FindConfigRowCacheSavePeriodParams { + + return &FindConfigRowCacheSavePeriodParams{ + + Context: ctx, + } +} + +// NewFindConfigRowCacheSavePeriodParamsWithHTTPClient creates a new FindConfigRowCacheSavePeriodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRowCacheSavePeriodParamsWithHTTPClient(client *http.Client) *FindConfigRowCacheSavePeriodParams { + + return &FindConfigRowCacheSavePeriodParams{ + HTTPClient: client, + } +} + +/*FindConfigRowCacheSavePeriodParams contains all the parameters to send to the API endpoint +for the find config row cache save period operation typically these are written to a http.Request +*/ +type FindConfigRowCacheSavePeriodParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) WithTimeout(timeout time.Duration) *FindConfigRowCacheSavePeriodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) WithContext(ctx context.Context) *FindConfigRowCacheSavePeriodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) WithHTTPClient(client *http.Client) *FindConfigRowCacheSavePeriodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config row cache save period params +func (o *FindConfigRowCacheSavePeriodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRowCacheSavePeriodParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_responses.go new file mode 100644 index 00000000000..7ef553e37ad --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_save_period_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRowCacheSavePeriodReader is a Reader for the FindConfigRowCacheSavePeriod structure. +type FindConfigRowCacheSavePeriodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRowCacheSavePeriodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRowCacheSavePeriodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRowCacheSavePeriodDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRowCacheSavePeriodOK creates a FindConfigRowCacheSavePeriodOK with default headers values +func NewFindConfigRowCacheSavePeriodOK() *FindConfigRowCacheSavePeriodOK { + return &FindConfigRowCacheSavePeriodOK{} +} + +/*FindConfigRowCacheSavePeriodOK handles this case with default header values. + +Config value +*/ +type FindConfigRowCacheSavePeriodOK struct { + Payload int64 +} + +func (o *FindConfigRowCacheSavePeriodOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRowCacheSavePeriodOK) 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 +} + +// NewFindConfigRowCacheSavePeriodDefault creates a FindConfigRowCacheSavePeriodDefault with default headers values +func NewFindConfigRowCacheSavePeriodDefault(code int) *FindConfigRowCacheSavePeriodDefault { + return &FindConfigRowCacheSavePeriodDefault{ + _statusCode: code, + } +} + +/*FindConfigRowCacheSavePeriodDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRowCacheSavePeriodDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config row cache save period default response +func (o *FindConfigRowCacheSavePeriodDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRowCacheSavePeriodDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRowCacheSavePeriodDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRowCacheSavePeriodDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_parameters.go new file mode 100644 index 00000000000..200bae6f837 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRowCacheSizeInMbParams creates a new FindConfigRowCacheSizeInMbParams object +// with the default values initialized. +func NewFindConfigRowCacheSizeInMbParams() *FindConfigRowCacheSizeInMbParams { + + return &FindConfigRowCacheSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRowCacheSizeInMbParamsWithTimeout creates a new FindConfigRowCacheSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRowCacheSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigRowCacheSizeInMbParams { + + return &FindConfigRowCacheSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigRowCacheSizeInMbParamsWithContext creates a new FindConfigRowCacheSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRowCacheSizeInMbParamsWithContext(ctx context.Context) *FindConfigRowCacheSizeInMbParams { + + return &FindConfigRowCacheSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigRowCacheSizeInMbParamsWithHTTPClient creates a new FindConfigRowCacheSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRowCacheSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigRowCacheSizeInMbParams { + + return &FindConfigRowCacheSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigRowCacheSizeInMbParams contains all the parameters to send to the API endpoint +for the find config row cache size in mb operation typically these are written to a http.Request +*/ +type FindConfigRowCacheSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigRowCacheSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) WithContext(ctx context.Context) *FindConfigRowCacheSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigRowCacheSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config row cache size in mb params +func (o *FindConfigRowCacheSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRowCacheSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_responses.go new file mode 100644 index 00000000000..88c5bf3223d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_row_cache_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRowCacheSizeInMbReader is a Reader for the FindConfigRowCacheSizeInMb structure. +type FindConfigRowCacheSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRowCacheSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRowCacheSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRowCacheSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRowCacheSizeInMbOK creates a FindConfigRowCacheSizeInMbOK with default headers values +func NewFindConfigRowCacheSizeInMbOK() *FindConfigRowCacheSizeInMbOK { + return &FindConfigRowCacheSizeInMbOK{} +} + +/*FindConfigRowCacheSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigRowCacheSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigRowCacheSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRowCacheSizeInMbOK) 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 +} + +// NewFindConfigRowCacheSizeInMbDefault creates a FindConfigRowCacheSizeInMbDefault with default headers values +func NewFindConfigRowCacheSizeInMbDefault(code int) *FindConfigRowCacheSizeInMbDefault { + return &FindConfigRowCacheSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigRowCacheSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRowCacheSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config row cache size in mb default response +func (o *FindConfigRowCacheSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRowCacheSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRowCacheSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRowCacheSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_parameters.go new file mode 100644 index 00000000000..0031deaa998 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCAddressParams creates a new FindConfigRPCAddressParams object +// with the default values initialized. +func NewFindConfigRPCAddressParams() *FindConfigRPCAddressParams { + + return &FindConfigRPCAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCAddressParamsWithTimeout creates a new FindConfigRPCAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCAddressParamsWithTimeout(timeout time.Duration) *FindConfigRPCAddressParams { + + return &FindConfigRPCAddressParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCAddressParamsWithContext creates a new FindConfigRPCAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCAddressParamsWithContext(ctx context.Context) *FindConfigRPCAddressParams { + + return &FindConfigRPCAddressParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCAddressParamsWithHTTPClient creates a new FindConfigRPCAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCAddressParamsWithHTTPClient(client *http.Client) *FindConfigRPCAddressParams { + + return &FindConfigRPCAddressParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCAddressParams contains all the parameters to send to the API endpoint +for the find config rpc address operation typically these are written to a http.Request +*/ +type FindConfigRPCAddressParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc address params +func (o *FindConfigRPCAddressParams) WithTimeout(timeout time.Duration) *FindConfigRPCAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc address params +func (o *FindConfigRPCAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc address params +func (o *FindConfigRPCAddressParams) WithContext(ctx context.Context) *FindConfigRPCAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc address params +func (o *FindConfigRPCAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc address params +func (o *FindConfigRPCAddressParams) WithHTTPClient(client *http.Client) *FindConfigRPCAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc address params +func (o *FindConfigRPCAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCAddressParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_responses.go new file mode 100644 index 00000000000..0a200025046 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_address_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCAddressReader is a Reader for the FindConfigRPCAddress structure. +type FindConfigRPCAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCAddressOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCAddressDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCAddressOK creates a FindConfigRPCAddressOK with default headers values +func NewFindConfigRPCAddressOK() *FindConfigRPCAddressOK { + return &FindConfigRPCAddressOK{} +} + +/*FindConfigRPCAddressOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCAddressOK struct { + Payload string +} + +func (o *FindConfigRPCAddressOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRPCAddressOK) 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 +} + +// NewFindConfigRPCAddressDefault creates a FindConfigRPCAddressDefault with default headers values +func NewFindConfigRPCAddressDefault(code int) *FindConfigRPCAddressDefault { + return &FindConfigRPCAddressDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCAddressDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCAddressDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc address default response +func (o *FindConfigRPCAddressDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCAddressDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCAddressDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_parameters.go new file mode 100644 index 00000000000..6b7cf7075e7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCInterfaceParams creates a new FindConfigRPCInterfaceParams object +// with the default values initialized. +func NewFindConfigRPCInterfaceParams() *FindConfigRPCInterfaceParams { + + return &FindConfigRPCInterfaceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCInterfaceParamsWithTimeout creates a new FindConfigRPCInterfaceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCInterfaceParamsWithTimeout(timeout time.Duration) *FindConfigRPCInterfaceParams { + + return &FindConfigRPCInterfaceParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCInterfaceParamsWithContext creates a new FindConfigRPCInterfaceParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCInterfaceParamsWithContext(ctx context.Context) *FindConfigRPCInterfaceParams { + + return &FindConfigRPCInterfaceParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCInterfaceParamsWithHTTPClient creates a new FindConfigRPCInterfaceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCInterfaceParamsWithHTTPClient(client *http.Client) *FindConfigRPCInterfaceParams { + + return &FindConfigRPCInterfaceParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCInterfaceParams contains all the parameters to send to the API endpoint +for the find config rpc interface operation typically these are written to a http.Request +*/ +type FindConfigRPCInterfaceParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) WithTimeout(timeout time.Duration) *FindConfigRPCInterfaceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) WithContext(ctx context.Context) *FindConfigRPCInterfaceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) WithHTTPClient(client *http.Client) *FindConfigRPCInterfaceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc interface params +func (o *FindConfigRPCInterfaceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCInterfaceParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_responses.go new file mode 100644 index 00000000000..2f16c09eaf4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_interface_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCInterfaceReader is a Reader for the FindConfigRPCInterface structure. +type FindConfigRPCInterfaceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCInterfaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCInterfaceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCInterfaceDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCInterfaceOK creates a FindConfigRPCInterfaceOK with default headers values +func NewFindConfigRPCInterfaceOK() *FindConfigRPCInterfaceOK { + return &FindConfigRPCInterfaceOK{} +} + +/*FindConfigRPCInterfaceOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCInterfaceOK struct { + Payload string +} + +func (o *FindConfigRPCInterfaceOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRPCInterfaceOK) 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 +} + +// NewFindConfigRPCInterfaceDefault creates a FindConfigRPCInterfaceDefault with default headers values +func NewFindConfigRPCInterfaceDefault(code int) *FindConfigRPCInterfaceDefault { + return &FindConfigRPCInterfaceDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCInterfaceDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCInterfaceDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc interface default response +func (o *FindConfigRPCInterfaceDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCInterfaceDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCInterfaceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCInterfaceDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_parameters.go new file mode 100644 index 00000000000..a7bc8007870 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCKeepaliveParams creates a new FindConfigRPCKeepaliveParams object +// with the default values initialized. +func NewFindConfigRPCKeepaliveParams() *FindConfigRPCKeepaliveParams { + + return &FindConfigRPCKeepaliveParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCKeepaliveParamsWithTimeout creates a new FindConfigRPCKeepaliveParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCKeepaliveParamsWithTimeout(timeout time.Duration) *FindConfigRPCKeepaliveParams { + + return &FindConfigRPCKeepaliveParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCKeepaliveParamsWithContext creates a new FindConfigRPCKeepaliveParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCKeepaliveParamsWithContext(ctx context.Context) *FindConfigRPCKeepaliveParams { + + return &FindConfigRPCKeepaliveParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCKeepaliveParamsWithHTTPClient creates a new FindConfigRPCKeepaliveParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCKeepaliveParamsWithHTTPClient(client *http.Client) *FindConfigRPCKeepaliveParams { + + return &FindConfigRPCKeepaliveParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCKeepaliveParams contains all the parameters to send to the API endpoint +for the find config rpc keepalive operation typically these are written to a http.Request +*/ +type FindConfigRPCKeepaliveParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) WithTimeout(timeout time.Duration) *FindConfigRPCKeepaliveParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) WithContext(ctx context.Context) *FindConfigRPCKeepaliveParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) WithHTTPClient(client *http.Client) *FindConfigRPCKeepaliveParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc keepalive params +func (o *FindConfigRPCKeepaliveParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCKeepaliveParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_responses.go new file mode 100644 index 00000000000..d14ee98fed1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_keepalive_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCKeepaliveReader is a Reader for the FindConfigRPCKeepalive structure. +type FindConfigRPCKeepaliveReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCKeepaliveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCKeepaliveOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCKeepaliveDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCKeepaliveOK creates a FindConfigRPCKeepaliveOK with default headers values +func NewFindConfigRPCKeepaliveOK() *FindConfigRPCKeepaliveOK { + return &FindConfigRPCKeepaliveOK{} +} + +/*FindConfigRPCKeepaliveOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCKeepaliveOK struct { + Payload bool +} + +func (o *FindConfigRPCKeepaliveOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigRPCKeepaliveOK) 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 +} + +// NewFindConfigRPCKeepaliveDefault creates a FindConfigRPCKeepaliveDefault with default headers values +func NewFindConfigRPCKeepaliveDefault(code int) *FindConfigRPCKeepaliveDefault { + return &FindConfigRPCKeepaliveDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCKeepaliveDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCKeepaliveDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc keepalive default response +func (o *FindConfigRPCKeepaliveDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCKeepaliveDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCKeepaliveDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCKeepaliveDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_parameters.go new file mode 100644 index 00000000000..23dcda279e3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCMaxThreadsParams creates a new FindConfigRPCMaxThreadsParams object +// with the default values initialized. +func NewFindConfigRPCMaxThreadsParams() *FindConfigRPCMaxThreadsParams { + + return &FindConfigRPCMaxThreadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCMaxThreadsParamsWithTimeout creates a new FindConfigRPCMaxThreadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCMaxThreadsParamsWithTimeout(timeout time.Duration) *FindConfigRPCMaxThreadsParams { + + return &FindConfigRPCMaxThreadsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCMaxThreadsParamsWithContext creates a new FindConfigRPCMaxThreadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCMaxThreadsParamsWithContext(ctx context.Context) *FindConfigRPCMaxThreadsParams { + + return &FindConfigRPCMaxThreadsParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCMaxThreadsParamsWithHTTPClient creates a new FindConfigRPCMaxThreadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCMaxThreadsParamsWithHTTPClient(client *http.Client) *FindConfigRPCMaxThreadsParams { + + return &FindConfigRPCMaxThreadsParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCMaxThreadsParams contains all the parameters to send to the API endpoint +for the find config rpc max threads operation typically these are written to a http.Request +*/ +type FindConfigRPCMaxThreadsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) WithTimeout(timeout time.Duration) *FindConfigRPCMaxThreadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) WithContext(ctx context.Context) *FindConfigRPCMaxThreadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) WithHTTPClient(client *http.Client) *FindConfigRPCMaxThreadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc max threads params +func (o *FindConfigRPCMaxThreadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCMaxThreadsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_responses.go new file mode 100644 index 00000000000..3b665fcaca0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_max_threads_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCMaxThreadsReader is a Reader for the FindConfigRPCMaxThreads structure. +type FindConfigRPCMaxThreadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCMaxThreadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCMaxThreadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCMaxThreadsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCMaxThreadsOK creates a FindConfigRPCMaxThreadsOK with default headers values +func NewFindConfigRPCMaxThreadsOK() *FindConfigRPCMaxThreadsOK { + return &FindConfigRPCMaxThreadsOK{} +} + +/*FindConfigRPCMaxThreadsOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCMaxThreadsOK struct { + Payload int64 +} + +func (o *FindConfigRPCMaxThreadsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRPCMaxThreadsOK) 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 +} + +// NewFindConfigRPCMaxThreadsDefault creates a FindConfigRPCMaxThreadsDefault with default headers values +func NewFindConfigRPCMaxThreadsDefault(code int) *FindConfigRPCMaxThreadsDefault { + return &FindConfigRPCMaxThreadsDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCMaxThreadsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCMaxThreadsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc max threads default response +func (o *FindConfigRPCMaxThreadsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCMaxThreadsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCMaxThreadsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCMaxThreadsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_parameters.go new file mode 100644 index 00000000000..5d3437f3c6f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCMinThreadsParams creates a new FindConfigRPCMinThreadsParams object +// with the default values initialized. +func NewFindConfigRPCMinThreadsParams() *FindConfigRPCMinThreadsParams { + + return &FindConfigRPCMinThreadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCMinThreadsParamsWithTimeout creates a new FindConfigRPCMinThreadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCMinThreadsParamsWithTimeout(timeout time.Duration) *FindConfigRPCMinThreadsParams { + + return &FindConfigRPCMinThreadsParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCMinThreadsParamsWithContext creates a new FindConfigRPCMinThreadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCMinThreadsParamsWithContext(ctx context.Context) *FindConfigRPCMinThreadsParams { + + return &FindConfigRPCMinThreadsParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCMinThreadsParamsWithHTTPClient creates a new FindConfigRPCMinThreadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCMinThreadsParamsWithHTTPClient(client *http.Client) *FindConfigRPCMinThreadsParams { + + return &FindConfigRPCMinThreadsParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCMinThreadsParams contains all the parameters to send to the API endpoint +for the find config rpc min threads operation typically these are written to a http.Request +*/ +type FindConfigRPCMinThreadsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) WithTimeout(timeout time.Duration) *FindConfigRPCMinThreadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) WithContext(ctx context.Context) *FindConfigRPCMinThreadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) WithHTTPClient(client *http.Client) *FindConfigRPCMinThreadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc min threads params +func (o *FindConfigRPCMinThreadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCMinThreadsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_responses.go new file mode 100644 index 00000000000..557ae85b395 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_min_threads_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCMinThreadsReader is a Reader for the FindConfigRPCMinThreads structure. +type FindConfigRPCMinThreadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCMinThreadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCMinThreadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCMinThreadsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCMinThreadsOK creates a FindConfigRPCMinThreadsOK with default headers values +func NewFindConfigRPCMinThreadsOK() *FindConfigRPCMinThreadsOK { + return &FindConfigRPCMinThreadsOK{} +} + +/*FindConfigRPCMinThreadsOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCMinThreadsOK struct { + Payload int64 +} + +func (o *FindConfigRPCMinThreadsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRPCMinThreadsOK) 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 +} + +// NewFindConfigRPCMinThreadsDefault creates a FindConfigRPCMinThreadsDefault with default headers values +func NewFindConfigRPCMinThreadsDefault(code int) *FindConfigRPCMinThreadsDefault { + return &FindConfigRPCMinThreadsDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCMinThreadsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCMinThreadsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc min threads default response +func (o *FindConfigRPCMinThreadsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCMinThreadsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCMinThreadsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCMinThreadsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_parameters.go new file mode 100644 index 00000000000..d456abef8f8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCPortParams creates a new FindConfigRPCPortParams object +// with the default values initialized. +func NewFindConfigRPCPortParams() *FindConfigRPCPortParams { + + return &FindConfigRPCPortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCPortParamsWithTimeout creates a new FindConfigRPCPortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCPortParamsWithTimeout(timeout time.Duration) *FindConfigRPCPortParams { + + return &FindConfigRPCPortParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCPortParamsWithContext creates a new FindConfigRPCPortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCPortParamsWithContext(ctx context.Context) *FindConfigRPCPortParams { + + return &FindConfigRPCPortParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCPortParamsWithHTTPClient creates a new FindConfigRPCPortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCPortParamsWithHTTPClient(client *http.Client) *FindConfigRPCPortParams { + + return &FindConfigRPCPortParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCPortParams contains all the parameters to send to the API endpoint +for the find config rpc port operation typically these are written to a http.Request +*/ +type FindConfigRPCPortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc port params +func (o *FindConfigRPCPortParams) WithTimeout(timeout time.Duration) *FindConfigRPCPortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc port params +func (o *FindConfigRPCPortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc port params +func (o *FindConfigRPCPortParams) WithContext(ctx context.Context) *FindConfigRPCPortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc port params +func (o *FindConfigRPCPortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc port params +func (o *FindConfigRPCPortParams) WithHTTPClient(client *http.Client) *FindConfigRPCPortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc port params +func (o *FindConfigRPCPortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCPortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_responses.go new file mode 100644 index 00000000000..3b880a35dfc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCPortReader is a Reader for the FindConfigRPCPort structure. +type FindConfigRPCPortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCPortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCPortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCPortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCPortOK creates a FindConfigRPCPortOK with default headers values +func NewFindConfigRPCPortOK() *FindConfigRPCPortOK { + return &FindConfigRPCPortOK{} +} + +/*FindConfigRPCPortOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCPortOK struct { + Payload int64 +} + +func (o *FindConfigRPCPortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRPCPortOK) 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 +} + +// NewFindConfigRPCPortDefault creates a FindConfigRPCPortDefault with default headers values +func NewFindConfigRPCPortDefault(code int) *FindConfigRPCPortDefault { + return &FindConfigRPCPortDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCPortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCPortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc port default response +func (o *FindConfigRPCPortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCPortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCPortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCPortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_parameters.go new file mode 100644 index 00000000000..3dc2efeb9ec --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCRecvBuffSizeInBytesParams creates a new FindConfigRPCRecvBuffSizeInBytesParams object +// with the default values initialized. +func NewFindConfigRPCRecvBuffSizeInBytesParams() *FindConfigRPCRecvBuffSizeInBytesParams { + + return &FindConfigRPCRecvBuffSizeInBytesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCRecvBuffSizeInBytesParamsWithTimeout creates a new FindConfigRPCRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCRecvBuffSizeInBytesParamsWithTimeout(timeout time.Duration) *FindConfigRPCRecvBuffSizeInBytesParams { + + return &FindConfigRPCRecvBuffSizeInBytesParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCRecvBuffSizeInBytesParamsWithContext creates a new FindConfigRPCRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCRecvBuffSizeInBytesParamsWithContext(ctx context.Context) *FindConfigRPCRecvBuffSizeInBytesParams { + + return &FindConfigRPCRecvBuffSizeInBytesParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCRecvBuffSizeInBytesParamsWithHTTPClient creates a new FindConfigRPCRecvBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCRecvBuffSizeInBytesParamsWithHTTPClient(client *http.Client) *FindConfigRPCRecvBuffSizeInBytesParams { + + return &FindConfigRPCRecvBuffSizeInBytesParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCRecvBuffSizeInBytesParams contains all the parameters to send to the API endpoint +for the find config rpc recv buff size in bytes operation typically these are written to a http.Request +*/ +type FindConfigRPCRecvBuffSizeInBytesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) WithTimeout(timeout time.Duration) *FindConfigRPCRecvBuffSizeInBytesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) WithContext(ctx context.Context) *FindConfigRPCRecvBuffSizeInBytesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) WithHTTPClient(client *http.Client) *FindConfigRPCRecvBuffSizeInBytesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc recv buff size in bytes params +func (o *FindConfigRPCRecvBuffSizeInBytesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCRecvBuffSizeInBytesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_responses.go new file mode 100644 index 00000000000..10f161e61ba --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_recv_buff_size_in_bytes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCRecvBuffSizeInBytesReader is a Reader for the FindConfigRPCRecvBuffSizeInBytes structure. +type FindConfigRPCRecvBuffSizeInBytesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCRecvBuffSizeInBytesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCRecvBuffSizeInBytesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCRecvBuffSizeInBytesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCRecvBuffSizeInBytesOK creates a FindConfigRPCRecvBuffSizeInBytesOK with default headers values +func NewFindConfigRPCRecvBuffSizeInBytesOK() *FindConfigRPCRecvBuffSizeInBytesOK { + return &FindConfigRPCRecvBuffSizeInBytesOK{} +} + +/*FindConfigRPCRecvBuffSizeInBytesOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCRecvBuffSizeInBytesOK struct { + Payload int64 +} + +func (o *FindConfigRPCRecvBuffSizeInBytesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRPCRecvBuffSizeInBytesOK) 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 +} + +// NewFindConfigRPCRecvBuffSizeInBytesDefault creates a FindConfigRPCRecvBuffSizeInBytesDefault with default headers values +func NewFindConfigRPCRecvBuffSizeInBytesDefault(code int) *FindConfigRPCRecvBuffSizeInBytesDefault { + return &FindConfigRPCRecvBuffSizeInBytesDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCRecvBuffSizeInBytesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCRecvBuffSizeInBytesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc recv buff size in bytes default response +func (o *FindConfigRPCRecvBuffSizeInBytesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCRecvBuffSizeInBytesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCRecvBuffSizeInBytesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCRecvBuffSizeInBytesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_parameters.go new file mode 100644 index 00000000000..c1466144d16 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCSendBuffSizeInBytesParams creates a new FindConfigRPCSendBuffSizeInBytesParams object +// with the default values initialized. +func NewFindConfigRPCSendBuffSizeInBytesParams() *FindConfigRPCSendBuffSizeInBytesParams { + + return &FindConfigRPCSendBuffSizeInBytesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCSendBuffSizeInBytesParamsWithTimeout creates a new FindConfigRPCSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCSendBuffSizeInBytesParamsWithTimeout(timeout time.Duration) *FindConfigRPCSendBuffSizeInBytesParams { + + return &FindConfigRPCSendBuffSizeInBytesParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCSendBuffSizeInBytesParamsWithContext creates a new FindConfigRPCSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCSendBuffSizeInBytesParamsWithContext(ctx context.Context) *FindConfigRPCSendBuffSizeInBytesParams { + + return &FindConfigRPCSendBuffSizeInBytesParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCSendBuffSizeInBytesParamsWithHTTPClient creates a new FindConfigRPCSendBuffSizeInBytesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCSendBuffSizeInBytesParamsWithHTTPClient(client *http.Client) *FindConfigRPCSendBuffSizeInBytesParams { + + return &FindConfigRPCSendBuffSizeInBytesParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCSendBuffSizeInBytesParams contains all the parameters to send to the API endpoint +for the find config rpc send buff size in bytes operation typically these are written to a http.Request +*/ +type FindConfigRPCSendBuffSizeInBytesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) WithTimeout(timeout time.Duration) *FindConfigRPCSendBuffSizeInBytesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) WithContext(ctx context.Context) *FindConfigRPCSendBuffSizeInBytesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) WithHTTPClient(client *http.Client) *FindConfigRPCSendBuffSizeInBytesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc send buff size in bytes params +func (o *FindConfigRPCSendBuffSizeInBytesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCSendBuffSizeInBytesParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_responses.go new file mode 100644 index 00000000000..3e74230526a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_send_buff_size_in_bytes_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCSendBuffSizeInBytesReader is a Reader for the FindConfigRPCSendBuffSizeInBytes structure. +type FindConfigRPCSendBuffSizeInBytesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCSendBuffSizeInBytesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCSendBuffSizeInBytesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCSendBuffSizeInBytesDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCSendBuffSizeInBytesOK creates a FindConfigRPCSendBuffSizeInBytesOK with default headers values +func NewFindConfigRPCSendBuffSizeInBytesOK() *FindConfigRPCSendBuffSizeInBytesOK { + return &FindConfigRPCSendBuffSizeInBytesOK{} +} + +/*FindConfigRPCSendBuffSizeInBytesOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCSendBuffSizeInBytesOK struct { + Payload int64 +} + +func (o *FindConfigRPCSendBuffSizeInBytesOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigRPCSendBuffSizeInBytesOK) 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 +} + +// NewFindConfigRPCSendBuffSizeInBytesDefault creates a FindConfigRPCSendBuffSizeInBytesDefault with default headers values +func NewFindConfigRPCSendBuffSizeInBytesDefault(code int) *FindConfigRPCSendBuffSizeInBytesDefault { + return &FindConfigRPCSendBuffSizeInBytesDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCSendBuffSizeInBytesDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCSendBuffSizeInBytesDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc send buff size in bytes default response +func (o *FindConfigRPCSendBuffSizeInBytesDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCSendBuffSizeInBytesDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCSendBuffSizeInBytesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCSendBuffSizeInBytesDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_parameters.go new file mode 100644 index 00000000000..8a53f3f56e4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigRPCServerTypeParams creates a new FindConfigRPCServerTypeParams object +// with the default values initialized. +func NewFindConfigRPCServerTypeParams() *FindConfigRPCServerTypeParams { + + return &FindConfigRPCServerTypeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigRPCServerTypeParamsWithTimeout creates a new FindConfigRPCServerTypeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigRPCServerTypeParamsWithTimeout(timeout time.Duration) *FindConfigRPCServerTypeParams { + + return &FindConfigRPCServerTypeParams{ + + timeout: timeout, + } +} + +// NewFindConfigRPCServerTypeParamsWithContext creates a new FindConfigRPCServerTypeParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigRPCServerTypeParamsWithContext(ctx context.Context) *FindConfigRPCServerTypeParams { + + return &FindConfigRPCServerTypeParams{ + + Context: ctx, + } +} + +// NewFindConfigRPCServerTypeParamsWithHTTPClient creates a new FindConfigRPCServerTypeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigRPCServerTypeParamsWithHTTPClient(client *http.Client) *FindConfigRPCServerTypeParams { + + return &FindConfigRPCServerTypeParams{ + HTTPClient: client, + } +} + +/*FindConfigRPCServerTypeParams contains all the parameters to send to the API endpoint +for the find config rpc server type operation typically these are written to a http.Request +*/ +type FindConfigRPCServerTypeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) WithTimeout(timeout time.Duration) *FindConfigRPCServerTypeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) WithContext(ctx context.Context) *FindConfigRPCServerTypeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) WithHTTPClient(client *http.Client) *FindConfigRPCServerTypeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config rpc server type params +func (o *FindConfigRPCServerTypeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigRPCServerTypeParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_responses.go new file mode 100644 index 00000000000..34c493e79f7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_rpc_server_type_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigRPCServerTypeReader is a Reader for the FindConfigRPCServerType structure. +type FindConfigRPCServerTypeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigRPCServerTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigRPCServerTypeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigRPCServerTypeDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigRPCServerTypeOK creates a FindConfigRPCServerTypeOK with default headers values +func NewFindConfigRPCServerTypeOK() *FindConfigRPCServerTypeOK { + return &FindConfigRPCServerTypeOK{} +} + +/*FindConfigRPCServerTypeOK handles this case with default header values. + +Config value +*/ +type FindConfigRPCServerTypeOK struct { + Payload string +} + +func (o *FindConfigRPCServerTypeOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigRPCServerTypeOK) 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 +} + +// NewFindConfigRPCServerTypeDefault creates a FindConfigRPCServerTypeDefault with default headers values +func NewFindConfigRPCServerTypeDefault(code int) *FindConfigRPCServerTypeDefault { + return &FindConfigRPCServerTypeDefault{ + _statusCode: code, + } +} + +/*FindConfigRPCServerTypeDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigRPCServerTypeDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config rpc server type default response +func (o *FindConfigRPCServerTypeDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigRPCServerTypeDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigRPCServerTypeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigRPCServerTypeDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_parameters.go new file mode 100644 index 00000000000..71f9be6aed4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSavedCachesDirectoryParams creates a new FindConfigSavedCachesDirectoryParams object +// with the default values initialized. +func NewFindConfigSavedCachesDirectoryParams() *FindConfigSavedCachesDirectoryParams { + + return &FindConfigSavedCachesDirectoryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSavedCachesDirectoryParamsWithTimeout creates a new FindConfigSavedCachesDirectoryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSavedCachesDirectoryParamsWithTimeout(timeout time.Duration) *FindConfigSavedCachesDirectoryParams { + + return &FindConfigSavedCachesDirectoryParams{ + + timeout: timeout, + } +} + +// NewFindConfigSavedCachesDirectoryParamsWithContext creates a new FindConfigSavedCachesDirectoryParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSavedCachesDirectoryParamsWithContext(ctx context.Context) *FindConfigSavedCachesDirectoryParams { + + return &FindConfigSavedCachesDirectoryParams{ + + Context: ctx, + } +} + +// NewFindConfigSavedCachesDirectoryParamsWithHTTPClient creates a new FindConfigSavedCachesDirectoryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSavedCachesDirectoryParamsWithHTTPClient(client *http.Client) *FindConfigSavedCachesDirectoryParams { + + return &FindConfigSavedCachesDirectoryParams{ + HTTPClient: client, + } +} + +/*FindConfigSavedCachesDirectoryParams contains all the parameters to send to the API endpoint +for the find config saved caches directory operation typically these are written to a http.Request +*/ +type FindConfigSavedCachesDirectoryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) WithTimeout(timeout time.Duration) *FindConfigSavedCachesDirectoryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) WithContext(ctx context.Context) *FindConfigSavedCachesDirectoryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) WithHTTPClient(client *http.Client) *FindConfigSavedCachesDirectoryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config saved caches directory params +func (o *FindConfigSavedCachesDirectoryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSavedCachesDirectoryParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_responses.go new file mode 100644 index 00000000000..d13aa9b4205 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_saved_caches_directory_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSavedCachesDirectoryReader is a Reader for the FindConfigSavedCachesDirectory structure. +type FindConfigSavedCachesDirectoryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSavedCachesDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSavedCachesDirectoryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSavedCachesDirectoryDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSavedCachesDirectoryOK creates a FindConfigSavedCachesDirectoryOK with default headers values +func NewFindConfigSavedCachesDirectoryOK() *FindConfigSavedCachesDirectoryOK { + return &FindConfigSavedCachesDirectoryOK{} +} + +/*FindConfigSavedCachesDirectoryOK handles this case with default header values. + +Config value +*/ +type FindConfigSavedCachesDirectoryOK struct { + Payload string +} + +func (o *FindConfigSavedCachesDirectoryOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigSavedCachesDirectoryOK) 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 +} + +// NewFindConfigSavedCachesDirectoryDefault creates a FindConfigSavedCachesDirectoryDefault with default headers values +func NewFindConfigSavedCachesDirectoryDefault(code int) *FindConfigSavedCachesDirectoryDefault { + return &FindConfigSavedCachesDirectoryDefault{ + _statusCode: code, + } +} + +/*FindConfigSavedCachesDirectoryDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSavedCachesDirectoryDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config saved caches directory default response +func (o *FindConfigSavedCachesDirectoryDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSavedCachesDirectoryDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSavedCachesDirectoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSavedCachesDirectoryDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_parameters.go new file mode 100644 index 00000000000..ff3a3ab2184 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSeedProviderParams creates a new FindConfigSeedProviderParams object +// with the default values initialized. +func NewFindConfigSeedProviderParams() *FindConfigSeedProviderParams { + + return &FindConfigSeedProviderParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSeedProviderParamsWithTimeout creates a new FindConfigSeedProviderParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSeedProviderParamsWithTimeout(timeout time.Duration) *FindConfigSeedProviderParams { + + return &FindConfigSeedProviderParams{ + + timeout: timeout, + } +} + +// NewFindConfigSeedProviderParamsWithContext creates a new FindConfigSeedProviderParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSeedProviderParamsWithContext(ctx context.Context) *FindConfigSeedProviderParams { + + return &FindConfigSeedProviderParams{ + + Context: ctx, + } +} + +// NewFindConfigSeedProviderParamsWithHTTPClient creates a new FindConfigSeedProviderParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSeedProviderParamsWithHTTPClient(client *http.Client) *FindConfigSeedProviderParams { + + return &FindConfigSeedProviderParams{ + HTTPClient: client, + } +} + +/*FindConfigSeedProviderParams contains all the parameters to send to the API endpoint +for the find config seed provider operation typically these are written to a http.Request +*/ +type FindConfigSeedProviderParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config seed provider params +func (o *FindConfigSeedProviderParams) WithTimeout(timeout time.Duration) *FindConfigSeedProviderParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config seed provider params +func (o *FindConfigSeedProviderParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config seed provider params +func (o *FindConfigSeedProviderParams) WithContext(ctx context.Context) *FindConfigSeedProviderParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config seed provider params +func (o *FindConfigSeedProviderParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config seed provider params +func (o *FindConfigSeedProviderParams) WithHTTPClient(client *http.Client) *FindConfigSeedProviderParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config seed provider params +func (o *FindConfigSeedProviderParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSeedProviderParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_responses.go new file mode 100644 index 00000000000..3346d6fd1f4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_seed_provider_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSeedProviderReader is a Reader for the FindConfigSeedProvider structure. +type FindConfigSeedProviderReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSeedProviderReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSeedProviderOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSeedProviderDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSeedProviderOK creates a FindConfigSeedProviderOK with default headers values +func NewFindConfigSeedProviderOK() *FindConfigSeedProviderOK { + return &FindConfigSeedProviderOK{} +} + +/*FindConfigSeedProviderOK handles this case with default header values. + +Config value +*/ +type FindConfigSeedProviderOK struct { + Payload []string +} + +func (o *FindConfigSeedProviderOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigSeedProviderOK) 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 +} + +// NewFindConfigSeedProviderDefault creates a FindConfigSeedProviderDefault with default headers values +func NewFindConfigSeedProviderDefault(code int) *FindConfigSeedProviderDefault { + return &FindConfigSeedProviderDefault{ + _statusCode: code, + } +} + +/*FindConfigSeedProviderDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSeedProviderDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config seed provider default response +func (o *FindConfigSeedProviderDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSeedProviderDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSeedProviderDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSeedProviderDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_parameters.go new file mode 100644 index 00000000000..b1000964911 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigServerEncryptionOptionsParams creates a new FindConfigServerEncryptionOptionsParams object +// with the default values initialized. +func NewFindConfigServerEncryptionOptionsParams() *FindConfigServerEncryptionOptionsParams { + + return &FindConfigServerEncryptionOptionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigServerEncryptionOptionsParamsWithTimeout creates a new FindConfigServerEncryptionOptionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigServerEncryptionOptionsParamsWithTimeout(timeout time.Duration) *FindConfigServerEncryptionOptionsParams { + + return &FindConfigServerEncryptionOptionsParams{ + + timeout: timeout, + } +} + +// NewFindConfigServerEncryptionOptionsParamsWithContext creates a new FindConfigServerEncryptionOptionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigServerEncryptionOptionsParamsWithContext(ctx context.Context) *FindConfigServerEncryptionOptionsParams { + + return &FindConfigServerEncryptionOptionsParams{ + + Context: ctx, + } +} + +// NewFindConfigServerEncryptionOptionsParamsWithHTTPClient creates a new FindConfigServerEncryptionOptionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigServerEncryptionOptionsParamsWithHTTPClient(client *http.Client) *FindConfigServerEncryptionOptionsParams { + + return &FindConfigServerEncryptionOptionsParams{ + HTTPClient: client, + } +} + +/*FindConfigServerEncryptionOptionsParams contains all the parameters to send to the API endpoint +for the find config server encryption options operation typically these are written to a http.Request +*/ +type FindConfigServerEncryptionOptionsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) WithTimeout(timeout time.Duration) *FindConfigServerEncryptionOptionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) WithContext(ctx context.Context) *FindConfigServerEncryptionOptionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) WithHTTPClient(client *http.Client) *FindConfigServerEncryptionOptionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config server encryption options params +func (o *FindConfigServerEncryptionOptionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigServerEncryptionOptionsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_responses.go new file mode 100644 index 00000000000..2a2907706d5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_server_encryption_options_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigServerEncryptionOptionsReader is a Reader for the FindConfigServerEncryptionOptions structure. +type FindConfigServerEncryptionOptionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigServerEncryptionOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigServerEncryptionOptionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigServerEncryptionOptionsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigServerEncryptionOptionsOK creates a FindConfigServerEncryptionOptionsOK with default headers values +func NewFindConfigServerEncryptionOptionsOK() *FindConfigServerEncryptionOptionsOK { + return &FindConfigServerEncryptionOptionsOK{} +} + +/*FindConfigServerEncryptionOptionsOK handles this case with default header values. + +Config value +*/ +type FindConfigServerEncryptionOptionsOK struct { + Payload []string +} + +func (o *FindConfigServerEncryptionOptionsOK) GetPayload() []string { + return o.Payload +} + +func (o *FindConfigServerEncryptionOptionsOK) 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 +} + +// NewFindConfigServerEncryptionOptionsDefault creates a FindConfigServerEncryptionOptionsDefault with default headers values +func NewFindConfigServerEncryptionOptionsDefault(code int) *FindConfigServerEncryptionOptionsDefault { + return &FindConfigServerEncryptionOptionsDefault{ + _statusCode: code, + } +} + +/*FindConfigServerEncryptionOptionsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigServerEncryptionOptionsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config server encryption options default response +func (o *FindConfigServerEncryptionOptionsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigServerEncryptionOptionsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigServerEncryptionOptionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigServerEncryptionOptionsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_parameters.go new file mode 100644 index 00000000000..2e85074b689 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigShadowRoundMsParams creates a new FindConfigShadowRoundMsParams object +// with the default values initialized. +func NewFindConfigShadowRoundMsParams() *FindConfigShadowRoundMsParams { + + return &FindConfigShadowRoundMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigShadowRoundMsParamsWithTimeout creates a new FindConfigShadowRoundMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigShadowRoundMsParamsWithTimeout(timeout time.Duration) *FindConfigShadowRoundMsParams { + + return &FindConfigShadowRoundMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigShadowRoundMsParamsWithContext creates a new FindConfigShadowRoundMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigShadowRoundMsParamsWithContext(ctx context.Context) *FindConfigShadowRoundMsParams { + + return &FindConfigShadowRoundMsParams{ + + Context: ctx, + } +} + +// NewFindConfigShadowRoundMsParamsWithHTTPClient creates a new FindConfigShadowRoundMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigShadowRoundMsParamsWithHTTPClient(client *http.Client) *FindConfigShadowRoundMsParams { + + return &FindConfigShadowRoundMsParams{ + HTTPClient: client, + } +} + +/*FindConfigShadowRoundMsParams contains all the parameters to send to the API endpoint +for the find config shadow round ms operation typically these are written to a http.Request +*/ +type FindConfigShadowRoundMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) WithTimeout(timeout time.Duration) *FindConfigShadowRoundMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) WithContext(ctx context.Context) *FindConfigShadowRoundMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) WithHTTPClient(client *http.Client) *FindConfigShadowRoundMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config shadow round ms params +func (o *FindConfigShadowRoundMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigShadowRoundMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_responses.go new file mode 100644 index 00000000000..3c2fd6ac16e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shadow_round_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigShadowRoundMsReader is a Reader for the FindConfigShadowRoundMs structure. +type FindConfigShadowRoundMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigShadowRoundMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigShadowRoundMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigShadowRoundMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigShadowRoundMsOK creates a FindConfigShadowRoundMsOK with default headers values +func NewFindConfigShadowRoundMsOK() *FindConfigShadowRoundMsOK { + return &FindConfigShadowRoundMsOK{} +} + +/*FindConfigShadowRoundMsOK handles this case with default header values. + +Config value +*/ +type FindConfigShadowRoundMsOK struct { + Payload int64 +} + +func (o *FindConfigShadowRoundMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigShadowRoundMsOK) 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 +} + +// NewFindConfigShadowRoundMsDefault creates a FindConfigShadowRoundMsDefault with default headers values +func NewFindConfigShadowRoundMsDefault(code int) *FindConfigShadowRoundMsDefault { + return &FindConfigShadowRoundMsDefault{ + _statusCode: code, + } +} + +/*FindConfigShadowRoundMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigShadowRoundMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config shadow round ms default response +func (o *FindConfigShadowRoundMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigShadowRoundMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigShadowRoundMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigShadowRoundMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_parameters.go new file mode 100644 index 00000000000..a4d15e47051 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigShutdownAnnounceInMsParams creates a new FindConfigShutdownAnnounceInMsParams object +// with the default values initialized. +func NewFindConfigShutdownAnnounceInMsParams() *FindConfigShutdownAnnounceInMsParams { + + return &FindConfigShutdownAnnounceInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigShutdownAnnounceInMsParamsWithTimeout creates a new FindConfigShutdownAnnounceInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigShutdownAnnounceInMsParamsWithTimeout(timeout time.Duration) *FindConfigShutdownAnnounceInMsParams { + + return &FindConfigShutdownAnnounceInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigShutdownAnnounceInMsParamsWithContext creates a new FindConfigShutdownAnnounceInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigShutdownAnnounceInMsParamsWithContext(ctx context.Context) *FindConfigShutdownAnnounceInMsParams { + + return &FindConfigShutdownAnnounceInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigShutdownAnnounceInMsParamsWithHTTPClient creates a new FindConfigShutdownAnnounceInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigShutdownAnnounceInMsParamsWithHTTPClient(client *http.Client) *FindConfigShutdownAnnounceInMsParams { + + return &FindConfigShutdownAnnounceInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigShutdownAnnounceInMsParams contains all the parameters to send to the API endpoint +for the find config shutdown announce in ms operation typically these are written to a http.Request +*/ +type FindConfigShutdownAnnounceInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) WithTimeout(timeout time.Duration) *FindConfigShutdownAnnounceInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) WithContext(ctx context.Context) *FindConfigShutdownAnnounceInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) WithHTTPClient(client *http.Client) *FindConfigShutdownAnnounceInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config shutdown announce in ms params +func (o *FindConfigShutdownAnnounceInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigShutdownAnnounceInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_responses.go new file mode 100644 index 00000000000..96255beba6b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_shutdown_announce_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigShutdownAnnounceInMsReader is a Reader for the FindConfigShutdownAnnounceInMs structure. +type FindConfigShutdownAnnounceInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigShutdownAnnounceInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigShutdownAnnounceInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigShutdownAnnounceInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigShutdownAnnounceInMsOK creates a FindConfigShutdownAnnounceInMsOK with default headers values +func NewFindConfigShutdownAnnounceInMsOK() *FindConfigShutdownAnnounceInMsOK { + return &FindConfigShutdownAnnounceInMsOK{} +} + +/*FindConfigShutdownAnnounceInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigShutdownAnnounceInMsOK struct { + Payload int64 +} + +func (o *FindConfigShutdownAnnounceInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigShutdownAnnounceInMsOK) 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 +} + +// NewFindConfigShutdownAnnounceInMsDefault creates a FindConfigShutdownAnnounceInMsDefault with default headers values +func NewFindConfigShutdownAnnounceInMsDefault(code int) *FindConfigShutdownAnnounceInMsDefault { + return &FindConfigShutdownAnnounceInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigShutdownAnnounceInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigShutdownAnnounceInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config shutdown announce in ms default response +func (o *FindConfigShutdownAnnounceInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigShutdownAnnounceInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigShutdownAnnounceInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigShutdownAnnounceInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_parameters.go new file mode 100644 index 00000000000..a23db9c7ae3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSkipWaitForGossipToSettleParams creates a new FindConfigSkipWaitForGossipToSettleParams object +// with the default values initialized. +func NewFindConfigSkipWaitForGossipToSettleParams() *FindConfigSkipWaitForGossipToSettleParams { + + return &FindConfigSkipWaitForGossipToSettleParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSkipWaitForGossipToSettleParamsWithTimeout creates a new FindConfigSkipWaitForGossipToSettleParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSkipWaitForGossipToSettleParamsWithTimeout(timeout time.Duration) *FindConfigSkipWaitForGossipToSettleParams { + + return &FindConfigSkipWaitForGossipToSettleParams{ + + timeout: timeout, + } +} + +// NewFindConfigSkipWaitForGossipToSettleParamsWithContext creates a new FindConfigSkipWaitForGossipToSettleParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSkipWaitForGossipToSettleParamsWithContext(ctx context.Context) *FindConfigSkipWaitForGossipToSettleParams { + + return &FindConfigSkipWaitForGossipToSettleParams{ + + Context: ctx, + } +} + +// NewFindConfigSkipWaitForGossipToSettleParamsWithHTTPClient creates a new FindConfigSkipWaitForGossipToSettleParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSkipWaitForGossipToSettleParamsWithHTTPClient(client *http.Client) *FindConfigSkipWaitForGossipToSettleParams { + + return &FindConfigSkipWaitForGossipToSettleParams{ + HTTPClient: client, + } +} + +/*FindConfigSkipWaitForGossipToSettleParams contains all the parameters to send to the API endpoint +for the find config skip wait for gossip to settle operation typically these are written to a http.Request +*/ +type FindConfigSkipWaitForGossipToSettleParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) WithTimeout(timeout time.Duration) *FindConfigSkipWaitForGossipToSettleParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) WithContext(ctx context.Context) *FindConfigSkipWaitForGossipToSettleParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) WithHTTPClient(client *http.Client) *FindConfigSkipWaitForGossipToSettleParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config skip wait for gossip to settle params +func (o *FindConfigSkipWaitForGossipToSettleParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSkipWaitForGossipToSettleParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_responses.go new file mode 100644 index 00000000000..a3d5960108e --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_skip_wait_for_gossip_to_settle_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSkipWaitForGossipToSettleReader is a Reader for the FindConfigSkipWaitForGossipToSettle structure. +type FindConfigSkipWaitForGossipToSettleReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSkipWaitForGossipToSettleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSkipWaitForGossipToSettleOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSkipWaitForGossipToSettleDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSkipWaitForGossipToSettleOK creates a FindConfigSkipWaitForGossipToSettleOK with default headers values +func NewFindConfigSkipWaitForGossipToSettleOK() *FindConfigSkipWaitForGossipToSettleOK { + return &FindConfigSkipWaitForGossipToSettleOK{} +} + +/*FindConfigSkipWaitForGossipToSettleOK handles this case with default header values. + +Config value +*/ +type FindConfigSkipWaitForGossipToSettleOK struct { + Payload int64 +} + +func (o *FindConfigSkipWaitForGossipToSettleOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigSkipWaitForGossipToSettleOK) 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 +} + +// NewFindConfigSkipWaitForGossipToSettleDefault creates a FindConfigSkipWaitForGossipToSettleDefault with default headers values +func NewFindConfigSkipWaitForGossipToSettleDefault(code int) *FindConfigSkipWaitForGossipToSettleDefault { + return &FindConfigSkipWaitForGossipToSettleDefault{ + _statusCode: code, + } +} + +/*FindConfigSkipWaitForGossipToSettleDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSkipWaitForGossipToSettleDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config skip wait for gossip to settle default response +func (o *FindConfigSkipWaitForGossipToSettleDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSkipWaitForGossipToSettleDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSkipWaitForGossipToSettleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSkipWaitForGossipToSettleDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_parameters.go new file mode 100644 index 00000000000..b692ee89119 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSnapshotBeforeCompactionParams creates a new FindConfigSnapshotBeforeCompactionParams object +// with the default values initialized. +func NewFindConfigSnapshotBeforeCompactionParams() *FindConfigSnapshotBeforeCompactionParams { + + return &FindConfigSnapshotBeforeCompactionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSnapshotBeforeCompactionParamsWithTimeout creates a new FindConfigSnapshotBeforeCompactionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSnapshotBeforeCompactionParamsWithTimeout(timeout time.Duration) *FindConfigSnapshotBeforeCompactionParams { + + return &FindConfigSnapshotBeforeCompactionParams{ + + timeout: timeout, + } +} + +// NewFindConfigSnapshotBeforeCompactionParamsWithContext creates a new FindConfigSnapshotBeforeCompactionParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSnapshotBeforeCompactionParamsWithContext(ctx context.Context) *FindConfigSnapshotBeforeCompactionParams { + + return &FindConfigSnapshotBeforeCompactionParams{ + + Context: ctx, + } +} + +// NewFindConfigSnapshotBeforeCompactionParamsWithHTTPClient creates a new FindConfigSnapshotBeforeCompactionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSnapshotBeforeCompactionParamsWithHTTPClient(client *http.Client) *FindConfigSnapshotBeforeCompactionParams { + + return &FindConfigSnapshotBeforeCompactionParams{ + HTTPClient: client, + } +} + +/*FindConfigSnapshotBeforeCompactionParams contains all the parameters to send to the API endpoint +for the find config snapshot before compaction operation typically these are written to a http.Request +*/ +type FindConfigSnapshotBeforeCompactionParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) WithTimeout(timeout time.Duration) *FindConfigSnapshotBeforeCompactionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) WithContext(ctx context.Context) *FindConfigSnapshotBeforeCompactionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) WithHTTPClient(client *http.Client) *FindConfigSnapshotBeforeCompactionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config snapshot before compaction params +func (o *FindConfigSnapshotBeforeCompactionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSnapshotBeforeCompactionParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_responses.go new file mode 100644 index 00000000000..0e63bb249b8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_snapshot_before_compaction_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSnapshotBeforeCompactionReader is a Reader for the FindConfigSnapshotBeforeCompaction structure. +type FindConfigSnapshotBeforeCompactionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSnapshotBeforeCompactionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSnapshotBeforeCompactionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSnapshotBeforeCompactionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSnapshotBeforeCompactionOK creates a FindConfigSnapshotBeforeCompactionOK with default headers values +func NewFindConfigSnapshotBeforeCompactionOK() *FindConfigSnapshotBeforeCompactionOK { + return &FindConfigSnapshotBeforeCompactionOK{} +} + +/*FindConfigSnapshotBeforeCompactionOK handles this case with default header values. + +Config value +*/ +type FindConfigSnapshotBeforeCompactionOK struct { + Payload bool +} + +func (o *FindConfigSnapshotBeforeCompactionOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigSnapshotBeforeCompactionOK) 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 +} + +// NewFindConfigSnapshotBeforeCompactionDefault creates a FindConfigSnapshotBeforeCompactionDefault with default headers values +func NewFindConfigSnapshotBeforeCompactionDefault(code int) *FindConfigSnapshotBeforeCompactionDefault { + return &FindConfigSnapshotBeforeCompactionDefault{ + _statusCode: code, + } +} + +/*FindConfigSnapshotBeforeCompactionDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSnapshotBeforeCompactionDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config snapshot before compaction default response +func (o *FindConfigSnapshotBeforeCompactionDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSnapshotBeforeCompactionDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSnapshotBeforeCompactionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSnapshotBeforeCompactionDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_parameters.go new file mode 100644 index 00000000000..4c82a513058 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSslStoragePortParams creates a new FindConfigSslStoragePortParams object +// with the default values initialized. +func NewFindConfigSslStoragePortParams() *FindConfigSslStoragePortParams { + + return &FindConfigSslStoragePortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSslStoragePortParamsWithTimeout creates a new FindConfigSslStoragePortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSslStoragePortParamsWithTimeout(timeout time.Duration) *FindConfigSslStoragePortParams { + + return &FindConfigSslStoragePortParams{ + + timeout: timeout, + } +} + +// NewFindConfigSslStoragePortParamsWithContext creates a new FindConfigSslStoragePortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSslStoragePortParamsWithContext(ctx context.Context) *FindConfigSslStoragePortParams { + + return &FindConfigSslStoragePortParams{ + + Context: ctx, + } +} + +// NewFindConfigSslStoragePortParamsWithHTTPClient creates a new FindConfigSslStoragePortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSslStoragePortParamsWithHTTPClient(client *http.Client) *FindConfigSslStoragePortParams { + + return &FindConfigSslStoragePortParams{ + HTTPClient: client, + } +} + +/*FindConfigSslStoragePortParams contains all the parameters to send to the API endpoint +for the find config ssl storage port operation typically these are written to a http.Request +*/ +type FindConfigSslStoragePortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) WithTimeout(timeout time.Duration) *FindConfigSslStoragePortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) WithContext(ctx context.Context) *FindConfigSslStoragePortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) WithHTTPClient(client *http.Client) *FindConfigSslStoragePortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config ssl storage port params +func (o *FindConfigSslStoragePortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSslStoragePortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_responses.go new file mode 100644 index 00000000000..1d5c4fb4b91 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_ssl_storage_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSslStoragePortReader is a Reader for the FindConfigSslStoragePort structure. +type FindConfigSslStoragePortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSslStoragePortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSslStoragePortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSslStoragePortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSslStoragePortOK creates a FindConfigSslStoragePortOK with default headers values +func NewFindConfigSslStoragePortOK() *FindConfigSslStoragePortOK { + return &FindConfigSslStoragePortOK{} +} + +/*FindConfigSslStoragePortOK handles this case with default header values. + +Config value +*/ +type FindConfigSslStoragePortOK struct { + Payload int64 +} + +func (o *FindConfigSslStoragePortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigSslStoragePortOK) 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 +} + +// NewFindConfigSslStoragePortDefault creates a FindConfigSslStoragePortDefault with default headers values +func NewFindConfigSslStoragePortDefault(code int) *FindConfigSslStoragePortDefault { + return &FindConfigSslStoragePortDefault{ + _statusCode: code, + } +} + +/*FindConfigSslStoragePortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSslStoragePortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config ssl storage port default response +func (o *FindConfigSslStoragePortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSslStoragePortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSslStoragePortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSslStoragePortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_parameters.go new file mode 100644 index 00000000000..646ea05393f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSstablePreemptiveOpenIntervalInMbParams creates a new FindConfigSstablePreemptiveOpenIntervalInMbParams object +// with the default values initialized. +func NewFindConfigSstablePreemptiveOpenIntervalInMbParams() *FindConfigSstablePreemptiveOpenIntervalInMbParams { + + return &FindConfigSstablePreemptiveOpenIntervalInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithTimeout creates a new FindConfigSstablePreemptiveOpenIntervalInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithTimeout(timeout time.Duration) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + + return &FindConfigSstablePreemptiveOpenIntervalInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithContext creates a new FindConfigSstablePreemptiveOpenIntervalInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithContext(ctx context.Context) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + + return &FindConfigSstablePreemptiveOpenIntervalInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithHTTPClient creates a new FindConfigSstablePreemptiveOpenIntervalInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSstablePreemptiveOpenIntervalInMbParamsWithHTTPClient(client *http.Client) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + + return &FindConfigSstablePreemptiveOpenIntervalInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigSstablePreemptiveOpenIntervalInMbParams contains all the parameters to send to the API endpoint +for the find config sstable preemptive open interval in mb operation typically these are written to a http.Request +*/ +type FindConfigSstablePreemptiveOpenIntervalInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) WithTimeout(timeout time.Duration) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) WithContext(ctx context.Context) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) WithHTTPClient(client *http.Client) *FindConfigSstablePreemptiveOpenIntervalInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config sstable preemptive open interval in mb params +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSstablePreemptiveOpenIntervalInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_responses.go new file mode 100644 index 00000000000..81af40a4c25 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_preemptive_open_interval_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSstablePreemptiveOpenIntervalInMbReader is a Reader for the FindConfigSstablePreemptiveOpenIntervalInMb structure. +type FindConfigSstablePreemptiveOpenIntervalInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSstablePreemptiveOpenIntervalInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSstablePreemptiveOpenIntervalInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSstablePreemptiveOpenIntervalInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSstablePreemptiveOpenIntervalInMbOK creates a FindConfigSstablePreemptiveOpenIntervalInMbOK with default headers values +func NewFindConfigSstablePreemptiveOpenIntervalInMbOK() *FindConfigSstablePreemptiveOpenIntervalInMbOK { + return &FindConfigSstablePreemptiveOpenIntervalInMbOK{} +} + +/*FindConfigSstablePreemptiveOpenIntervalInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigSstablePreemptiveOpenIntervalInMbOK struct { + Payload int64 +} + +func (o *FindConfigSstablePreemptiveOpenIntervalInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigSstablePreemptiveOpenIntervalInMbOK) 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 +} + +// NewFindConfigSstablePreemptiveOpenIntervalInMbDefault creates a FindConfigSstablePreemptiveOpenIntervalInMbDefault with default headers values +func NewFindConfigSstablePreemptiveOpenIntervalInMbDefault(code int) *FindConfigSstablePreemptiveOpenIntervalInMbDefault { + return &FindConfigSstablePreemptiveOpenIntervalInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigSstablePreemptiveOpenIntervalInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSstablePreemptiveOpenIntervalInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config sstable preemptive open interval in mb default response +func (o *FindConfigSstablePreemptiveOpenIntervalInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSstablePreemptiveOpenIntervalInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSstablePreemptiveOpenIntervalInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSstablePreemptiveOpenIntervalInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_parameters.go new file mode 100644 index 00000000000..a108ddfdc9f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigSstableSummaryRatioParams creates a new FindConfigSstableSummaryRatioParams object +// with the default values initialized. +func NewFindConfigSstableSummaryRatioParams() *FindConfigSstableSummaryRatioParams { + + return &FindConfigSstableSummaryRatioParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigSstableSummaryRatioParamsWithTimeout creates a new FindConfigSstableSummaryRatioParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigSstableSummaryRatioParamsWithTimeout(timeout time.Duration) *FindConfigSstableSummaryRatioParams { + + return &FindConfigSstableSummaryRatioParams{ + + timeout: timeout, + } +} + +// NewFindConfigSstableSummaryRatioParamsWithContext creates a new FindConfigSstableSummaryRatioParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigSstableSummaryRatioParamsWithContext(ctx context.Context) *FindConfigSstableSummaryRatioParams { + + return &FindConfigSstableSummaryRatioParams{ + + Context: ctx, + } +} + +// NewFindConfigSstableSummaryRatioParamsWithHTTPClient creates a new FindConfigSstableSummaryRatioParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigSstableSummaryRatioParamsWithHTTPClient(client *http.Client) *FindConfigSstableSummaryRatioParams { + + return &FindConfigSstableSummaryRatioParams{ + HTTPClient: client, + } +} + +/*FindConfigSstableSummaryRatioParams contains all the parameters to send to the API endpoint +for the find config sstable summary ratio operation typically these are written to a http.Request +*/ +type FindConfigSstableSummaryRatioParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) WithTimeout(timeout time.Duration) *FindConfigSstableSummaryRatioParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) WithContext(ctx context.Context) *FindConfigSstableSummaryRatioParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) WithHTTPClient(client *http.Client) *FindConfigSstableSummaryRatioParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config sstable summary ratio params +func (o *FindConfigSstableSummaryRatioParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigSstableSummaryRatioParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_responses.go new file mode 100644 index 00000000000..c108a9380af --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_sstable_summary_ratio_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigSstableSummaryRatioReader is a Reader for the FindConfigSstableSummaryRatio structure. +type FindConfigSstableSummaryRatioReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigSstableSummaryRatioReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigSstableSummaryRatioOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigSstableSummaryRatioDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigSstableSummaryRatioOK creates a FindConfigSstableSummaryRatioOK with default headers values +func NewFindConfigSstableSummaryRatioOK() *FindConfigSstableSummaryRatioOK { + return &FindConfigSstableSummaryRatioOK{} +} + +/*FindConfigSstableSummaryRatioOK handles this case with default header values. + +Config value +*/ +type FindConfigSstableSummaryRatioOK struct { + Payload float64 +} + +func (o *FindConfigSstableSummaryRatioOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigSstableSummaryRatioOK) 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 +} + +// NewFindConfigSstableSummaryRatioDefault creates a FindConfigSstableSummaryRatioDefault with default headers values +func NewFindConfigSstableSummaryRatioDefault(code int) *FindConfigSstableSummaryRatioDefault { + return &FindConfigSstableSummaryRatioDefault{ + _statusCode: code, + } +} + +/*FindConfigSstableSummaryRatioDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigSstableSummaryRatioDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config sstable summary ratio default response +func (o *FindConfigSstableSummaryRatioDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigSstableSummaryRatioDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigSstableSummaryRatioDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigSstableSummaryRatioDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_parameters.go new file mode 100644 index 00000000000..d0dc37b488c --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigStartNativeTransportParams creates a new FindConfigStartNativeTransportParams object +// with the default values initialized. +func NewFindConfigStartNativeTransportParams() *FindConfigStartNativeTransportParams { + + return &FindConfigStartNativeTransportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigStartNativeTransportParamsWithTimeout creates a new FindConfigStartNativeTransportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigStartNativeTransportParamsWithTimeout(timeout time.Duration) *FindConfigStartNativeTransportParams { + + return &FindConfigStartNativeTransportParams{ + + timeout: timeout, + } +} + +// NewFindConfigStartNativeTransportParamsWithContext creates a new FindConfigStartNativeTransportParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigStartNativeTransportParamsWithContext(ctx context.Context) *FindConfigStartNativeTransportParams { + + return &FindConfigStartNativeTransportParams{ + + Context: ctx, + } +} + +// NewFindConfigStartNativeTransportParamsWithHTTPClient creates a new FindConfigStartNativeTransportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigStartNativeTransportParamsWithHTTPClient(client *http.Client) *FindConfigStartNativeTransportParams { + + return &FindConfigStartNativeTransportParams{ + HTTPClient: client, + } +} + +/*FindConfigStartNativeTransportParams contains all the parameters to send to the API endpoint +for the find config start native transport operation typically these are written to a http.Request +*/ +type FindConfigStartNativeTransportParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) WithTimeout(timeout time.Duration) *FindConfigStartNativeTransportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) WithContext(ctx context.Context) *FindConfigStartNativeTransportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) WithHTTPClient(client *http.Client) *FindConfigStartNativeTransportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config start native transport params +func (o *FindConfigStartNativeTransportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigStartNativeTransportParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_responses.go new file mode 100644 index 00000000000..6bcc6bc90a7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_native_transport_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigStartNativeTransportReader is a Reader for the FindConfigStartNativeTransport structure. +type FindConfigStartNativeTransportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigStartNativeTransportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigStartNativeTransportOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigStartNativeTransportDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigStartNativeTransportOK creates a FindConfigStartNativeTransportOK with default headers values +func NewFindConfigStartNativeTransportOK() *FindConfigStartNativeTransportOK { + return &FindConfigStartNativeTransportOK{} +} + +/*FindConfigStartNativeTransportOK handles this case with default header values. + +Config value +*/ +type FindConfigStartNativeTransportOK struct { + Payload bool +} + +func (o *FindConfigStartNativeTransportOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigStartNativeTransportOK) 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 +} + +// NewFindConfigStartNativeTransportDefault creates a FindConfigStartNativeTransportDefault with default headers values +func NewFindConfigStartNativeTransportDefault(code int) *FindConfigStartNativeTransportDefault { + return &FindConfigStartNativeTransportDefault{ + _statusCode: code, + } +} + +/*FindConfigStartNativeTransportDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigStartNativeTransportDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config start native transport default response +func (o *FindConfigStartNativeTransportDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigStartNativeTransportDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigStartNativeTransportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigStartNativeTransportDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_parameters.go new file mode 100644 index 00000000000..0bfec62a847 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigStartRPCParams creates a new FindConfigStartRPCParams object +// with the default values initialized. +func NewFindConfigStartRPCParams() *FindConfigStartRPCParams { + + return &FindConfigStartRPCParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigStartRPCParamsWithTimeout creates a new FindConfigStartRPCParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigStartRPCParamsWithTimeout(timeout time.Duration) *FindConfigStartRPCParams { + + return &FindConfigStartRPCParams{ + + timeout: timeout, + } +} + +// NewFindConfigStartRPCParamsWithContext creates a new FindConfigStartRPCParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigStartRPCParamsWithContext(ctx context.Context) *FindConfigStartRPCParams { + + return &FindConfigStartRPCParams{ + + Context: ctx, + } +} + +// NewFindConfigStartRPCParamsWithHTTPClient creates a new FindConfigStartRPCParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigStartRPCParamsWithHTTPClient(client *http.Client) *FindConfigStartRPCParams { + + return &FindConfigStartRPCParams{ + HTTPClient: client, + } +} + +/*FindConfigStartRPCParams contains all the parameters to send to the API endpoint +for the find config start rpc operation typically these are written to a http.Request +*/ +type FindConfigStartRPCParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config start rpc params +func (o *FindConfigStartRPCParams) WithTimeout(timeout time.Duration) *FindConfigStartRPCParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config start rpc params +func (o *FindConfigStartRPCParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config start rpc params +func (o *FindConfigStartRPCParams) WithContext(ctx context.Context) *FindConfigStartRPCParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config start rpc params +func (o *FindConfigStartRPCParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config start rpc params +func (o *FindConfigStartRPCParams) WithHTTPClient(client *http.Client) *FindConfigStartRPCParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config start rpc params +func (o *FindConfigStartRPCParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigStartRPCParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_responses.go new file mode 100644 index 00000000000..478acb60480 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_start_rpc_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigStartRPCReader is a Reader for the FindConfigStartRPC structure. +type FindConfigStartRPCReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigStartRPCReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigStartRPCOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigStartRPCDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigStartRPCOK creates a FindConfigStartRPCOK with default headers values +func NewFindConfigStartRPCOK() *FindConfigStartRPCOK { + return &FindConfigStartRPCOK{} +} + +/*FindConfigStartRPCOK handles this case with default header values. + +Config value +*/ +type FindConfigStartRPCOK struct { + Payload bool +} + +func (o *FindConfigStartRPCOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigStartRPCOK) 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 +} + +// NewFindConfigStartRPCDefault creates a FindConfigStartRPCDefault with default headers values +func NewFindConfigStartRPCDefault(code int) *FindConfigStartRPCDefault { + return &FindConfigStartRPCDefault{ + _statusCode: code, + } +} + +/*FindConfigStartRPCDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigStartRPCDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config start rpc default response +func (o *FindConfigStartRPCDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigStartRPCDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigStartRPCDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigStartRPCDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_parameters.go new file mode 100644 index 00000000000..6030052bd06 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigStoragePortParams creates a new FindConfigStoragePortParams object +// with the default values initialized. +func NewFindConfigStoragePortParams() *FindConfigStoragePortParams { + + return &FindConfigStoragePortParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigStoragePortParamsWithTimeout creates a new FindConfigStoragePortParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigStoragePortParamsWithTimeout(timeout time.Duration) *FindConfigStoragePortParams { + + return &FindConfigStoragePortParams{ + + timeout: timeout, + } +} + +// NewFindConfigStoragePortParamsWithContext creates a new FindConfigStoragePortParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigStoragePortParamsWithContext(ctx context.Context) *FindConfigStoragePortParams { + + return &FindConfigStoragePortParams{ + + Context: ctx, + } +} + +// NewFindConfigStoragePortParamsWithHTTPClient creates a new FindConfigStoragePortParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigStoragePortParamsWithHTTPClient(client *http.Client) *FindConfigStoragePortParams { + + return &FindConfigStoragePortParams{ + HTTPClient: client, + } +} + +/*FindConfigStoragePortParams contains all the parameters to send to the API endpoint +for the find config storage port operation typically these are written to a http.Request +*/ +type FindConfigStoragePortParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config storage port params +func (o *FindConfigStoragePortParams) WithTimeout(timeout time.Duration) *FindConfigStoragePortParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config storage port params +func (o *FindConfigStoragePortParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config storage port params +func (o *FindConfigStoragePortParams) WithContext(ctx context.Context) *FindConfigStoragePortParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config storage port params +func (o *FindConfigStoragePortParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config storage port params +func (o *FindConfigStoragePortParams) WithHTTPClient(client *http.Client) *FindConfigStoragePortParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config storage port params +func (o *FindConfigStoragePortParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigStoragePortParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_responses.go new file mode 100644 index 00000000000..e40038ca3c5 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_storage_port_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigStoragePortReader is a Reader for the FindConfigStoragePort structure. +type FindConfigStoragePortReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigStoragePortReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigStoragePortOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigStoragePortDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigStoragePortOK creates a FindConfigStoragePortOK with default headers values +func NewFindConfigStoragePortOK() *FindConfigStoragePortOK { + return &FindConfigStoragePortOK{} +} + +/*FindConfigStoragePortOK handles this case with default header values. + +Config value +*/ +type FindConfigStoragePortOK struct { + Payload int64 +} + +func (o *FindConfigStoragePortOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigStoragePortOK) 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 +} + +// NewFindConfigStoragePortDefault creates a FindConfigStoragePortDefault with default headers values +func NewFindConfigStoragePortDefault(code int) *FindConfigStoragePortDefault { + return &FindConfigStoragePortDefault{ + _statusCode: code, + } +} + +/*FindConfigStoragePortDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigStoragePortDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config storage port default response +func (o *FindConfigStoragePortDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigStoragePortDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigStoragePortDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigStoragePortDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_parameters.go new file mode 100644 index 00000000000..d487fa479d3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecParams creates a new FindConfigStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized. +func NewFindConfigStreamThroughputOutboundMegabitsPerSecParams() *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigStreamThroughputOutboundMegabitsPerSecParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithTimeout creates a new FindConfigStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithTimeout(timeout time.Duration) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigStreamThroughputOutboundMegabitsPerSecParams{ + + timeout: timeout, + } +} + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithContext creates a new FindConfigStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithContext(ctx context.Context) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigStreamThroughputOutboundMegabitsPerSecParams{ + + Context: ctx, + } +} + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithHTTPClient creates a new FindConfigStreamThroughputOutboundMegabitsPerSecParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigStreamThroughputOutboundMegabitsPerSecParamsWithHTTPClient(client *http.Client) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + + return &FindConfigStreamThroughputOutboundMegabitsPerSecParams{ + HTTPClient: client, + } +} + +/*FindConfigStreamThroughputOutboundMegabitsPerSecParams contains all the parameters to send to the API endpoint +for the find config stream throughput outbound megabits per sec operation typically these are written to a http.Request +*/ +type FindConfigStreamThroughputOutboundMegabitsPerSecParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) WithTimeout(timeout time.Duration) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) WithContext(ctx context.Context) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) WithHTTPClient(client *http.Client) *FindConfigStreamThroughputOutboundMegabitsPerSecParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config stream throughput outbound megabits per sec params +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_responses.go new file mode 100644 index 00000000000..35a402f34fb --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_stream_throughput_outbound_megabits_per_sec_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigStreamThroughputOutboundMegabitsPerSecReader is a Reader for the FindConfigStreamThroughputOutboundMegabitsPerSec structure. +type FindConfigStreamThroughputOutboundMegabitsPerSecReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigStreamThroughputOutboundMegabitsPerSecOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigStreamThroughputOutboundMegabitsPerSecDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecOK creates a FindConfigStreamThroughputOutboundMegabitsPerSecOK with default headers values +func NewFindConfigStreamThroughputOutboundMegabitsPerSecOK() *FindConfigStreamThroughputOutboundMegabitsPerSecOK { + return &FindConfigStreamThroughputOutboundMegabitsPerSecOK{} +} + +/*FindConfigStreamThroughputOutboundMegabitsPerSecOK handles this case with default header values. + +Config value +*/ +type FindConfigStreamThroughputOutboundMegabitsPerSecOK struct { + Payload int64 +} + +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecOK) 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 +} + +// NewFindConfigStreamThroughputOutboundMegabitsPerSecDefault creates a FindConfigStreamThroughputOutboundMegabitsPerSecDefault with default headers values +func NewFindConfigStreamThroughputOutboundMegabitsPerSecDefault(code int) *FindConfigStreamThroughputOutboundMegabitsPerSecDefault { + return &FindConfigStreamThroughputOutboundMegabitsPerSecDefault{ + _statusCode: code, + } +} + +/*FindConfigStreamThroughputOutboundMegabitsPerSecDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigStreamThroughputOutboundMegabitsPerSecDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config stream throughput outbound megabits per sec default response +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigStreamThroughputOutboundMegabitsPerSecDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..6918535cd54 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigStreamingSocketTimeoutInMsParams creates a new FindConfigStreamingSocketTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigStreamingSocketTimeoutInMsParams() *FindConfigStreamingSocketTimeoutInMsParams { + + return &FindConfigStreamingSocketTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigStreamingSocketTimeoutInMsParamsWithTimeout creates a new FindConfigStreamingSocketTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigStreamingSocketTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigStreamingSocketTimeoutInMsParams { + + return &FindConfigStreamingSocketTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigStreamingSocketTimeoutInMsParamsWithContext creates a new FindConfigStreamingSocketTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigStreamingSocketTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigStreamingSocketTimeoutInMsParams { + + return &FindConfigStreamingSocketTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigStreamingSocketTimeoutInMsParamsWithHTTPClient creates a new FindConfigStreamingSocketTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigStreamingSocketTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigStreamingSocketTimeoutInMsParams { + + return &FindConfigStreamingSocketTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigStreamingSocketTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config streaming socket timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigStreamingSocketTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigStreamingSocketTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigStreamingSocketTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigStreamingSocketTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config streaming socket timeout in ms params +func (o *FindConfigStreamingSocketTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigStreamingSocketTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_responses.go new file mode 100644 index 00000000000..68eb3bf3ce8 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_streaming_socket_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigStreamingSocketTimeoutInMsReader is a Reader for the FindConfigStreamingSocketTimeoutInMs structure. +type FindConfigStreamingSocketTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigStreamingSocketTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigStreamingSocketTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigStreamingSocketTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigStreamingSocketTimeoutInMsOK creates a FindConfigStreamingSocketTimeoutInMsOK with default headers values +func NewFindConfigStreamingSocketTimeoutInMsOK() *FindConfigStreamingSocketTimeoutInMsOK { + return &FindConfigStreamingSocketTimeoutInMsOK{} +} + +/*FindConfigStreamingSocketTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigStreamingSocketTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigStreamingSocketTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigStreamingSocketTimeoutInMsOK) 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 +} + +// NewFindConfigStreamingSocketTimeoutInMsDefault creates a FindConfigStreamingSocketTimeoutInMsDefault with default headers values +func NewFindConfigStreamingSocketTimeoutInMsDefault(code int) *FindConfigStreamingSocketTimeoutInMsDefault { + return &FindConfigStreamingSocketTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigStreamingSocketTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigStreamingSocketTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config streaming socket timeout in ms default response +func (o *FindConfigStreamingSocketTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigStreamingSocketTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigStreamingSocketTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigStreamingSocketTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_parameters.go new file mode 100644 index 00000000000..f86772cb6cf --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigThriftFramedTransportSizeInMbParams creates a new FindConfigThriftFramedTransportSizeInMbParams object +// with the default values initialized. +func NewFindConfigThriftFramedTransportSizeInMbParams() *FindConfigThriftFramedTransportSizeInMbParams { + + return &FindConfigThriftFramedTransportSizeInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigThriftFramedTransportSizeInMbParamsWithTimeout creates a new FindConfigThriftFramedTransportSizeInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigThriftFramedTransportSizeInMbParamsWithTimeout(timeout time.Duration) *FindConfigThriftFramedTransportSizeInMbParams { + + return &FindConfigThriftFramedTransportSizeInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigThriftFramedTransportSizeInMbParamsWithContext creates a new FindConfigThriftFramedTransportSizeInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigThriftFramedTransportSizeInMbParamsWithContext(ctx context.Context) *FindConfigThriftFramedTransportSizeInMbParams { + + return &FindConfigThriftFramedTransportSizeInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigThriftFramedTransportSizeInMbParamsWithHTTPClient creates a new FindConfigThriftFramedTransportSizeInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigThriftFramedTransportSizeInMbParamsWithHTTPClient(client *http.Client) *FindConfigThriftFramedTransportSizeInMbParams { + + return &FindConfigThriftFramedTransportSizeInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigThriftFramedTransportSizeInMbParams contains all the parameters to send to the API endpoint +for the find config thrift framed transport size in mb operation typically these are written to a http.Request +*/ +type FindConfigThriftFramedTransportSizeInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) WithTimeout(timeout time.Duration) *FindConfigThriftFramedTransportSizeInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) WithContext(ctx context.Context) *FindConfigThriftFramedTransportSizeInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) WithHTTPClient(client *http.Client) *FindConfigThriftFramedTransportSizeInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config thrift framed transport size in mb params +func (o *FindConfigThriftFramedTransportSizeInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigThriftFramedTransportSizeInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_responses.go new file mode 100644 index 00000000000..8203fa53ff9 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_framed_transport_size_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigThriftFramedTransportSizeInMbReader is a Reader for the FindConfigThriftFramedTransportSizeInMb structure. +type FindConfigThriftFramedTransportSizeInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigThriftFramedTransportSizeInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigThriftFramedTransportSizeInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigThriftFramedTransportSizeInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigThriftFramedTransportSizeInMbOK creates a FindConfigThriftFramedTransportSizeInMbOK with default headers values +func NewFindConfigThriftFramedTransportSizeInMbOK() *FindConfigThriftFramedTransportSizeInMbOK { + return &FindConfigThriftFramedTransportSizeInMbOK{} +} + +/*FindConfigThriftFramedTransportSizeInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigThriftFramedTransportSizeInMbOK struct { + Payload int64 +} + +func (o *FindConfigThriftFramedTransportSizeInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigThriftFramedTransportSizeInMbOK) 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 +} + +// NewFindConfigThriftFramedTransportSizeInMbDefault creates a FindConfigThriftFramedTransportSizeInMbDefault with default headers values +func NewFindConfigThriftFramedTransportSizeInMbDefault(code int) *FindConfigThriftFramedTransportSizeInMbDefault { + return &FindConfigThriftFramedTransportSizeInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigThriftFramedTransportSizeInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigThriftFramedTransportSizeInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config thrift framed transport size in mb default response +func (o *FindConfigThriftFramedTransportSizeInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigThriftFramedTransportSizeInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigThriftFramedTransportSizeInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigThriftFramedTransportSizeInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_parameters.go new file mode 100644 index 00000000000..c1da9f68be6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigThriftMaxMessageLengthInMbParams creates a new FindConfigThriftMaxMessageLengthInMbParams object +// with the default values initialized. +func NewFindConfigThriftMaxMessageLengthInMbParams() *FindConfigThriftMaxMessageLengthInMbParams { + + return &FindConfigThriftMaxMessageLengthInMbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigThriftMaxMessageLengthInMbParamsWithTimeout creates a new FindConfigThriftMaxMessageLengthInMbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigThriftMaxMessageLengthInMbParamsWithTimeout(timeout time.Duration) *FindConfigThriftMaxMessageLengthInMbParams { + + return &FindConfigThriftMaxMessageLengthInMbParams{ + + timeout: timeout, + } +} + +// NewFindConfigThriftMaxMessageLengthInMbParamsWithContext creates a new FindConfigThriftMaxMessageLengthInMbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigThriftMaxMessageLengthInMbParamsWithContext(ctx context.Context) *FindConfigThriftMaxMessageLengthInMbParams { + + return &FindConfigThriftMaxMessageLengthInMbParams{ + + Context: ctx, + } +} + +// NewFindConfigThriftMaxMessageLengthInMbParamsWithHTTPClient creates a new FindConfigThriftMaxMessageLengthInMbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigThriftMaxMessageLengthInMbParamsWithHTTPClient(client *http.Client) *FindConfigThriftMaxMessageLengthInMbParams { + + return &FindConfigThriftMaxMessageLengthInMbParams{ + HTTPClient: client, + } +} + +/*FindConfigThriftMaxMessageLengthInMbParams contains all the parameters to send to the API endpoint +for the find config thrift max message length in mb operation typically these are written to a http.Request +*/ +type FindConfigThriftMaxMessageLengthInMbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) WithTimeout(timeout time.Duration) *FindConfigThriftMaxMessageLengthInMbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) WithContext(ctx context.Context) *FindConfigThriftMaxMessageLengthInMbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) WithHTTPClient(client *http.Client) *FindConfigThriftMaxMessageLengthInMbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config thrift max message length in mb params +func (o *FindConfigThriftMaxMessageLengthInMbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigThriftMaxMessageLengthInMbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_responses.go new file mode 100644 index 00000000000..62c9211bbf1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_thrift_max_message_length_in_mb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigThriftMaxMessageLengthInMbReader is a Reader for the FindConfigThriftMaxMessageLengthInMb structure. +type FindConfigThriftMaxMessageLengthInMbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigThriftMaxMessageLengthInMbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigThriftMaxMessageLengthInMbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigThriftMaxMessageLengthInMbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigThriftMaxMessageLengthInMbOK creates a FindConfigThriftMaxMessageLengthInMbOK with default headers values +func NewFindConfigThriftMaxMessageLengthInMbOK() *FindConfigThriftMaxMessageLengthInMbOK { + return &FindConfigThriftMaxMessageLengthInMbOK{} +} + +/*FindConfigThriftMaxMessageLengthInMbOK handles this case with default header values. + +Config value +*/ +type FindConfigThriftMaxMessageLengthInMbOK struct { + Payload int64 +} + +func (o *FindConfigThriftMaxMessageLengthInMbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigThriftMaxMessageLengthInMbOK) 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 +} + +// NewFindConfigThriftMaxMessageLengthInMbDefault creates a FindConfigThriftMaxMessageLengthInMbDefault with default headers values +func NewFindConfigThriftMaxMessageLengthInMbDefault(code int) *FindConfigThriftMaxMessageLengthInMbDefault { + return &FindConfigThriftMaxMessageLengthInMbDefault{ + _statusCode: code, + } +} + +/*FindConfigThriftMaxMessageLengthInMbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigThriftMaxMessageLengthInMbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config thrift max message length in mb default response +func (o *FindConfigThriftMaxMessageLengthInMbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigThriftMaxMessageLengthInMbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigThriftMaxMessageLengthInMbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigThriftMaxMessageLengthInMbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_parameters.go new file mode 100644 index 00000000000..a9ae6aa7715 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigTombstoneFailureThresholdParams creates a new FindConfigTombstoneFailureThresholdParams object +// with the default values initialized. +func NewFindConfigTombstoneFailureThresholdParams() *FindConfigTombstoneFailureThresholdParams { + + return &FindConfigTombstoneFailureThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigTombstoneFailureThresholdParamsWithTimeout creates a new FindConfigTombstoneFailureThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigTombstoneFailureThresholdParamsWithTimeout(timeout time.Duration) *FindConfigTombstoneFailureThresholdParams { + + return &FindConfigTombstoneFailureThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigTombstoneFailureThresholdParamsWithContext creates a new FindConfigTombstoneFailureThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigTombstoneFailureThresholdParamsWithContext(ctx context.Context) *FindConfigTombstoneFailureThresholdParams { + + return &FindConfigTombstoneFailureThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigTombstoneFailureThresholdParamsWithHTTPClient creates a new FindConfigTombstoneFailureThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigTombstoneFailureThresholdParamsWithHTTPClient(client *http.Client) *FindConfigTombstoneFailureThresholdParams { + + return &FindConfigTombstoneFailureThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigTombstoneFailureThresholdParams contains all the parameters to send to the API endpoint +for the find config tombstone failure threshold operation typically these are written to a http.Request +*/ +type FindConfigTombstoneFailureThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) WithTimeout(timeout time.Duration) *FindConfigTombstoneFailureThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) WithContext(ctx context.Context) *FindConfigTombstoneFailureThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) WithHTTPClient(client *http.Client) *FindConfigTombstoneFailureThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config tombstone failure threshold params +func (o *FindConfigTombstoneFailureThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigTombstoneFailureThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_responses.go new file mode 100644 index 00000000000..f4f33d1a74b --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_failure_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigTombstoneFailureThresholdReader is a Reader for the FindConfigTombstoneFailureThreshold structure. +type FindConfigTombstoneFailureThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigTombstoneFailureThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigTombstoneFailureThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigTombstoneFailureThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigTombstoneFailureThresholdOK creates a FindConfigTombstoneFailureThresholdOK with default headers values +func NewFindConfigTombstoneFailureThresholdOK() *FindConfigTombstoneFailureThresholdOK { + return &FindConfigTombstoneFailureThresholdOK{} +} + +/*FindConfigTombstoneFailureThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigTombstoneFailureThresholdOK struct { + Payload int64 +} + +func (o *FindConfigTombstoneFailureThresholdOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigTombstoneFailureThresholdOK) 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 +} + +// NewFindConfigTombstoneFailureThresholdDefault creates a FindConfigTombstoneFailureThresholdDefault with default headers values +func NewFindConfigTombstoneFailureThresholdDefault(code int) *FindConfigTombstoneFailureThresholdDefault { + return &FindConfigTombstoneFailureThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigTombstoneFailureThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigTombstoneFailureThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config tombstone failure threshold default response +func (o *FindConfigTombstoneFailureThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigTombstoneFailureThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigTombstoneFailureThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigTombstoneFailureThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_parameters.go new file mode 100644 index 00000000000..351f20d365a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigTombstoneWarnThresholdParams creates a new FindConfigTombstoneWarnThresholdParams object +// with the default values initialized. +func NewFindConfigTombstoneWarnThresholdParams() *FindConfigTombstoneWarnThresholdParams { + + return &FindConfigTombstoneWarnThresholdParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigTombstoneWarnThresholdParamsWithTimeout creates a new FindConfigTombstoneWarnThresholdParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigTombstoneWarnThresholdParamsWithTimeout(timeout time.Duration) *FindConfigTombstoneWarnThresholdParams { + + return &FindConfigTombstoneWarnThresholdParams{ + + timeout: timeout, + } +} + +// NewFindConfigTombstoneWarnThresholdParamsWithContext creates a new FindConfigTombstoneWarnThresholdParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigTombstoneWarnThresholdParamsWithContext(ctx context.Context) *FindConfigTombstoneWarnThresholdParams { + + return &FindConfigTombstoneWarnThresholdParams{ + + Context: ctx, + } +} + +// NewFindConfigTombstoneWarnThresholdParamsWithHTTPClient creates a new FindConfigTombstoneWarnThresholdParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigTombstoneWarnThresholdParamsWithHTTPClient(client *http.Client) *FindConfigTombstoneWarnThresholdParams { + + return &FindConfigTombstoneWarnThresholdParams{ + HTTPClient: client, + } +} + +/*FindConfigTombstoneWarnThresholdParams contains all the parameters to send to the API endpoint +for the find config tombstone warn threshold operation typically these are written to a http.Request +*/ +type FindConfigTombstoneWarnThresholdParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) WithTimeout(timeout time.Duration) *FindConfigTombstoneWarnThresholdParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) WithContext(ctx context.Context) *FindConfigTombstoneWarnThresholdParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) WithHTTPClient(client *http.Client) *FindConfigTombstoneWarnThresholdParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config tombstone warn threshold params +func (o *FindConfigTombstoneWarnThresholdParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigTombstoneWarnThresholdParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_responses.go new file mode 100644 index 00000000000..abd56eb559a --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_tombstone_warn_threshold_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigTombstoneWarnThresholdReader is a Reader for the FindConfigTombstoneWarnThreshold structure. +type FindConfigTombstoneWarnThresholdReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigTombstoneWarnThresholdReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigTombstoneWarnThresholdOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigTombstoneWarnThresholdDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigTombstoneWarnThresholdOK creates a FindConfigTombstoneWarnThresholdOK with default headers values +func NewFindConfigTombstoneWarnThresholdOK() *FindConfigTombstoneWarnThresholdOK { + return &FindConfigTombstoneWarnThresholdOK{} +} + +/*FindConfigTombstoneWarnThresholdOK handles this case with default header values. + +Config value +*/ +type FindConfigTombstoneWarnThresholdOK struct { + Payload int64 +} + +func (o *FindConfigTombstoneWarnThresholdOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigTombstoneWarnThresholdOK) 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 +} + +// NewFindConfigTombstoneWarnThresholdDefault creates a FindConfigTombstoneWarnThresholdDefault with default headers values +func NewFindConfigTombstoneWarnThresholdDefault(code int) *FindConfigTombstoneWarnThresholdDefault { + return &FindConfigTombstoneWarnThresholdDefault{ + _statusCode: code, + } +} + +/*FindConfigTombstoneWarnThresholdDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigTombstoneWarnThresholdDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config tombstone warn threshold default response +func (o *FindConfigTombstoneWarnThresholdDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigTombstoneWarnThresholdDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigTombstoneWarnThresholdDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigTombstoneWarnThresholdDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_parameters.go new file mode 100644 index 00000000000..901fe65e55f --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigTrickleFsyncIntervalInKbParams creates a new FindConfigTrickleFsyncIntervalInKbParams object +// with the default values initialized. +func NewFindConfigTrickleFsyncIntervalInKbParams() *FindConfigTrickleFsyncIntervalInKbParams { + + return &FindConfigTrickleFsyncIntervalInKbParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigTrickleFsyncIntervalInKbParamsWithTimeout creates a new FindConfigTrickleFsyncIntervalInKbParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigTrickleFsyncIntervalInKbParamsWithTimeout(timeout time.Duration) *FindConfigTrickleFsyncIntervalInKbParams { + + return &FindConfigTrickleFsyncIntervalInKbParams{ + + timeout: timeout, + } +} + +// NewFindConfigTrickleFsyncIntervalInKbParamsWithContext creates a new FindConfigTrickleFsyncIntervalInKbParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigTrickleFsyncIntervalInKbParamsWithContext(ctx context.Context) *FindConfigTrickleFsyncIntervalInKbParams { + + return &FindConfigTrickleFsyncIntervalInKbParams{ + + Context: ctx, + } +} + +// NewFindConfigTrickleFsyncIntervalInKbParamsWithHTTPClient creates a new FindConfigTrickleFsyncIntervalInKbParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigTrickleFsyncIntervalInKbParamsWithHTTPClient(client *http.Client) *FindConfigTrickleFsyncIntervalInKbParams { + + return &FindConfigTrickleFsyncIntervalInKbParams{ + HTTPClient: client, + } +} + +/*FindConfigTrickleFsyncIntervalInKbParams contains all the parameters to send to the API endpoint +for the find config trickle fsync interval in kb operation typically these are written to a http.Request +*/ +type FindConfigTrickleFsyncIntervalInKbParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) WithTimeout(timeout time.Duration) *FindConfigTrickleFsyncIntervalInKbParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) WithContext(ctx context.Context) *FindConfigTrickleFsyncIntervalInKbParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) WithHTTPClient(client *http.Client) *FindConfigTrickleFsyncIntervalInKbParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config trickle fsync interval in kb params +func (o *FindConfigTrickleFsyncIntervalInKbParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigTrickleFsyncIntervalInKbParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_responses.go new file mode 100644 index 00000000000..7545d5c4abe --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_interval_in_kb_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigTrickleFsyncIntervalInKbReader is a Reader for the FindConfigTrickleFsyncIntervalInKb structure. +type FindConfigTrickleFsyncIntervalInKbReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigTrickleFsyncIntervalInKbReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigTrickleFsyncIntervalInKbOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigTrickleFsyncIntervalInKbDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigTrickleFsyncIntervalInKbOK creates a FindConfigTrickleFsyncIntervalInKbOK with default headers values +func NewFindConfigTrickleFsyncIntervalInKbOK() *FindConfigTrickleFsyncIntervalInKbOK { + return &FindConfigTrickleFsyncIntervalInKbOK{} +} + +/*FindConfigTrickleFsyncIntervalInKbOK handles this case with default header values. + +Config value +*/ +type FindConfigTrickleFsyncIntervalInKbOK struct { + Payload int64 +} + +func (o *FindConfigTrickleFsyncIntervalInKbOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigTrickleFsyncIntervalInKbOK) 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 +} + +// NewFindConfigTrickleFsyncIntervalInKbDefault creates a FindConfigTrickleFsyncIntervalInKbDefault with default headers values +func NewFindConfigTrickleFsyncIntervalInKbDefault(code int) *FindConfigTrickleFsyncIntervalInKbDefault { + return &FindConfigTrickleFsyncIntervalInKbDefault{ + _statusCode: code, + } +} + +/*FindConfigTrickleFsyncIntervalInKbDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigTrickleFsyncIntervalInKbDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config trickle fsync interval in kb default response +func (o *FindConfigTrickleFsyncIntervalInKbDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigTrickleFsyncIntervalInKbDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigTrickleFsyncIntervalInKbDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigTrickleFsyncIntervalInKbDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_parameters.go new file mode 100644 index 00000000000..9e21d2fd0ee --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigTrickleFsyncParams creates a new FindConfigTrickleFsyncParams object +// with the default values initialized. +func NewFindConfigTrickleFsyncParams() *FindConfigTrickleFsyncParams { + + return &FindConfigTrickleFsyncParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigTrickleFsyncParamsWithTimeout creates a new FindConfigTrickleFsyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigTrickleFsyncParamsWithTimeout(timeout time.Duration) *FindConfigTrickleFsyncParams { + + return &FindConfigTrickleFsyncParams{ + + timeout: timeout, + } +} + +// NewFindConfigTrickleFsyncParamsWithContext creates a new FindConfigTrickleFsyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigTrickleFsyncParamsWithContext(ctx context.Context) *FindConfigTrickleFsyncParams { + + return &FindConfigTrickleFsyncParams{ + + Context: ctx, + } +} + +// NewFindConfigTrickleFsyncParamsWithHTTPClient creates a new FindConfigTrickleFsyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigTrickleFsyncParamsWithHTTPClient(client *http.Client) *FindConfigTrickleFsyncParams { + + return &FindConfigTrickleFsyncParams{ + HTTPClient: client, + } +} + +/*FindConfigTrickleFsyncParams contains all the parameters to send to the API endpoint +for the find config trickle fsync operation typically these are written to a http.Request +*/ +type FindConfigTrickleFsyncParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) WithTimeout(timeout time.Duration) *FindConfigTrickleFsyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) WithContext(ctx context.Context) *FindConfigTrickleFsyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) WithHTTPClient(client *http.Client) *FindConfigTrickleFsyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config trickle fsync params +func (o *FindConfigTrickleFsyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigTrickleFsyncParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_responses.go new file mode 100644 index 00000000000..99521749aad --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_trickle_fsync_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigTrickleFsyncReader is a Reader for the FindConfigTrickleFsync structure. +type FindConfigTrickleFsyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigTrickleFsyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigTrickleFsyncOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigTrickleFsyncDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigTrickleFsyncOK creates a FindConfigTrickleFsyncOK with default headers values +func NewFindConfigTrickleFsyncOK() *FindConfigTrickleFsyncOK { + return &FindConfigTrickleFsyncOK{} +} + +/*FindConfigTrickleFsyncOK handles this case with default header values. + +Config value +*/ +type FindConfigTrickleFsyncOK struct { + Payload bool +} + +func (o *FindConfigTrickleFsyncOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigTrickleFsyncOK) 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 +} + +// NewFindConfigTrickleFsyncDefault creates a FindConfigTrickleFsyncDefault with default headers values +func NewFindConfigTrickleFsyncDefault(code int) *FindConfigTrickleFsyncDefault { + return &FindConfigTrickleFsyncDefault{ + _statusCode: code, + } +} + +/*FindConfigTrickleFsyncDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigTrickleFsyncDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config trickle fsync default response +func (o *FindConfigTrickleFsyncDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigTrickleFsyncDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigTrickleFsyncDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigTrickleFsyncDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..d8a49fda822 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigTruncateRequestTimeoutInMsParams creates a new FindConfigTruncateRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigTruncateRequestTimeoutInMsParams() *FindConfigTruncateRequestTimeoutInMsParams { + + return &FindConfigTruncateRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigTruncateRequestTimeoutInMsParamsWithTimeout creates a new FindConfigTruncateRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigTruncateRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigTruncateRequestTimeoutInMsParams { + + return &FindConfigTruncateRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigTruncateRequestTimeoutInMsParamsWithContext creates a new FindConfigTruncateRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigTruncateRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigTruncateRequestTimeoutInMsParams { + + return &FindConfigTruncateRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigTruncateRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigTruncateRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigTruncateRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigTruncateRequestTimeoutInMsParams { + + return &FindConfigTruncateRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigTruncateRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config truncate request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigTruncateRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigTruncateRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigTruncateRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigTruncateRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config truncate request timeout in ms params +func (o *FindConfigTruncateRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigTruncateRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..2d6ecf564cc --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_truncate_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigTruncateRequestTimeoutInMsReader is a Reader for the FindConfigTruncateRequestTimeoutInMs structure. +type FindConfigTruncateRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigTruncateRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigTruncateRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigTruncateRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigTruncateRequestTimeoutInMsOK creates a FindConfigTruncateRequestTimeoutInMsOK with default headers values +func NewFindConfigTruncateRequestTimeoutInMsOK() *FindConfigTruncateRequestTimeoutInMsOK { + return &FindConfigTruncateRequestTimeoutInMsOK{} +} + +/*FindConfigTruncateRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigTruncateRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigTruncateRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigTruncateRequestTimeoutInMsOK) 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 +} + +// NewFindConfigTruncateRequestTimeoutInMsDefault creates a FindConfigTruncateRequestTimeoutInMsDefault with default headers values +func NewFindConfigTruncateRequestTimeoutInMsDefault(code int) *FindConfigTruncateRequestTimeoutInMsDefault { + return &FindConfigTruncateRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigTruncateRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigTruncateRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config truncate request timeout in ms default response +func (o *FindConfigTruncateRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigTruncateRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigTruncateRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigTruncateRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_parameters.go new file mode 100644 index 00000000000..4fb5491ebd1 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigViewBuildingParams creates a new FindConfigViewBuildingParams object +// with the default values initialized. +func NewFindConfigViewBuildingParams() *FindConfigViewBuildingParams { + + return &FindConfigViewBuildingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigViewBuildingParamsWithTimeout creates a new FindConfigViewBuildingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigViewBuildingParamsWithTimeout(timeout time.Duration) *FindConfigViewBuildingParams { + + return &FindConfigViewBuildingParams{ + + timeout: timeout, + } +} + +// NewFindConfigViewBuildingParamsWithContext creates a new FindConfigViewBuildingParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigViewBuildingParamsWithContext(ctx context.Context) *FindConfigViewBuildingParams { + + return &FindConfigViewBuildingParams{ + + Context: ctx, + } +} + +// NewFindConfigViewBuildingParamsWithHTTPClient creates a new FindConfigViewBuildingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigViewBuildingParamsWithHTTPClient(client *http.Client) *FindConfigViewBuildingParams { + + return &FindConfigViewBuildingParams{ + HTTPClient: client, + } +} + +/*FindConfigViewBuildingParams contains all the parameters to send to the API endpoint +for the find config view building operation typically these are written to a http.Request +*/ +type FindConfigViewBuildingParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config view building params +func (o *FindConfigViewBuildingParams) WithTimeout(timeout time.Duration) *FindConfigViewBuildingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config view building params +func (o *FindConfigViewBuildingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config view building params +func (o *FindConfigViewBuildingParams) WithContext(ctx context.Context) *FindConfigViewBuildingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config view building params +func (o *FindConfigViewBuildingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config view building params +func (o *FindConfigViewBuildingParams) WithHTTPClient(client *http.Client) *FindConfigViewBuildingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config view building params +func (o *FindConfigViewBuildingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigViewBuildingParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_responses.go new file mode 100644 index 00000000000..b9aa49723f6 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_building_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigViewBuildingReader is a Reader for the FindConfigViewBuilding structure. +type FindConfigViewBuildingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigViewBuildingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigViewBuildingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigViewBuildingDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigViewBuildingOK creates a FindConfigViewBuildingOK with default headers values +func NewFindConfigViewBuildingOK() *FindConfigViewBuildingOK { + return &FindConfigViewBuildingOK{} +} + +/*FindConfigViewBuildingOK handles this case with default header values. + +Config value +*/ +type FindConfigViewBuildingOK struct { + Payload bool +} + +func (o *FindConfigViewBuildingOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigViewBuildingOK) 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 +} + +// NewFindConfigViewBuildingDefault creates a FindConfigViewBuildingDefault with default headers values +func NewFindConfigViewBuildingDefault(code int) *FindConfigViewBuildingDefault { + return &FindConfigViewBuildingDefault{ + _statusCode: code, + } +} + +/*FindConfigViewBuildingDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigViewBuildingDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config view building default response +func (o *FindConfigViewBuildingDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigViewBuildingDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigViewBuildingDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigViewBuildingDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_parameters.go new file mode 100644 index 00000000000..1dbfc4abace --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigViewHintsDirectoryParams creates a new FindConfigViewHintsDirectoryParams object +// with the default values initialized. +func NewFindConfigViewHintsDirectoryParams() *FindConfigViewHintsDirectoryParams { + + return &FindConfigViewHintsDirectoryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigViewHintsDirectoryParamsWithTimeout creates a new FindConfigViewHintsDirectoryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigViewHintsDirectoryParamsWithTimeout(timeout time.Duration) *FindConfigViewHintsDirectoryParams { + + return &FindConfigViewHintsDirectoryParams{ + + timeout: timeout, + } +} + +// NewFindConfigViewHintsDirectoryParamsWithContext creates a new FindConfigViewHintsDirectoryParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigViewHintsDirectoryParamsWithContext(ctx context.Context) *FindConfigViewHintsDirectoryParams { + + return &FindConfigViewHintsDirectoryParams{ + + Context: ctx, + } +} + +// NewFindConfigViewHintsDirectoryParamsWithHTTPClient creates a new FindConfigViewHintsDirectoryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigViewHintsDirectoryParamsWithHTTPClient(client *http.Client) *FindConfigViewHintsDirectoryParams { + + return &FindConfigViewHintsDirectoryParams{ + HTTPClient: client, + } +} + +/*FindConfigViewHintsDirectoryParams contains all the parameters to send to the API endpoint +for the find config view hints directory operation typically these are written to a http.Request +*/ +type FindConfigViewHintsDirectoryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) WithTimeout(timeout time.Duration) *FindConfigViewHintsDirectoryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) WithContext(ctx context.Context) *FindConfigViewHintsDirectoryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) WithHTTPClient(client *http.Client) *FindConfigViewHintsDirectoryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config view hints directory params +func (o *FindConfigViewHintsDirectoryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigViewHintsDirectoryParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_responses.go new file mode 100644 index 00000000000..77d958ef6d4 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_view_hints_directory_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigViewHintsDirectoryReader is a Reader for the FindConfigViewHintsDirectory structure. +type FindConfigViewHintsDirectoryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigViewHintsDirectoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigViewHintsDirectoryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigViewHintsDirectoryDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigViewHintsDirectoryOK creates a FindConfigViewHintsDirectoryOK with default headers values +func NewFindConfigViewHintsDirectoryOK() *FindConfigViewHintsDirectoryOK { + return &FindConfigViewHintsDirectoryOK{} +} + +/*FindConfigViewHintsDirectoryOK handles this case with default header values. + +Config value +*/ +type FindConfigViewHintsDirectoryOK struct { + Payload string +} + +func (o *FindConfigViewHintsDirectoryOK) GetPayload() string { + return o.Payload +} + +func (o *FindConfigViewHintsDirectoryOK) 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 +} + +// NewFindConfigViewHintsDirectoryDefault creates a FindConfigViewHintsDirectoryDefault with default headers values +func NewFindConfigViewHintsDirectoryDefault(code int) *FindConfigViewHintsDirectoryDefault { + return &FindConfigViewHintsDirectoryDefault{ + _statusCode: code, + } +} + +/*FindConfigViewHintsDirectoryDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigViewHintsDirectoryDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config view hints directory default response +func (o *FindConfigViewHintsDirectoryDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigViewHintsDirectoryDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigViewHintsDirectoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigViewHintsDirectoryDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_parameters.go new file mode 100644 index 00000000000..8a3ea5d58ce --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigVirtualDirtySoftLimitParams creates a new FindConfigVirtualDirtySoftLimitParams object +// with the default values initialized. +func NewFindConfigVirtualDirtySoftLimitParams() *FindConfigVirtualDirtySoftLimitParams { + + return &FindConfigVirtualDirtySoftLimitParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigVirtualDirtySoftLimitParamsWithTimeout creates a new FindConfigVirtualDirtySoftLimitParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigVirtualDirtySoftLimitParamsWithTimeout(timeout time.Duration) *FindConfigVirtualDirtySoftLimitParams { + + return &FindConfigVirtualDirtySoftLimitParams{ + + timeout: timeout, + } +} + +// NewFindConfigVirtualDirtySoftLimitParamsWithContext creates a new FindConfigVirtualDirtySoftLimitParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigVirtualDirtySoftLimitParamsWithContext(ctx context.Context) *FindConfigVirtualDirtySoftLimitParams { + + return &FindConfigVirtualDirtySoftLimitParams{ + + Context: ctx, + } +} + +// NewFindConfigVirtualDirtySoftLimitParamsWithHTTPClient creates a new FindConfigVirtualDirtySoftLimitParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigVirtualDirtySoftLimitParamsWithHTTPClient(client *http.Client) *FindConfigVirtualDirtySoftLimitParams { + + return &FindConfigVirtualDirtySoftLimitParams{ + HTTPClient: client, + } +} + +/*FindConfigVirtualDirtySoftLimitParams contains all the parameters to send to the API endpoint +for the find config virtual dirty soft limit operation typically these are written to a http.Request +*/ +type FindConfigVirtualDirtySoftLimitParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) WithTimeout(timeout time.Duration) *FindConfigVirtualDirtySoftLimitParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) WithContext(ctx context.Context) *FindConfigVirtualDirtySoftLimitParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) WithHTTPClient(client *http.Client) *FindConfigVirtualDirtySoftLimitParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config virtual dirty soft limit params +func (o *FindConfigVirtualDirtySoftLimitParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigVirtualDirtySoftLimitParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_responses.go new file mode 100644 index 00000000000..f13254fcef0 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_virtual_dirty_soft_limit_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigVirtualDirtySoftLimitReader is a Reader for the FindConfigVirtualDirtySoftLimit structure. +type FindConfigVirtualDirtySoftLimitReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigVirtualDirtySoftLimitReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigVirtualDirtySoftLimitOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigVirtualDirtySoftLimitDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigVirtualDirtySoftLimitOK creates a FindConfigVirtualDirtySoftLimitOK with default headers values +func NewFindConfigVirtualDirtySoftLimitOK() *FindConfigVirtualDirtySoftLimitOK { + return &FindConfigVirtualDirtySoftLimitOK{} +} + +/*FindConfigVirtualDirtySoftLimitOK handles this case with default header values. + +Config value +*/ +type FindConfigVirtualDirtySoftLimitOK struct { + Payload float64 +} + +func (o *FindConfigVirtualDirtySoftLimitOK) GetPayload() float64 { + return o.Payload +} + +func (o *FindConfigVirtualDirtySoftLimitOK) 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 +} + +// NewFindConfigVirtualDirtySoftLimitDefault creates a FindConfigVirtualDirtySoftLimitDefault with default headers values +func NewFindConfigVirtualDirtySoftLimitDefault(code int) *FindConfigVirtualDirtySoftLimitDefault { + return &FindConfigVirtualDirtySoftLimitDefault{ + _statusCode: code, + } +} + +/*FindConfigVirtualDirtySoftLimitDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigVirtualDirtySoftLimitDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config virtual dirty soft limit default response +func (o *FindConfigVirtualDirtySoftLimitDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigVirtualDirtySoftLimitDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigVirtualDirtySoftLimitDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigVirtualDirtySoftLimitDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_parameters.go new file mode 100644 index 00000000000..d46668d0ad7 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigVolatileSystemKeyspaceForTestingParams creates a new FindConfigVolatileSystemKeyspaceForTestingParams object +// with the default values initialized. +func NewFindConfigVolatileSystemKeyspaceForTestingParams() *FindConfigVolatileSystemKeyspaceForTestingParams { + + return &FindConfigVolatileSystemKeyspaceForTestingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigVolatileSystemKeyspaceForTestingParamsWithTimeout creates a new FindConfigVolatileSystemKeyspaceForTestingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigVolatileSystemKeyspaceForTestingParamsWithTimeout(timeout time.Duration) *FindConfigVolatileSystemKeyspaceForTestingParams { + + return &FindConfigVolatileSystemKeyspaceForTestingParams{ + + timeout: timeout, + } +} + +// NewFindConfigVolatileSystemKeyspaceForTestingParamsWithContext creates a new FindConfigVolatileSystemKeyspaceForTestingParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigVolatileSystemKeyspaceForTestingParamsWithContext(ctx context.Context) *FindConfigVolatileSystemKeyspaceForTestingParams { + + return &FindConfigVolatileSystemKeyspaceForTestingParams{ + + Context: ctx, + } +} + +// NewFindConfigVolatileSystemKeyspaceForTestingParamsWithHTTPClient creates a new FindConfigVolatileSystemKeyspaceForTestingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigVolatileSystemKeyspaceForTestingParamsWithHTTPClient(client *http.Client) *FindConfigVolatileSystemKeyspaceForTestingParams { + + return &FindConfigVolatileSystemKeyspaceForTestingParams{ + HTTPClient: client, + } +} + +/*FindConfigVolatileSystemKeyspaceForTestingParams contains all the parameters to send to the API endpoint +for the find config volatile system keyspace for testing operation typically these are written to a http.Request +*/ +type FindConfigVolatileSystemKeyspaceForTestingParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) WithTimeout(timeout time.Duration) *FindConfigVolatileSystemKeyspaceForTestingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) WithContext(ctx context.Context) *FindConfigVolatileSystemKeyspaceForTestingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) WithHTTPClient(client *http.Client) *FindConfigVolatileSystemKeyspaceForTestingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config volatile system keyspace for testing params +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigVolatileSystemKeyspaceForTestingParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_responses.go new file mode 100644 index 00000000000..aefac63ef1d --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_volatile_system_keyspace_for_testing_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigVolatileSystemKeyspaceForTestingReader is a Reader for the FindConfigVolatileSystemKeyspaceForTesting structure. +type FindConfigVolatileSystemKeyspaceForTestingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigVolatileSystemKeyspaceForTestingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigVolatileSystemKeyspaceForTestingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigVolatileSystemKeyspaceForTestingDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigVolatileSystemKeyspaceForTestingOK creates a FindConfigVolatileSystemKeyspaceForTestingOK with default headers values +func NewFindConfigVolatileSystemKeyspaceForTestingOK() *FindConfigVolatileSystemKeyspaceForTestingOK { + return &FindConfigVolatileSystemKeyspaceForTestingOK{} +} + +/*FindConfigVolatileSystemKeyspaceForTestingOK handles this case with default header values. + +Config value +*/ +type FindConfigVolatileSystemKeyspaceForTestingOK struct { + Payload bool +} + +func (o *FindConfigVolatileSystemKeyspaceForTestingOK) GetPayload() bool { + return o.Payload +} + +func (o *FindConfigVolatileSystemKeyspaceForTestingOK) 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 +} + +// NewFindConfigVolatileSystemKeyspaceForTestingDefault creates a FindConfigVolatileSystemKeyspaceForTestingDefault with default headers values +func NewFindConfigVolatileSystemKeyspaceForTestingDefault(code int) *FindConfigVolatileSystemKeyspaceForTestingDefault { + return &FindConfigVolatileSystemKeyspaceForTestingDefault{ + _statusCode: code, + } +} + +/*FindConfigVolatileSystemKeyspaceForTestingDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigVolatileSystemKeyspaceForTestingDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config volatile system keyspace for testing default response +func (o *FindConfigVolatileSystemKeyspaceForTestingDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigVolatileSystemKeyspaceForTestingDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigVolatileSystemKeyspaceForTestingDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigVolatileSystemKeyspaceForTestingDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_parameters.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_parameters.go new file mode 100644 index 00000000000..1828e261221 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + + strfmt "github.com/go-openapi/strfmt" +) + +// NewFindConfigWriteRequestTimeoutInMsParams creates a new FindConfigWriteRequestTimeoutInMsParams object +// with the default values initialized. +func NewFindConfigWriteRequestTimeoutInMsParams() *FindConfigWriteRequestTimeoutInMsParams { + + return &FindConfigWriteRequestTimeoutInMsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewFindConfigWriteRequestTimeoutInMsParamsWithTimeout creates a new FindConfigWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewFindConfigWriteRequestTimeoutInMsParamsWithTimeout(timeout time.Duration) *FindConfigWriteRequestTimeoutInMsParams { + + return &FindConfigWriteRequestTimeoutInMsParams{ + + timeout: timeout, + } +} + +// NewFindConfigWriteRequestTimeoutInMsParamsWithContext creates a new FindConfigWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a context for a request +func NewFindConfigWriteRequestTimeoutInMsParamsWithContext(ctx context.Context) *FindConfigWriteRequestTimeoutInMsParams { + + return &FindConfigWriteRequestTimeoutInMsParams{ + + Context: ctx, + } +} + +// NewFindConfigWriteRequestTimeoutInMsParamsWithHTTPClient creates a new FindConfigWriteRequestTimeoutInMsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewFindConfigWriteRequestTimeoutInMsParamsWithHTTPClient(client *http.Client) *FindConfigWriteRequestTimeoutInMsParams { + + return &FindConfigWriteRequestTimeoutInMsParams{ + HTTPClient: client, + } +} + +/*FindConfigWriteRequestTimeoutInMsParams contains all the parameters to send to the API endpoint +for the find config write request timeout in ms operation typically these are written to a http.Request +*/ +type FindConfigWriteRequestTimeoutInMsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) WithTimeout(timeout time.Duration) *FindConfigWriteRequestTimeoutInMsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) WithContext(ctx context.Context) *FindConfigWriteRequestTimeoutInMsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) WithHTTPClient(client *http.Client) *FindConfigWriteRequestTimeoutInMsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the find config write request timeout in ms params +func (o *FindConfigWriteRequestTimeoutInMsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *FindConfigWriteRequestTimeoutInMsParams) 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/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_responses.go b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_responses.go new file mode 100644 index 00000000000..bf648a0d7d3 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/config/find_config_write_request_timeout_in_ms_responses.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package config + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strings" + + "github.com/go-openapi/runtime" + + strfmt "github.com/go-openapi/strfmt" + + models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// FindConfigWriteRequestTimeoutInMsReader is a Reader for the FindConfigWriteRequestTimeoutInMs structure. +type FindConfigWriteRequestTimeoutInMsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *FindConfigWriteRequestTimeoutInMsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewFindConfigWriteRequestTimeoutInMsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewFindConfigWriteRequestTimeoutInMsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewFindConfigWriteRequestTimeoutInMsOK creates a FindConfigWriteRequestTimeoutInMsOK with default headers values +func NewFindConfigWriteRequestTimeoutInMsOK() *FindConfigWriteRequestTimeoutInMsOK { + return &FindConfigWriteRequestTimeoutInMsOK{} +} + +/*FindConfigWriteRequestTimeoutInMsOK handles this case with default header values. + +Config value +*/ +type FindConfigWriteRequestTimeoutInMsOK struct { + Payload int64 +} + +func (o *FindConfigWriteRequestTimeoutInMsOK) GetPayload() int64 { + return o.Payload +} + +func (o *FindConfigWriteRequestTimeoutInMsOK) 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 +} + +// NewFindConfigWriteRequestTimeoutInMsDefault creates a FindConfigWriteRequestTimeoutInMsDefault with default headers values +func NewFindConfigWriteRequestTimeoutInMsDefault(code int) *FindConfigWriteRequestTimeoutInMsDefault { + return &FindConfigWriteRequestTimeoutInMsDefault{ + _statusCode: code, + } +} + +/*FindConfigWriteRequestTimeoutInMsDefault handles this case with default header values. + +unexpected error +*/ +type FindConfigWriteRequestTimeoutInMsDefault struct { + _statusCode int + + Payload *models.ErrorModel +} + +// Code gets the status code for the find config write request timeout in ms default response +func (o *FindConfigWriteRequestTimeoutInMsDefault) Code() int { + return o._statusCode +} + +func (o *FindConfigWriteRequestTimeoutInMsDefault) GetPayload() *models.ErrorModel { + return o.Payload +} + +func (o *FindConfigWriteRequestTimeoutInMsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ErrorModel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +func (o *FindConfigWriteRequestTimeoutInMsDefault) Error() string { + return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) +} diff --git a/pkg/scyllaclient/internal/scylla_v2/client/scylla2_client.go b/pkg/scyllaclient/internal/scylla_v2/client/scylla2_client.go new file mode 100644 index 00000000000..239a07c84ae --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/client/scylla2_client.go @@ -0,0 +1,117 @@ +// 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" + + strfmt "github.com/go-openapi/strfmt" + + "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/client/config" +) + +// Default scylla2 HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "mermaid.magic.host" + // 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{"http"} + +// NewHTTPClient creates a new scylla2 HTTP client. +func NewHTTPClient(formats strfmt.Registry) *Scylla2 { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new scylla2 HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Scylla2 { + // 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 scylla2 client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Scylla2 { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(Scylla2) + cli.Transport = transport + + cli.Config = config.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 +} + +// Scylla2 is a client for scylla2 +type Scylla2 struct { + Config *config.Client + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *Scylla2) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + + c.Config.SetTransport(transport) + +} diff --git a/pkg/scyllaclient/internal/scylla_v2/models/error_model.go b/pkg/scyllaclient/internal/scylla_v2/models/error_model.go new file mode 100644 index 00000000000..28e7014f942 --- /dev/null +++ b/pkg/scyllaclient/internal/scylla_v2/models/error_model.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + strfmt "github.com/go-openapi/strfmt" + + "github.com/go-openapi/swag" +) + +// ErrorModel error model +// swagger:model ErrorModel +type ErrorModel struct { + + // code + Code int64 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this error model +func (m *ErrorModel) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *ErrorModel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ErrorModel) UnmarshalBinary(b []byte) error { + var res ErrorModel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/pkg/scyllaclient/internal/templates/client/client.gotmpl b/pkg/scyllaclient/internal/templates/client/client.gotmpl new file mode 100644 index 00000000000..33959c9e2b5 --- /dev/null +++ b/pkg/scyllaclient/internal/templates/client/client.gotmpl @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Name }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + "github.com/go-openapi/runtime" + "github.com/go-openapi/validate" + + strfmt "github.com/go-openapi/strfmt" + + {{ range .DefaultImports }}{{ printf "%q" .}} + {{ end }} + {{ range $key, $value := .Imports }}{{ $key }} {{ printf "%q" $value }} + {{ end }} +) + +// New creates a new {{ humanize .Name }} API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { + return &Client{transport: transport, formats: formats} +} + +/* +Client {{ if .Summary }}{{ .Summary }}{{ if .Description }} + +{{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}for {{ humanize .Name }} API{{ end }} +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +{{ range .Operations }} +/* +{{ pascalize .Name }} {{ if .Summary }}{{ pluralizeFirstWord (humanize .Summary) }}{{ if .Description }} + +{{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}{{ humanize .Name }} API{{ end }} +*/ +func (a *Client) {{ pascalize .Name }}(params *{{ pascalize .Name }}Params{{ if .Authorized }}, authInfo runtime.ClientAuthInfoWriter{{end}}{{ if .HasStreamingResponse }}, writer io.Writer{{ end }}) {{ if .SuccessResponse }}({{ range .SuccessResponses }}*{{ pascalize .Name }}, {{ end }}{{ end }}error{{ if .SuccessResponse }}){{ end }} { + // TODO: Validate the params before sending + if params == nil { + params = New{{ pascalize .Name }}Params() + } + {{ $length := len .SuccessResponses }} + {{ if .SuccessResponse }}result{{else}}_{{ end }}, err := a.transport.Submit(&runtime.ClientOperation{ + ID: {{ printf "%q" .Name }}, + Method: {{ printf "%q" .Method }}, + PathPattern: {{ printf "%q" .Path }}, + ProducesMediaTypes: {{ printf "%#v" .ProducesMediaTypes }}, + ConsumesMediaTypes: {{ printf "%#v" .ConsumesMediaTypes }}, + Schemes: {{ printf "%#v" .Schemes }}, + Params: params, + Reader: &{{ pascalize .Name }}Reader{formats: a.formats{{ if .HasStreamingResponse }}, writer: writer{{ end }}},{{ if .Authorized }} + AuthInfo: authInfo,{{ end}} + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return {{ if .SuccessResponse }}{{ padSurround "nil" "nil" 0 $length }}, {{ end }}err + } + {{- if .SuccessResponse }} + {{- if eq $length 1 }} + success, ok := result.(*{{ pascalize .SuccessResponse.Name }}) + if ok { + return success,nil + } + // unexpected success response + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ .Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- else }}{{/* several possible success responses */}} + switch value := result.(type) { + {{- range $i, $v := .SuccessResponses }} + case *{{ pascalize $v.Name }}: + return {{ padSurround "value" "nil" $i $length }}, nil + {{- end }} + } + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + // unexpected success response + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return {{ padSurround "nil" "nil" 0 $length }}, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ $.Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- end }} + {{- else }} + return nil + {{- end }} +} +{{- end }} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/pkg/scyllaclient/internal/templates/client/response.gotmpl b/pkg/scyllaclient/internal/templates/client/response.gotmpl new file mode 100644 index 00000000000..c7f89377c5c --- /dev/null +++ b/pkg/scyllaclient/internal/templates/client/response.gotmpl @@ -0,0 +1,166 @@ +{{ define "errorimpl" }} func ({{ .ReceiverName }} *{{ pascalize .Name }}) Error() string { + return fmt.Sprintf("agent [HTTP %d]{{ if .Schema }} %s{{ end }}", {{ if eq .Code -1 }}{{ .ReceiverName }}._statusCode{{ else }}{{ .Code }}{{ end }}{{ if .Schema }}, strings.TrimRight(o.Payload.Message, "."){{ end }}) +} {{ end }} + +{{ define "clientresponse" }}// New{{ pascalize .Name }} creates a {{ pascalize .Name }} with default headers values +func New{{ pascalize .Name }}({{ if eq .Code -1 }}code int{{ end }}{{ if .Schema }}{{ if and (eq .Code -1) .Schema.IsStream }}, {{end}}{{ if .Schema.IsStream }}writer io.Writer{{ end }}{{ end }}) *{{ pascalize .Name }} { + return &{{ pascalize .Name }}{ + {{ if eq .Code -1 }}_statusCode: code, + {{ end }}{{ range .Headers }}{{ if .HasDefault }}{{ pascalize .Name }}: {{ printf "%#v" .Default }}, + {{ end }}{{ end }}{{ if .Schema }}{{ if .Schema.IsStream }}Payload: writer, + {{ end }}{{ end }}} +} + +/*{{ pascalize .Name}} handles this case with default header values. + +{{ if .Description }}{{ blockcomment .Description }}{{else}}{{ pascalize .Name }} {{ humanize .Name }}{{end}} +*/ +type {{ pascalize .Name }} struct { + {{ if eq .Code -1 }} + _statusCode int + + {{ end }}{{ range .Headers }}{{ if .Description }}/*{{ blockcomment .Description }} + */{{ end }} + {{ pascalize .Name }} {{ .GoType }} + {{ end }} + {{ if .Schema }} + Payload {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} + {{ end }} +}{{ if eq .Code -1 }} + +// Code gets the status code for the {{ humanize .Name }} response +func ({{ .ReceiverName }} *{{ pascalize .Name }}) Code() int { + return {{ .ReceiverName }}._statusCode +} +{{ end }} + +{{ if .Schema }} +func ({{ .ReceiverName }} *{{ pascalize .Name }}) GetPayload() {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} { + return o.Payload +} +{{ end }} + +func ({{ .ReceiverName }} *{{ pascalize .Name }}) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + {{ range .Headers }} + // response header {{.Name}} + {{if .Converter }}{{ camelize .Name }}, err := {{ .Converter }}(response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = {{ camelize .Name }} + {{ else if .IsCustomFormatter }} + {{ camelize .Name }}, err := formats.Parse({{ printf "%q" .SwaggerFormat }}, response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = *({{ camelize .Name }}.(*{{ .GoType }})) + {{ else}}{{ .ReceiverName }}.{{ pascalize .Name }} = response.GetHeader("{{ .Name }}") + {{end}} + {{ end }} + {{ if .Schema }} + {{ if .Schema.IsBaseType }} + // response payload as interface type + payload, err := {{ toPackageName .ModelsPackage }}.Unmarshal{{ stripPackage .Schema.GoType ( toPackageName .ModelsPackage ) }}{{ if .Schema.IsArray}}Slice{{ end }}(response.Body(), consumer) + if err != nil { + return err + } + {{ .ReceiverName }}.Payload = payload + {{ else if .Schema.IsComplexObject }} + {{ .ReceiverName }}.Payload = new({{ .Schema.GoType }}) + {{ end }}{{ if not .Schema.IsBaseType }} + // response payload + if err := consumer.Consume(response.Body(), {{ if not (or .Schema.IsComplexObject .Schema.IsStream) }}&{{ end}}{{ .ReceiverName }}.Payload); err != nil && err != io.EOF { + return err + } + {{ end }}{{ end }} + return nil +} +{{ end }}// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Package }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + + +import ( + "io" + "net/http" + "strings" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + "github.com/go-openapi/runtime" + "github.com/go-openapi/errors" + + strfmt "github.com/go-openapi/strfmt" + + {{ range .DefaultImports }}{{ printf "%q" .}} + {{ end }} + {{ range $key, $value := .Imports }}{{ $key }} {{ printf "%q" $value }} + {{ end }} +) + +// {{ pascalize .Name }}Reader is a Reader for the {{ pascalize .Name }} structure. +type {{ pascalize .Name }}Reader struct { + formats strfmt.Registry{{ if .HasStreamingResponse }} + writer io.Writer{{ end }} +} + +// ReadResponse reads a server response into the received {{ .ReceiverName }}. +func ({{ .ReceiverName }} *{{ pascalize .Name }}Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + {{- if .Responses}} + switch response.Code() { + {{- end }} + {{- range .Responses }} + case {{ .Code }}: + result := New{{ pascalize .Name }}({{ if .Schema }}{{ if .Schema.IsStream }}{{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + return {{ if .IsSuccess }}result, nil{{else}}nil, result{{end}} + {{- end }} + {{- if .DefaultResponse }} + {{- with .DefaultResponse }} + {{- if $.Responses}} + default: + {{- end }} + result := New{{ pascalize .Name }}(response.Code(){{ if .Schema }}{{ if .Schema.IsStream }}, {{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + if response.Code() / 100 == 2 { + return result, nil + } + return nil, result + {{- end }} + {{- else }} + {{ if $.Responses}} + default: + {{- end }} + return nil, runtime.NewAPIError("unknown error", response, response.Code()) + {{- end }} + {{- if .Responses}} + } + {{- end }} +} + +{{ range .Responses }} +{{ template "clientresponse" . }} +{{ end }} +{{ if .DefaultResponse }} +{{ template "clientresponse" .DefaultResponse }} +{{ template "errorimpl" .DefaultResponse }} +{{ end }} + +{{ range .ExtraSchemas }} +/*{{ pascalize .Name }} {{ template "docstring" . }} +swagger:model {{ .Name }} +*/ +{{ template "schema" . }} +{{ end }} \ No newline at end of file diff --git a/pkg/scyllaclient/internalgen.sh b/pkg/scyllaclient/internalgen.sh new file mode 100755 index 00000000000..85b05be9121 --- /dev/null +++ b/pkg/scyllaclient/internalgen.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Copyright (C) 2017 ScyllaDB +# + +set -eu -o pipefail + +echo "Swagger $(swagger version)" + +rm -rf internal/scylla/client internal/scylla/models +swagger generate client -A scylla -T internal/templates -f scylla.json -t ./internal/scylla + +rm -rf internal/scylla_v2/client internal/scylla_v2/models +swagger generate client -A scylla2 -T internal/templates -f scylla_v2.json -t ./internal/scylla_v2 + +rm -rf internal/agent/client internal/agent/models +swagger generate client -A agent -T internal/agent/templates -f agent.json -t ./internal/agent \ No newline at end of file diff --git a/pkg/scyllaclient/log.go b/pkg/scyllaclient/log.go new file mode 100644 index 00000000000..fd1b86e9238 --- /dev/null +++ b/pkg/scyllaclient/log.go @@ -0,0 +1,52 @@ +// Copyright (C) 2017 ScyllaDB + +package scyllaclient + +import ( + "fmt" + "net/http" + "net/http/httputil" + "time" + + "github.com/pkg/errors" + "github.com/scylladb/go-log" + "github.com/scylladb/scylla-operator/pkg/util/httpx" + "github.com/scylladb/scylla-operator/pkg/util/timeutc" +) + +// requestLogger logs requests and responses. +func requestLogger(next http.RoundTripper, logger log.Logger) http.RoundTripper { + return httpx.RoundTripperFunc(func(req *http.Request) (resp *http.Response, err error) { + start := timeutc.Now() + resp, err = next.RoundTrip(req) + logReqResp(logger, timeutc.Since(start), req, resp) + return + }) +} + +func logReqResp(logger log.Logger, elapsed time.Duration, req *http.Request, resp *http.Response) { + f := []interface{}{ + "host", req.Host, + "method", req.Method, + "uri", req.URL.RequestURI(), + "duration", fmt.Sprintf("%dms", elapsed.Milliseconds()), + } + logFn := logger.Debug + if resp != nil { + f = append(f, + "status", resp.StatusCode, + "bytes", resp.ContentLength, + ) + + // Dump body of failed requests, ignore 404s + if c := resp.StatusCode; c >= 400 && c != http.StatusNotFound { + if b, err := httputil.DumpResponse(resp, true); err != nil { + f = append(f, "dump", errors.Wrap(err, "dump request")) + } else { + f = append(f, "dump", string(b)) + } + logFn = logger.Info + } + } + logFn(req.Context(), "HTTP", f...) +} diff --git a/pkg/scyllaclient/model.go b/pkg/scyllaclient/model.go new file mode 100644 index 00000000000..32a74aab13b --- /dev/null +++ b/pkg/scyllaclient/model.go @@ -0,0 +1,248 @@ +package scyllaclient + +import ( + "fmt" + "strings" + + "github.com/hashicorp/go-version" + "github.com/scylladb/go-set/strset" +) + +// NodeStatus represents nodetool Status=Up/Down. +type NodeStatus bool + +// NodeStatus enumeration +const ( + NodeStatusUp NodeStatus = true + NodeStatusDown NodeStatus = false +) + +func (s NodeStatus) String() string { + if s { + return "U" + } + return "D" +} + +// NodeState represents nodetool State=Normal/Leaving/Joining/Moving +type NodeState string + +// NodeState enumeration +const ( + NodeStateNormal NodeState = "" + NodeStateLeaving NodeState = "LEAVING" + NodeStateJoining NodeState = "JOINING" + NodeStateMoving NodeState = "MOVING" +) + +func (s NodeState) String() string { + switch s { + case NodeStateNormal: + return "N" + case NodeStateLeaving: + return "L" + case NodeStateJoining: + return "J" + case NodeStateMoving: + return "M" + } + return "" +} + +type OperationalMode string + +const ( + OperationalModeClient OperationalMode = "CLIENT" + OperationalModeDecommissioned OperationalMode = "DECOMMISSIONED" + OperationalModeJoining OperationalMode = "JOINING" + OperationalModeLeaving OperationalMode = "LEAVING" + OperationalModeNormal OperationalMode = "NORMAL" + OperationalModeUnknown OperationalMode = "UNKNOWN" +) + +var ( + operationalModeMap = map[string]OperationalMode{ + "CLIENT": OperationalModeClient, + "DECOMMISSIONED": OperationalModeDecommissioned, + "JOINING": OperationalModeJoining, + "LEAVING": OperationalModeLeaving, + "NORMAL": OperationalModeNormal, + } +) + +func (o OperationalMode) String() string { + switch o { + case "CLIENT", "DECOMMISSIONED", "JOINING", "LEAVING", "NORMAL": + return string(o) + default: + return "UNKNOWN" + } +} + +func (o OperationalMode) IsDecommisioned() bool { + return o == OperationalModeDecommissioned +} + +func operationalModeFromString(str string) OperationalMode { + if om, ok := operationalModeMap[strings.ToUpper(str)]; ok { + return om + } + return OperationalModeUnknown +} + +// NodeStatusInfo represents a nodetool status line. +type NodeStatusInfo struct { + Datacenter string + HostID string + Addr string + Status NodeStatus + State NodeState +} + +func (s NodeStatusInfo) String() string { + return fmt.Sprintf("host: %s, DC: %s, Status: %s%s", s.Addr, s.Datacenter, s.Status, s.State) +} + +// IsUN returns true if host is Up and NORMAL meaning it's a fully functional +// live node. +func (s NodeStatusInfo) IsUN() bool { + return s.Status == NodeStatusUp && s.State == NodeStateNormal +} + +// NodeStatusInfoSlice adds functionality to Status response. +type NodeStatusInfoSlice []NodeStatusInfo + +// Datacenter resturns sub slice containing only nodes from given datacenters. +func (s NodeStatusInfoSlice) Datacenter(dcs []string) NodeStatusInfoSlice { + m := strset.New(dcs...) + + var filtered NodeStatusInfoSlice + for _, h := range s { + if m.Has(h.Datacenter) { + filtered = append(filtered, h) + } + } + return filtered +} + +// Hosts returns slice of address of all nodes. +func (s NodeStatusInfoSlice) Hosts() []string { + var hosts []string + for _, h := range s { + hosts = append(hosts, h.Addr) + } + return hosts +} + +// LiveHosts returns slice of address of nodes in UN state. +func (s NodeStatusInfoSlice) LiveHosts() []string { + var hosts []string + for _, h := range s { + if h.IsUN() { + hosts = append(hosts, h.Addr) + } + } + return hosts +} + +// DownHosts returns slice of address of nodes that are down. +func (s NodeStatusInfoSlice) DownHosts() []string { + var hosts []string + for _, h := range s { + if h.Status == NodeStatusDown { + hosts = append(hosts, h.Addr) + } + } + return hosts +} + +// CommandStatus specifies a result of a command +type CommandStatus string + +// Command statuses +const ( + CommandRunning CommandStatus = "RUNNING" + CommandSuccessful CommandStatus = "SUCCESSFUL" + CommandFailed CommandStatus = "FAILED" +) + +// Partitioners +const ( + Murmur3Partitioner = "org.apache.cassandra.dht.Murmur3Partitioner" +) + +// ReplicationStrategy specifies type of a keyspace replication strategy. +type ReplicationStrategy string + +// Replication strategies +const ( + LocalStrategy = "org.apache.cassandra.locator.LocalStrategy" + SimpleStrategy = "org.apache.cassandra.locator.SimpleStrategy" + NetworkTopologyStrategy = "org.apache.cassandra.locator.NetworkTopologyStrategy" +) + +// Ring describes token ring of a keyspace. +type Ring struct { + Tokens []TokenRange + HostDC map[string]string + Replication ReplicationStrategy +} + +// Datacenters returs a list of datacenters the keyspace is replicated in. +func (r Ring) Datacenters() []string { + v := strset.NewWithSize(len(r.HostDC)) + for _, dc := range r.HostDC { + v.Add(dc) + } + return v.List() +} + +// TokenRange describes replicas of a token (range). +type TokenRange struct { + StartToken int64 + EndToken int64 + Replicas []string +} + +// Unit describes keyspace and some tables in that keyspace. +type Unit struct { + Keyspace string + Tables []string +} + +// ScyllaFeatures specifies features supported by the Scylla version. +type ScyllaFeatures struct { + RowLevelRepair bool +} + +var masterScyllaFeatures = ScyllaFeatures{ + RowLevelRepair: true, +} + +const ( + scyllaMasterVersion = "666.development" + scyllaEnterpriseMasterVersion = "9999.enterprise_dev" +) + +func makeScyllaFeatures(ver string) (ScyllaFeatures, error) { + // Trim build version suffix as it breaks constraints + ver = strings.Split(ver, "-")[0] + + // Detect master builds + if ver == scyllaMasterVersion || ver == scyllaEnterpriseMasterVersion { + return masterScyllaFeatures, nil + } + + v, err := version.NewSemver(ver) + if err != nil { + return ScyllaFeatures{}, err + } + + rowLevelRepair, err := version.NewConstraint(">= 3.1, < 2000") + if err != nil { + panic(err) // must + } + return ScyllaFeatures{ + RowLevelRepair: rowLevelRepair.Check(v), + }, nil +} diff --git a/pkg/scyllaclient/retry.go b/pkg/scyllaclient/retry.go new file mode 100644 index 00000000000..25e12c1aef5 --- /dev/null +++ b/pkg/scyllaclient/retry.go @@ -0,0 +1,149 @@ +// Copyright (C) 2017 ScyllaDB + +package scyllaclient + +import ( + "net/url" + "time" + + "github.com/scylladb/scylla-operator/pkg/util/retry" + + "github.com/go-openapi/runtime" + "github.com/pkg/errors" + "github.com/scylladb/go-log" +) + +type retryableTransport struct { + transport runtime.ClientTransport + config BackoffConfig + interactiveConfig BackoffConfig + poolSize int + logger log.Logger +} + +type retryableOperation struct { + retryableTransport + operation *runtime.ClientOperation + + result interface{} + attempts int +} + +// retryable wraps parent and adds retry capabilities. +func retryable(transport runtime.ClientTransport, config Config, logger log.Logger) runtime.ClientTransport { + return retryableTransport{ + transport: transport, + config: config.Backoff, + interactiveConfig: config.InteractiveBackoff, + poolSize: len(config.Hosts), + logger: logger, + } +} + +func (t retryableTransport) Submit(operation *runtime.ClientOperation) (interface{}, error) { + if _, ok := operation.Context.Value(ctxNoRetry).(bool); ok { + v, err := t.transport.Submit(operation) + return v, unpackURLError(err) + } + + o := retryableOperation{ + retryableTransport: t, + operation: operation, + } + return o.submit() +} + +func (o *retryableOperation) submit() (interface{}, error) { + err := retry.WithNotify(o.operation.Context, o.op, o.backoff(), o.notify) + if err != nil { + return nil, errors.Wrapf(unpackURLError(err), "giving up after %d attempts", o.attempts) + } + return o.result, nil +} + +func (o *retryableOperation) op() (err error) { + o.attempts++ + + o.result, err = o.transport.Submit(o.operation) + if err != nil && !o.shouldRetry(err) { + err = retry.Permanent(err) + } + + return +} + +func (o *retryableOperation) backoff() retry.Backoff { + if isForceHost(o.operation.Context) { + if isInteractive(o.operation.Context) { + return backoff(o.interactiveConfig) + } + return backoff(o.config) + } + + // We want to send request to every host in the pool once. + // The -1 is to avoid reaching out to the first node - that failed. + maxRetries := o.poolSize - 1 + return noBackoff(maxRetries) +} + +func (o *retryableOperation) shouldRetry(err error) bool { + if o.operation.Context.Err() != nil { + return false + } + + // Check the response code. We retry on 500-range responses to allow + // the server time to recover, as 500's are typically not permanent + // errors and may relate to outages on the server side. This will catch + // invalid response codes as well, like 0 and 999. + c := StatusCodeOf(err) + if c == 0 || (c >= 500 && c != 501) { + return true + } + + // Additionally if request can be resent to a different host retry + // on Unauthorized or Forbidden. + if !isForceHost(o.operation.Context) { + if c == 401 || c == 403 { + return true + } + } + + return false +} + +func (o *retryableOperation) notify(err error, wait time.Duration) { + if wait == 0 { + o.logger.Info(o.operation.Context, "HTTP retry now", + "operation", o.operation.ID, + "error", unpackURLError(err), + ) + } else { + o.logger.Info(o.operation.Context, "HTTP retry backoff", + "operation", o.operation.ID, + "wait", wait, + "error", unpackURLError(err), + ) + } +} + +func backoff(config BackoffConfig) retry.Backoff { + return retry.WithMaxRetries(retry.NewExponentialBackoff( + config.WaitMin, + 0, + config.WaitMax, + config.Multiplier, + config.Jitter, + ), config.MaxRetries) +} + +func noBackoff(maxRetries int) retry.Backoff { + return retry.WithMaxRetries(retry.BackoffFunc(func() time.Duration { return 0 }), uint64(maxRetries)) +} + +func unpackURLError(err error) error { + if e, ok := err.(*url.Error); ok { + return e.Err + } + + return err +} diff --git a/pkg/scyllaclient/scylla.json b/pkg/scyllaclient/scylla.json new file mode 100644 index 00000000000..f26896d8bd3 --- /dev/null +++ b/pkg/scyllaclient/scylla.json @@ -0,0 +1,13495 @@ +{ + "swagger": "2.0", + "info": { + "version": "0.0.1", + "title": "Swagger API", + "contact": {} + }, + "host": "mermaid.magic.host", + "basePath": "/", + "schemes": [ + "http" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/cache_service/row_cache_save_period": { + "get": { + "description": "get row cache save period in seconds", + "summary": "get_row_cache_save_period_in_seconds", + "operationId": "CacheServiceRowCacheSavePeriodGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set row cache save period in seconds", + "summary": "set_row_cache_save_period_in_seconds", + "operationId": "CacheServiceRowCacheSavePeriodPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "period", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "row cache save period in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/key_cache_save_period": { + "get": { + "description": "get key cache save period in seconds", + "summary": "get_key_cache_save_period_in_seconds", + "operationId": "CacheServiceKeyCacheSavePeriodGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set key cache save period in seconds", + "summary": "set_key_cache_save_period_in_seconds", + "operationId": "CacheServiceKeyCacheSavePeriodPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "period", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "key cache save period in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/counter_cache_save_period": { + "get": { + "description": "get counter cache save period in seconds", + "summary": "get_counter_cache_save_period_in_seconds", + "operationId": "CacheServiceCounterCacheSavePeriodGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set counter cache save period in seconds", + "summary": "set_counter_cache_save_period_in_seconds", + "operationId": "CacheServiceCounterCacheSavePeriodPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "ccspis", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "counter cache save period in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/row_cache_keys_to_save": { + "get": { + "description": "get row cache keys to save", + "summary": "get_row_cache_keys_to_save", + "operationId": "CacheServiceRowCacheKeysToSaveGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set row cache keys to save", + "summary": "set_row_cache_keys_to_save", + "operationId": "CacheServiceRowCacheKeysToSavePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "rckts", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "row cache keys to save" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/key_cache_keys_to_save": { + "get": { + "description": "get key cache keys to save", + "summary": "get_key_cache_keys_to_save", + "operationId": "CacheServiceKeyCacheKeysToSaveGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set key cache keys to save", + "summary": "set_key_cache_keys_to_save", + "operationId": "CacheServiceKeyCacheKeysToSavePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "kckts", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "key cache keys to save" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/counter_cache_keys_to_save": { + "get": { + "description": "get counter cache keys to save", + "summary": "get_counter_cache_keys_to_save", + "operationId": "CacheServiceCounterCacheKeysToSaveGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "set counter cache keys to save", + "summary": "set_counter_cache_keys_to_save", + "operationId": "CacheServiceCounterCacheKeysToSavePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "cckts", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "counter cache keys to save" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/invalidate_key_cache": { + "post": { + "description": "invalidate the key cache; for use after invalidating row cache", + "summary": "invalidate_key_cache", + "operationId": "CacheServiceInvalidateKeyCachePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/invalidate_counter_cache": { + "post": { + "description": "invalidate counter cache", + "summary": "invalidate_counter_cache", + "operationId": "CacheServiceInvalidateCounterCachePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/row_cache_capacity": { + "post": { + "description": "set row cache capacity in mb", + "summary": "set_row_cache_capacity_in_mb", + "operationId": "CacheServiceRowCacheCapacityPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "capacity", + "in": "query", + "required": true, + "type": "string", + "description": "row cache capacity in mb" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/key_cache_capacity": { + "post": { + "description": "set key cache capacity in mb", + "summary": "set_key_cache_capacity_in_mb", + "operationId": "CacheServiceKeyCacheCapacityPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "capacity", + "in": "query", + "required": true, + "type": "string", + "description": "key cache capacity in mb" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/counter_cache_capacity": { + "post": { + "description": "set counter cache capacity in mb", + "summary": "set_counter_cache_capacity_in_mb", + "operationId": "CacheServiceCounterCacheCapacityPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "capacity", + "in": "query", + "required": true, + "type": "string", + "description": "counter cache capacity in mb" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/save_caches": { + "post": { + "description": "save row and key caches", + "summary": "save_caches", + "operationId": "CacheServiceSaveCachesPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/capacity": { + "get": { + "description": "Get key capacity", + "summary": "get_key_capacity", + "operationId": "CacheServiceMetricsKeyCapacityGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/hits": { + "get": { + "description": "Get key hits", + "summary": "get_key_hits", + "operationId": "CacheServiceMetricsKeyHitsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/requests": { + "get": { + "description": "Get key requests", + "summary": "get_key_requests", + "operationId": "CacheServiceMetricsKeyRequestsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/hit_rate": { + "get": { + "description": "Get key hit rate", + "summary": "get_key_hit_rate", + "operationId": "CacheServiceMetricsKeyHitRateGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/hits_moving_avrage": { + "get": { + "description": "Get key hits moving avrage", + "summary": "get_key_hits_moving_avrage", + "operationId": "CacheServiceMetricsKeyHitsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/requests_moving_avrage": { + "get": { + "description": "Get key requests moving avrage", + "summary": "get_key_requests_moving_avrage", + "operationId": "CacheServiceMetricsKeyRequestsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/size": { + "get": { + "description": "Get key cache waited size", + "summary": "get_key_size", + "operationId": "CacheServiceMetricsKeySizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/key/entries": { + "get": { + "description": "Get key entries", + "summary": "get_key_entries", + "operationId": "CacheServiceMetricsKeyEntriesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/capacity": { + "get": { + "description": "Get row capacity", + "summary": "get_row_capacity", + "operationId": "CacheServiceMetricsRowCapacityGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/hits": { + "get": { + "description": "Get row hits", + "summary": "get_row_hits", + "operationId": "CacheServiceMetricsRowHitsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/requests": { + "get": { + "description": "Get row requests", + "summary": "get_row_requests", + "operationId": "CacheServiceMetricsRowRequestsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/hit_rate": { + "get": { + "description": "Get row hit rate", + "summary": "get_row_hit_rate", + "operationId": "CacheServiceMetricsRowHitRateGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/hits_moving_avrage": { + "get": { + "description": "Get row hits moving avrage", + "summary": "get_row_hits_moving_avrage", + "operationId": "CacheServiceMetricsRowHitsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/requests_moving_avrage": { + "get": { + "description": "Get row requests moving avrage", + "summary": "get_row_requests_moving_avrage", + "operationId": "CacheServiceMetricsRowRequestsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/size": { + "get": { + "description": "Get row cache waited size", + "summary": "get_row_size", + "operationId": "CacheServiceMetricsRowSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/row/entries": { + "get": { + "description": "Get row entries", + "summary": "get_row_entries", + "operationId": "CacheServiceMetricsRowEntriesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/capacity": { + "get": { + "description": "Get counter capacity", + "summary": "get_counter_capacity", + "operationId": "CacheServiceMetricsCounterCapacityGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/hits": { + "get": { + "description": "Get counter hits", + "summary": "get_counter_hits", + "operationId": "CacheServiceMetricsCounterHitsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/requests": { + "get": { + "description": "Get counter requests", + "summary": "get_counter_requests", + "operationId": "CacheServiceMetricsCounterRequestsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/hit_rate": { + "get": { + "description": "Get counter hit rate", + "summary": "get_counter_hit_rate", + "operationId": "CacheServiceMetricsCounterHitRateGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/hits_moving_avrage": { + "get": { + "description": "Get counter hits moving avrage", + "summary": "get_counter_hits_moving_avrage", + "operationId": "CacheServiceMetricsCounterHitsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/requests_moving_avrage": { + "get": { + "description": "Get counter requests moving avrage", + "summary": "get_counter_requests_moving_avrage", + "operationId": "CacheServiceMetricsCounterRequestsMovingAvrageGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/size": { + "get": { + "description": "Get counter cache waited size", + "summary": "get_counter_size", + "operationId": "CacheServiceMetricsCounterSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/cache_service/metrics/counter/entries": { + "get": { + "description": "Get counter entries", + "summary": "get_counter_entries", + "operationId": "CacheServiceMetricsCounterEntriesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/collectd/{pluginid}": { + "get": { + "description": "Get a collectd value", + "summary": "get_collectd", + "operationId": "CollectdByPluginidGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "pluginid", + "in": "path", + "required": true, + "type": "string", + "description": "The plugin ID" + }, + { + "name": "type", + "in": "query", + "required": true, + "type": "string", + "description": "The plugin type" + }, + { + "name": "instance", + "in": "query", + "required": false, + "type": "string", + "description": "The plugin instance" + }, + { + "name": "type_instance", + "in": "query", + "required": false, + "type": "string", + "description": "The plugin type instance" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/collectd_value" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Start reporting on one or more collectd metric", + "summary": "enable_collectd", + "operationId": "CollectdByPluginidPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "pluginid", + "in": "path", + "required": true, + "type": "string", + "description": "The plugin ID, describe the component the metric belongs to. Examples are cache, thrift, etc'. Regex are supported.The plugin ID, describe the component the metric belong to. Examples are: cache, thrift etc'. regex are supported" + }, + { + "name": "instance", + "in": "query", + "required": false, + "type": "string", + "description": "The plugin instance typically #CPU indicating per CPU metric. Regex are supported. Omit for all" + }, + { + "name": "type", + "in": "query", + "required": false, + "type": "string", + "description": "The plugin type, the type of the information. Examples are total_operations, bytes, total_operations, etc'. Regex are supported. Omit for all" + }, + { + "name": "type_instance", + "in": "query", + "required": false, + "type": "string", + "description": "The plugin type instance, the specific metric. Exampls are total_writes, total_size, zones, etc'. Regex are supported, Omit for all" + }, + { + "name": "enable", + "in": "query", + "required": false, + "type": "boolean", + "description": "set to true to enable all, anything else or omit to disable" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/collectd/": { + "get": { + "description": "Get a list of all collectd metrics and their status", + "summary": "get_collectd_items", + "operationId": "CollectdGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/collectd_metric_status" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Enable or disable all collectd metrics", + "summary": "enable_all_collectd", + "operationId": "CollectdPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "enable", + "in": "query", + "required": false, + "type": "boolean", + "description": "set to true to enable all, anything else or omit to disable" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/": { + "get": { + "description": "Get a list of all column family info", + "summary": "get_column_family", + "operationId": "ColumnFamilyGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/column_family_info" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/name": { + "get": { + "description": "Get a list of all column family names", + "summary": "get_column_family_name", + "operationId": "ColumnFamilyNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/name/keyspace": { + "get": { + "description": "Get a list of the key space names", + "summary": "get_column_family_name_keyspace", + "operationId": "ColumnFamilyNameKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/major_compaction/{name}": { + "post": { + "description": "Force a major compaction of this column family", + "summary": "force_major_compaction", + "operationId": "ColumnFamilyMajorCompactionByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "split_output", + "in": "query", + "required": false, + "type": "boolean", + "description": "true if the output of the major compaction should be split in several sstables" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/minimum_compaction/{name}": { + "post": { + "description": "Sets the minimum number of sstables in queue before compaction kicks off", + "summary": "set_minimum_compaction_threshold", + "operationId": "ColumnFamilyMinimumCompactionByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "value", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "The minimum number of sstables in queue before compaction kicks off" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "get the minimum number of sstables in queue before compaction kicks off", + "summary": "get_minimum_compaction_threshold", + "operationId": "ColumnFamilyMinimumCompactionByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/maximum_compaction/{name}": { + "post": { + "description": "Sets the maximum number of sstables in queue before compaction kicks off", + "summary": "set_maximum_compaction_threshold", + "operationId": "ColumnFamilyMaximumCompactionByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "value", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "The maximum number of sstables in queue before compaction kicks off" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "get the maximum number of sstables in queue before compaction kicks off", + "summary": "get_maximum_compaction_threshold", + "operationId": "ColumnFamilyMaximumCompactionByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/compaction/{name}": { + "post": { + "description": "Sets the minumum and maximum number of sstables in queue before compaction kicks off", + "summary": "set_compaction_threshold", + "operationId": "ColumnFamilyCompactionByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "maximum", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "The maximum number of sstables in queue before compaction kicks off" + }, + { + "name": "minimum", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "The minimum number of sstables in queue before compaction kicks off" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/compaction_strategy/{name}": { + "post": { + "description": "Sets the compaction strategy by class name", + "summary": "set_compaction_strategy_class", + "operationId": "ColumnFamilyCompactionStrategyByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "class_name", + "in": "query", + "required": true, + "type": "string", + "description": "The class name" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Gets the compaction strategy class name", + "summary": "get_compaction_strategy_class", + "operationId": "ColumnFamilyCompactionStrategyByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/compression_parameters/{name}": { + "get": { + "description": "get the compression parameters", + "summary": "get_compression_parameters", + "operationId": "ColumnFamilyCompressionParametersByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Sets the compression parameters", + "summary": "set_compression_parameters", + "operationId": "ColumnFamilyCompressionParametersByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "opts", + "in": "query", + "required": true, + "type": "string", + "description": "The options to set" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/crc_check_chance/{name}": { + "post": { + "description": "Set new crc check chance", + "summary": "set_crc_check_chance", + "operationId": "ColumnFamilyCrcCheckChanceByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "check_chance", + "in": "query", + "required": true, + "type": "string", + "description": "CRC check chance" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/autocompaction/{name}": { + "get": { + "description": "check if the auto compaction disabled", + "summary": "is_auto_compaction_disabled", + "operationId": "ColumnFamilyAutocompactionByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/estimate_keys/{name}": { + "get": { + "description": "Get the estimate keys", + "summary": "estimate_keys", + "operationId": "ColumnFamilyEstimateKeysByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/built_indexes/{name}": { + "get": { + "description": "Returns a list of the names of the built column indexes for current store", + "summary": "get_built_indexes", + "operationId": "ColumnFamilyBuiltIndexesByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/sstables/by_key/{name}": { + "get": { + "description": "Returns a list of sstable filenames that contain the given partition key on this node", + "summary": "get_sstables_for_key", + "operationId": "ColumnFamilySstablesByKeyByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + }, + { + "name": "key", + "in": "query", + "required": true, + "type": "string", + "description": "The partition key. In a composite-key scenario, use ':' to separate the columns in the key." + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/load/sstable/{name}": { + "post": { + "description": "Scan through Keyspace/ColumnFamily's data directory determine which SSTables should be loaded and load them", + "summary": "load_new_sstables", + "operationId": "ColumnFamilyLoadSstableByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/sstables/unleveled/{name}": { + "get": { + "description": "the number of SSTables in L0. Always return 0 if Leveled compaction is not enabled.", + "summary": "get_unleveled_sstables", + "operationId": "ColumnFamilySstablesUnleveledByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/sstables/per_level/{name}": { + "get": { + "description": "sstable count for each level. empty unless leveled compaction is used", + "summary": "get_sstable_count_per_level", + "operationId": "ColumnFamilySstablesPerLevelByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/droppable_ratio/{name}": { + "get": { + "description": "Get the ratio of droppable tombstones to real columns (and non-droppable tombstones)", + "summary": "get_droppable_tombstone_ratio", + "operationId": "ColumnFamilyDroppableRatioByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_columns_count/{name}": { + "get": { + "description": "get memtable columns count", + "summary": "get_memtable_columns_count", + "operationId": "ColumnFamilyMetricsMemtableColumnsCountByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_columns_count/": { + "get": { + "description": "get all memtable columns count", + "summary": "get_all_memtable_columns_count", + "operationId": "ColumnFamilyMetricsMemtableColumnsCountGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_on_heap_size/{name}": { + "get": { + "description": "Get the column family active memtable on heap size", + "summary": "get_memtable_on_heap_size", + "operationId": "ColumnFamilyMetricsMemtableOnHeapSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_on_heap_size": { + "get": { + "description": "Get all active memtable of all column family on heap size", + "summary": "get_all_memtable_on_heap_size", + "operationId": "ColumnFamilyMetricsMemtableOnHeapSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_off_heap_size/{name}": { + "get": { + "description": "Get the column family active memtable off heap size", + "summary": "get_memtable_off_heap_size", + "operationId": "ColumnFamilyMetricsMemtableOffHeapSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_off_heap_size": { + "get": { + "description": "Get all active memtable of all column family off heap size", + "summary": "get_all_memtable_off_heap_size", + "operationId": "ColumnFamilyMetricsMemtableOffHeapSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_live_data_size/{name}": { + "get": { + "description": "Get the column family active memtable live data size", + "summary": "get_memtable_live_data_size", + "operationId": "ColumnFamilyMetricsMemtableLiveDataSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_live_data_size": { + "get": { + "description": "Get all active memtable of all column family live data size", + "summary": "get_all_memtable_live_data_size", + "operationId": "ColumnFamilyMetricsMemtableLiveDataSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_on_heap_size/{name}": { + "get": { + "description": "Get all of the column family active and not memtables on heap size", + "summary": "get_cf_all_memtables_on_heap_size", + "operationId": "ColumnFamilyMetricsAllMemtablesOnHeapSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_on_heap_size": { + "get": { + "description": "Get all memtables active and not of all column family on heap size", + "summary": "get_all_cf_all_memtables_on_heap_size", + "operationId": "ColumnFamilyMetricsAllMemtablesOnHeapSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_off_heap_size/{name}": { + "get": { + "description": "Get all of the column family active and not memtables off heap size", + "summary": "get_cf_all_memtables_off_heap_size", + "operationId": "ColumnFamilyMetricsAllMemtablesOffHeapSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_off_heap_size": { + "get": { + "description": "Get all memtables active and not of all column family off heap size", + "summary": "get_all_cf_all_memtables_off_heap_size", + "operationId": "ColumnFamilyMetricsAllMemtablesOffHeapSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_live_data_size/{name}": { + "get": { + "description": "Get all of the column family active and not memtables live data size", + "summary": "get_cf_all_memtables_live_data_size", + "operationId": "ColumnFamilyMetricsAllMemtablesLiveDataSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/all_memtables_live_data_size": { + "get": { + "description": "Get all memtables active and not of all column family live data size", + "summary": "get_all_cf_all_memtables_live_data_size", + "operationId": "ColumnFamilyMetricsAllMemtablesLiveDataSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_switch_count/{name}": { + "get": { + "description": "Get memtable switch count", + "summary": "get_memtable_switch_count", + "operationId": "ColumnFamilyMetricsMemtableSwitchCountByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/memtable_switch_count": { + "get": { + "description": "Get all memtable switch count", + "summary": "get_all_memtable_switch_count", + "operationId": "ColumnFamilyMetricsMemtableSwitchCountGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/estimated_row_size_histogram/{name}": { + "get": { + "description": "Get estimated row size histogram", + "summary": "get_estimated_row_size_histogram", + "operationId": "ColumnFamilyMetricsEstimatedRowSizeHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/estimated_row_count/{name}": { + "get": { + "description": "Get estimated row count", + "summary": "get_estimated_row_count", + "operationId": "ColumnFamilyMetricsEstimatedRowCountByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/estimated_column_count_histogram/{name}": { + "get": { + "description": "Get estimated column count histogram", + "summary": "get_estimated_column_count_histogram", + "operationId": "ColumnFamilyMetricsEstimatedColumnCountHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/compression_ratio/{name}": { + "get": { + "description": "Get compression ratio", + "summary": "get_compression_ratio", + "operationId": "ColumnFamilyMetricsCompressionRatioByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/compression_ratio": { + "get": { + "description": "Get all compression ratio", + "summary": "get_all_compression_ratio", + "operationId": "ColumnFamilyMetricsCompressionRatioGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/{name}": { + "get": { + "description": "Get read latency", + "summary": "get_read_latency", + "operationId": "ColumnFamilyMetricsReadLatencyByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read/{name}": { + "get": { + "description": "Get number of reads", + "summary": "get_read", + "operationId": "ColumnFamilyMetricsReadByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read/": { + "get": { + "description": "Get number of reads from all column family, per shard", + "summary": "get_all_read", + "operationId": "ColumnFamilyMetricsReadGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/histogram/{name}": { + "get": { + "description": "Get read latency histogram", + "summary": "get_read_latency_histogram_depricated", + "operationId": "ColumnFamilyMetricsReadLatencyHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/histogram/": { + "get": { + "description": "Get read latency histogram from all column family", + "summary": "get_all_read_latency_histogram_depricated", + "operationId": "ColumnFamilyMetricsReadLatencyHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/histogram" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/moving_average_histogram/{name}": { + "get": { + "description": "Get read latency moving avrage histogram", + "summary": "get_read_latency_histogram", + "operationId": "ColumnFamilyMetricsReadLatencyMovingAverageHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/moving_average_histogram/": { + "get": { + "description": "Get read latency moving avrage histogram from all column family", + "summary": "get_all_read_latency_histogram", + "operationId": "ColumnFamilyMetricsReadLatencyMovingAverageHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/rate_moving_average_and_histogram" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency": { + "get": { + "description": "Get all read latency", + "summary": "get_all_read_latency", + "operationId": "ColumnFamilyMetricsReadLatencyGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/range_latency/{name}": { + "get": { + "description": "Get range latency", + "summary": "get_range_latency", + "operationId": "ColumnFamilyMetricsRangeLatencyByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/range_latency": { + "get": { + "description": "Get all range latency", + "summary": "get_all_range_latency", + "operationId": "ColumnFamilyMetricsRangeLatencyGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/{name}": { + "get": { + "description": "Get write latency", + "summary": "get_write_latency", + "operationId": "ColumnFamilyMetricsWriteLatencyByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write/{name}": { + "get": { + "description": "Get number of writes", + "summary": "get_write", + "operationId": "ColumnFamilyMetricsWriteByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write/": { + "get": { + "description": "Get number of writes from all column family, per shard", + "summary": "get_all_write", + "operationId": "ColumnFamilyMetricsWriteGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/histogram/{name}": { + "get": { + "description": "Get write latency histogram", + "summary": "get_write_latency_histogram_depricated", + "operationId": "ColumnFamilyMetricsWriteLatencyHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/histogram/": { + "get": { + "description": "Get write latency histogram of all column family", + "summary": "get_all_write_latency_histogram_depricated", + "operationId": "ColumnFamilyMetricsWriteLatencyHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/histogram" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/moving_average_histogram/{name}": { + "get": { + "description": "Get write latency moving average histogram", + "summary": "get_write_latency_histogram", + "operationId": "ColumnFamilyMetricsWriteLatencyMovingAverageHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/moving_average_histogram/": { + "get": { + "description": "Get write latency moving average histogram of all column family", + "summary": "get_all_write_latency_histogram", + "operationId": "ColumnFamilyMetricsWriteLatencyMovingAverageHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/rate_moving_average_and_histogram" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency": { + "get": { + "description": "Get all write latency", + "summary": "get_all_write_latency", + "operationId": "ColumnFamilyMetricsWriteLatencyGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/pending_flushes/{name}": { + "get": { + "description": "Get pending flushes", + "summary": "get_pending_flushes", + "operationId": "ColumnFamilyMetricsPendingFlushesByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/pending_flushes": { + "get": { + "description": "Get all pending flushes", + "summary": "get_all_pending_flushes", + "operationId": "ColumnFamilyMetricsPendingFlushesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/pending_compactions/{name}": { + "get": { + "description": "Get pending compactions", + "summary": "get_pending_compactions", + "operationId": "ColumnFamilyMetricsPendingCompactionsByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/pending_compactions": { + "get": { + "description": "Get all pending compactions", + "summary": "get_all_pending_compactions", + "operationId": "ColumnFamilyMetricsPendingCompactionsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/live_ss_table_count/{name}": { + "get": { + "description": "Get live ss table count", + "summary": "get_live_ss_table_count", + "operationId": "ColumnFamilyMetricsLiveSsTableCountByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/live_ss_table_count": { + "get": { + "description": "Get all live ss table count", + "summary": "get_all_live_ss_table_count", + "operationId": "ColumnFamilyMetricsLiveSsTableCountGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/live_disk_space_used/{name}": { + "get": { + "description": "Get live disk space used", + "summary": "get_live_disk_space_used", + "operationId": "ColumnFamilyMetricsLiveDiskSpaceUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/live_disk_space_used": { + "get": { + "description": "Get all live disk space used", + "summary": "get_all_live_disk_space_used", + "operationId": "ColumnFamilyMetricsLiveDiskSpaceUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/total_disk_space_used/{name}": { + "get": { + "description": "Get total disk space used", + "summary": "get_total_disk_space_used", + "operationId": "ColumnFamilyMetricsTotalDiskSpaceUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int64" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/total_disk_space_used": { + "get": { + "description": "Get all total disk space used", + "summary": "get_all_total_disk_space_used", + "operationId": "ColumnFamilyMetricsTotalDiskSpaceUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int64" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/min_row_size/{name}": { + "get": { + "description": "Get min row size", + "summary": "get_min_row_size", + "operationId": "ColumnFamilyMetricsMinRowSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/min_row_size": { + "get": { + "description": "Get all min row size", + "summary": "get_all_min_row_size", + "operationId": "ColumnFamilyMetricsMinRowSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/max_row_size/{name}": { + "get": { + "description": "Get max row size", + "summary": "get_max_row_size", + "operationId": "ColumnFamilyMetricsMaxRowSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/max_row_size": { + "get": { + "description": "Get all max row size", + "summary": "get_all_max_row_size", + "operationId": "ColumnFamilyMetricsMaxRowSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/mean_row_size/{name}": { + "get": { + "description": "Get mean row size", + "summary": "get_mean_row_size", + "operationId": "ColumnFamilyMetricsMeanRowSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/mean_row_size": { + "get": { + "description": "Get all mean row size", + "summary": "get_all_mean_row_size", + "operationId": "ColumnFamilyMetricsMeanRowSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_false_positives/{name}": { + "get": { + "description": "Get bloom filter false positives", + "summary": "get_bloom_filter_false_positives", + "operationId": "ColumnFamilyMetricsBloomFilterFalsePositivesByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_false_positives": { + "get": { + "description": "Get all bloom filter false positives", + "summary": "get_all_bloom_filter_false_positives", + "operationId": "ColumnFamilyMetricsBloomFilterFalsePositivesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/recent_bloom_filter_false_positives/{name}": { + "get": { + "description": "Get recent bloom filter false positives", + "summary": "get_recent_bloom_filter_false_positives", + "operationId": "ColumnFamilyMetricsRecentBloomFilterFalsePositivesByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/recent_bloom_filter_false_positives": { + "get": { + "description": "Get all recent bloom filter false positives", + "summary": "get_all_recent_bloom_filter_false_positives", + "operationId": "ColumnFamilyMetricsRecentBloomFilterFalsePositivesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_false_ratio/{name}": { + "get": { + "description": "Get bloom filter false ratio", + "summary": "get_bloom_filter_false_ratio", + "operationId": "ColumnFamilyMetricsBloomFilterFalseRatioByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_false_ratio": { + "get": { + "description": "Get all bloom filter false ratio", + "summary": "get_all_bloom_filter_false_ratio", + "operationId": "ColumnFamilyMetricsBloomFilterFalseRatioGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/recent_bloom_filter_false_ratio/{name}": { + "get": { + "description": "Get recent bloom filter false ratio", + "summary": "get_recent_bloom_filter_false_ratio", + "operationId": "ColumnFamilyMetricsRecentBloomFilterFalseRatioByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/recent_bloom_filter_false_ratio": { + "get": { + "description": "Get all recent bloom filter false ratio", + "summary": "get_all_recent_bloom_filter_false_ratio", + "operationId": "ColumnFamilyMetricsRecentBloomFilterFalseRatioGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_disk_space_used/{name}": { + "get": { + "description": "Get bloom filter disk space used", + "summary": "get_bloom_filter_disk_space_used", + "operationId": "ColumnFamilyMetricsBloomFilterDiskSpaceUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_disk_space_used": { + "get": { + "description": "Get all bloom filter disk space used", + "summary": "get_all_bloom_filter_disk_space_used", + "operationId": "ColumnFamilyMetricsBloomFilterDiskSpaceUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_off_heap_memory_used/{name}": { + "get": { + "description": "Get bloom filter off heap memory used", + "summary": "get_bloom_filter_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/bloom_filter_off_heap_memory_used": { + "get": { + "description": "Get all bloom filter off heap memory used", + "summary": "get_all_bloom_filter_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsBloomFilterOffHeapMemoryUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/index_summary_off_heap_memory_used/{name}": { + "get": { + "description": "Get index summary off heap memory used", + "summary": "get_index_summary_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/index_summary_off_heap_memory_used": { + "get": { + "description": "Get all index summary off heap memory used", + "summary": "get_all_index_summary_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsIndexSummaryOffHeapMemoryUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/compression_metadata_off_heap_memory_used/{name}": { + "get": { + "description": "Get compression metadata off heap memory used", + "summary": "get_compression_metadata_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/compression_metadata_off_heap_memory_used": { + "get": { + "description": "Get all compression metadata off heap memory used", + "summary": "get_all_compression_metadata_off_heap_memory_used", + "operationId": "ColumnFamilyMetricsCompressionMetadataOffHeapMemoryUsedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/speculative_retries/{name}": { + "get": { + "description": "Get speculative retries", + "summary": "get_speculative_retries", + "operationId": "ColumnFamilyMetricsSpeculativeRetriesByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/speculative_retries": { + "get": { + "description": "Get all speculative retries", + "summary": "get_all_speculative_retries", + "operationId": "ColumnFamilyMetricsSpeculativeRetriesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/key_cache_hit_rate/{name}": { + "get": { + "description": "Get key cache hit rate", + "summary": "get_key_cache_hit_rate", + "operationId": "ColumnFamilyMetricsKeyCacheHitRateByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/snapshots_size/{name}": { + "get": { + "description": "Get true snapshots size", + "summary": "get_true_snapshots_size", + "operationId": "ColumnFamilyMetricsSnapshotsSizeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/true_snapshots_size": { + "get": { + "description": "Get all true snapshots size", + "summary": "get_all_true_snapshots_size", + "operationId": "ColumnFamilyMetricsTrueSnapshotsSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_hit_out_of_range/{name}": { + "get": { + "description": "Get row cache hit out of range", + "summary": "get_row_cache_hit_out_of_range", + "operationId": "ColumnFamilyMetricsRowCacheHitOutOfRangeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_hit_out_of_range": { + "get": { + "description": "Get all row cache hit out of range", + "summary": "get_all_row_cache_hit_out_of_range", + "operationId": "ColumnFamilyMetricsRowCacheHitOutOfRangeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_hit/{name}": { + "get": { + "description": "Get row cache hit", + "summary": "get_row_cache_hit", + "operationId": "ColumnFamilyMetricsRowCacheHitByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_hit": { + "get": { + "description": "Get all row cache hit", + "summary": "get_all_row_cache_hit", + "operationId": "ColumnFamilyMetricsRowCacheHitGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_miss/{name}": { + "get": { + "description": "Get row cache miss", + "summary": "get_row_cache_miss", + "operationId": "ColumnFamilyMetricsRowCacheMissByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/row_cache_miss": { + "get": { + "description": "Get all row cache miss", + "summary": "get_all_row_cache_miss", + "operationId": "ColumnFamilyMetricsRowCacheMissGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_prepare/{name}": { + "get": { + "description": "Get cas prepare", + "summary": "get_cas_prepare", + "operationId": "ColumnFamilyMetricsCasPrepareByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_propose/{name}": { + "get": { + "description": "Get cas propose", + "summary": "get_cas_propose", + "operationId": "ColumnFamilyMetricsCasProposeByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_commit/{name}": { + "get": { + "description": "Get cas commit", + "summary": "get_cas_commit", + "operationId": "ColumnFamilyMetricsCasCommitByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/sstables_per_read_histogram/{name}": { + "get": { + "description": "Get sstables per read histogram", + "summary": "get_sstables_per_read_histogram", + "operationId": "ColumnFamilyMetricsSstablesPerReadHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/tombstone_scanned_histogram/{name}": { + "get": { + "description": "Get tombstone scanned histogram", + "summary": "get_tombstone_scanned_histogram", + "operationId": "ColumnFamilyMetricsTombstoneScannedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/live_scanned_histogram/{name}": { + "get": { + "description": "Get live scanned histogram", + "summary": "get_live_scanned_histogram", + "operationId": "ColumnFamilyMetricsLiveScannedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/col_update_time_delta_histogram/{name}": { + "get": { + "description": "Get col update time delta histogram", + "summary": "get_col_update_time_delta_histogram", + "operationId": "ColumnFamilyMetricsColUpdateTimeDeltaHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/coordinator/read": { + "get": { + "description": "Get coordinator read latency", + "summary": "get_coordinator_read_latency", + "operationId": "ColumnFamilyMetricsCoordinatorReadGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/coordinator/scan": { + "get": { + "description": "Get coordinator scan latency", + "summary": "get_coordinator_scan_latency", + "operationId": "ColumnFamilyMetricsCoordinatorScanGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/waiting_on_free_memtable": { + "get": { + "description": "Get waiting on free memtable space", + "summary": "get_waiting_on_free_memtable_space", + "operationId": "ColumnFamilyMetricsWaitingOnFreeMemtableGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/estimated_recent_histogram/{name}": { + "get": { + "description": "Get read latency", + "summary": "get_read_latency_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsReadLatencyEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/read_latency/estimated_histogram/{name}": { + "get": { + "description": "Get read latency", + "summary": "get_read_latency_estimated_histogram", + "operationId": "ColumnFamilyMetricsReadLatencyEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/range_latency/estimated_recent_histogram/{name}": { + "get": { + "description": "Get range latency", + "summary": "get_range_latency_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsRangeLatencyEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/range_latency/estimated_histogram/{name}": { + "get": { + "description": "Get range latency", + "summary": "get_range_latency_estimated_histogram", + "operationId": "ColumnFamilyMetricsRangeLatencyEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/estimated_recent_histogram/{name}": { + "get": { + "description": "Get write latency", + "summary": "get_write_latency_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsWriteLatencyEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/write_latency/estimated_histogram/{name}": { + "get": { + "description": "Get write latency", + "summary": "get_write_latency_estimated_histogram", + "operationId": "ColumnFamilyMetricsWriteLatencyEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_prepare/estimated_recent_histogram/{name}": { + "get": { + "description": "Get cas prepare", + "summary": "get_cas_prepare_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsCasPrepareEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_prepare/estimated_histogram/{name}": { + "get": { + "description": "Get cas prepare", + "summary": "get_cas_prepare_estimated_histogram", + "operationId": "ColumnFamilyMetricsCasPrepareEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_propose/estimated_recent_histogram/{name}": { + "get": { + "description": "Get cas propose", + "summary": "get_cas_propose_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsCasProposeEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_propose/estimated_histogram/{name}": { + "get": { + "description": "Get cas propose", + "summary": "get_cas_propose_estimated_histogram", + "operationId": "ColumnFamilyMetricsCasProposeEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_commit/estimated_recent_histogram/{name}": { + "get": { + "description": "Get cas commit", + "summary": "get_cas_commit_estimated_recent_histogram", + "operationId": "ColumnFamilyMetricsCasCommitEstimatedRecentHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/column_family/metrics/cas_commit/estimated_histogram/{name}": { + "get": { + "description": "Get cas commit", + "summary": "get_cas_commit_estimated_histogram", + "operationId": "ColumnFamilyMetricsCasCommitEstimatedHistogramByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The column family name in keyspace:name format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/recover/{path}": { + "post": { + "description": "Recover a single file", + "summary": "commitlog_recover", + "operationId": "CommitlogRecoverByPathPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "type": "string", + "description": "Full path of file or directory" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/segments/active": { + "get": { + "description": "file names (not full paths) of active commit log segments (segments containing unflushed data)", + "summary": "get_active_segment_names", + "operationId": "CommitlogSegmentsActiveGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/segments/archiving": { + "get": { + "description": "Returns files which are pending for archival attempt. Does NOT include failed archive attempts", + "summary": "get_archiving_segment_names", + "operationId": "CommitlogSegmentsArchivingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/metrics/completed_tasks": { + "get": { + "description": "Get completed tasks", + "summary": "get_completed_tasks", + "operationId": "CommitlogMetricsCompletedTasksGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/metrics/pending_tasks": { + "get": { + "description": "Get pending tasks", + "summary": "get_pending_tasks", + "operationId": "CommitlogMetricsPendingTasksGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commitlog/metrics/total_commit_log_size": { + "get": { + "description": "Get total commit log size", + "summary": "get_total_commit_log_size", + "operationId": "CommitlogMetricsTotalCommitLogSizeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commit_log/metrics/waiting_on_segment_allocation": { + "get": { + "description": "Get waiting on segment allocation", + "summary": "get_waiting_on_segment_allocation", + "operationId": "CommitLogMetricsWaitingOnSegmentAllocationGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/commit_log/metrics/waiting_on_commit": { + "get": { + "description": "Get waiting on commit", + "summary": "get_waiting_on_commit", + "operationId": "CommitLogMetricsWaitingOnCommitGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/compactions": { + "get": { + "description": "get List of running compactions", + "summary": "get_compactions", + "operationId": "CompactionManagerCompactionsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/summary" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/compaction_history": { + "get": { + "description": "get List of the compaction history", + "summary": "get_compaction_history", + "operationId": "CompactionManagerCompactionHistoryGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/history" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/compaction_info": { + "get": { + "description": "get a list of all active compaction info", + "summary": "get_compaction_info", + "operationId": "CompactionManagerCompactionInfoGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/compaction_info" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/force_user_defined_compaction": { + "post": { + "description": "Triggers the compaction of user specified sstables. You can specify files from various keyspaces and columnfamilies. If you do so, user defined compaction is performed several times to the groups of files in the same keyspace/columnfamily. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself.", + "summary": "force_user_defined_compaction", + "operationId": "CompactionManagerForceUserDefinedCompactionPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "data_files", + "in": "query", + "required": true, + "type": "string", + "description": "a comma separated list of sstable file to compact. must contain keyspace and columnfamily name in path(for 2.1+) or file name itself" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/stop_compaction": { + "post": { + "description": "Stop all running compaction-like tasks having the provided type", + "summary": "stop_compaction", + "operationId": "CompactionManagerStopCompactionPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "type", + "in": "query", + "required": true, + "type": "string", + "description": "the type of compaction to stop. Can be one of: - COMPACTION - VALIDATION - CLEANUP - SCRUB - INDEX_BUILD" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/metrics/pending_tasks": { + "get": { + "description": "Get pending tasks", + "summary": "get_pending_tasks1", + "operationId": "CompactionManagerMetricsPendingTasksGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/metrics/completed_tasks": { + "get": { + "description": "Get completed tasks", + "summary": "get_completed_tasks1", + "operationId": "CompactionManagerMetricsCompletedTasksGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/metrics/total_compactions_completed": { + "get": { + "description": "Get total compactions completed", + "summary": "get_total_compactions_completed", + "operationId": "CompactionManagerMetricsTotalCompactionsCompletedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/compaction_manager/metrics/bytes_compacted": { + "get": { + "description": "Get bytes compacted", + "summary": "get_bytes_compacted", + "operationId": "CompactionManagerMetricsBytesCompactedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/snitch/datacenter": { + "get": { + "description": "Provides the Datacenter name depending on the respective snitch used, given the hostname/ip", + "summary": "get_datacenter", + "operationId": "SnitchDatacenterGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": false, + "type": "string", + "description": "The host name. If absent, the local server broadcast/listen address is used" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/snitch/rack": { + "get": { + "description": "Provides the Rack name depending on the respective snitch used, given the host name/ip", + "summary": "get_rack", + "operationId": "SnitchRackGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": false, + "type": "string", + "description": "The host name. If absent, the local server broadcast/listen address is used" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/snitch/name": { + "get": { + "description": "Provides the snitch name of the cluster", + "summary": "get_snitch_name", + "operationId": "SnitchNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/phi": { + "get": { + "description": "Get the phi convict threshold", + "summary": "get_phi_convict_threshold", + "operationId": "FailureDetectorPhiGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the phi convict threshold", + "summary": "set_phi_convict_threshold", + "operationId": "FailureDetectorPhiPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "phi", + "in": "query", + "required": true, + "type": "string", + "description": "The new phi value" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/endpoint_phi_values": { + "get": { + "description": "Get end point phi values", + "summary": "get_endpoint_phi_values", + "operationId": "FailureDetectorEndpointPhiValuesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/endpoints/": { + "get": { + "description": "Get all endpoint states", + "summary": "get_all_endpoint_states", + "operationId": "FailureDetectorEndpointsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/endpoint_state" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/endpoints/states/{addr}": { + "get": { + "description": "Get endpoint states", + "summary": "get_endpoint_state", + "operationId": "FailureDetectorEndpointsStatesByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/count/endpoint/down": { + "get": { + "description": "Get count down endpoint", + "summary": "get_down_endpoint_count", + "operationId": "FailureDetectorCountEndpointDownGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/count/endpoint/up": { + "get": { + "description": "Get count up endpoint", + "summary": "get_up_endpoint_count", + "operationId": "FailureDetectorCountEndpointUpGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/failure_detector/simple_states": { + "get": { + "description": "Get simple_states", + "summary": "get_simple_states", + "operationId": "FailureDetectorSimpleStatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/endpoint/down/": { + "get": { + "description": "Get the addreses of the down endpoints", + "summary": "get_down_endpoint", + "operationId": "GossiperEndpointDownGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/endpoint/live/": { + "get": { + "description": "Get the addreses of live endpoints", + "summary": "get_live_endpoint", + "operationId": "GossiperEndpointLiveGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/downtime/{addr}": { + "get": { + "description": "Get the downtime of an end point", + "summary": "get_endpoint_downtime", + "operationId": "GossiperDowntimeByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/generation_number/{addr}": { + "get": { + "description": "Returns files which are pending for archival attempt. Does NOT include failed archive attempts", + "summary": "get_current_generation_number", + "operationId": "GossiperGenerationNumberByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/heart_beat_version/{addr}": { + "get": { + "description": "Get heart beat version for a node", + "summary": "get_current_heart_beat_version", + "operationId": "GossiperHeartBeatVersionByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/gossiper/assassinate/{addr}": { + "post": { + "description": "Assassinate an end point", + "summary": "assassinate_endpoint", + "operationId": "GossiperAssassinateByAddrPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint address" + }, + { + "name": "unsafe", + "in": "query", + "required": false, + "type": "boolean", + "description": "Set to True to perform an unsafe assassination" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/hinted_handoff/hints": { + "get": { + "description": "List all the endpoints that this node has hints for.", + "summary": "list_endpoints_pending_hints", + "operationId": "HintedHandoffHintsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "delete": { + "description": "Truncate all the hints", + "summary": "truncate_all_hints", + "operationId": "HintedHandoffHintsDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": false, + "type": "string", + "description": "Optional String rep. of endpoint address to delete hints for" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/hinted_handoff/schedule": { + "post": { + "description": "force hint delivery to an endpoint", + "summary": "schedule_hint_delivery", + "operationId": "HintedHandoffSchedulePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": true, + "type": "string", + "description": "String rep. of endpoint address" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/hinted_handoff/pause": { + "post": { + "description": "pause hints delivery", + "summary": "pause_hints_delivery", + "operationId": "HintedHandoffPausePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "pause", + "in": "query", + "required": true, + "type": "boolean", + "description": "pause status" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/hinted_handoff/metrics/create_hint/{addr}": { + "get": { + "description": "Get create hint count", + "summary": "get_create_hint_count", + "operationId": "HintedHandoffMetricsCreateHintByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The peer address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/hinted_handoff/metrics/not_stored_hints/{addr}": { + "get": { + "description": "Get not stored hints count", + "summary": "get_not_stored_hints_count", + "operationId": "HintedHandoffMetricsNotStoredHintsByAddrGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "path", + "required": true, + "type": "string", + "description": "The peer address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/lsa/compact": { + "post": { + "description": "Force compaction of all regions", + "summary": "lsa_compact", + "operationId": "LsaCompactPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/timeout": { + "get": { + "description": "Get the number of timeout messages", + "summary": "get_timeout_messages", + "operationId": "MessagingServiceMessagesTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/dropped_by_ver": { + "get": { + "description": "Get the number of dropped messages per verb", + "summary": "get_dropped_messages_by_ver", + "operationId": "MessagingServiceMessagesDroppedByVerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/verb_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/dropped": { + "get": { + "description": "Get the number of messages that were dropped before sending", + "summary": "get_dropped_messages", + "operationId": "MessagingServiceMessagesDroppedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/replied": { + "get": { + "description": "Get the number of replied messages", + "summary": "get_completed_messages", + "operationId": "MessagingServiceMessagesRepliedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/sent": { + "get": { + "description": "Get the number of sent messages", + "summary": "get_sent_messages", + "operationId": "MessagingServiceMessagesSentGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/pending": { + "get": { + "description": "Get the number of pending messages", + "summary": "get_pending_messages", + "operationId": "MessagingServiceMessagesPendingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/exception": { + "get": { + "description": "Get the number of messages return with an exception", + "summary": "get_exception_messages", + "operationId": "MessagingServiceMessagesExceptionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/respond_pending": { + "get": { + "description": "Get the number of messages waiting for respond", + "summary": "get_respond_pending_messages", + "operationId": "MessagingServiceMessagesRespondPendingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/messages/respond_completed": { + "get": { + "description": "Get the number of completed respond messages", + "summary": "get_respond_completed_messages", + "operationId": "MessagingServiceMessagesRespondCompletedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/message_counter" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/messaging_service/version": { + "get": { + "description": "Get the version number", + "summary": "get_version", + "operationId": "MessagingServiceVersionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "addr", + "in": "query", + "required": true, + "type": "string", + "description": "Address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/total_hints": { + "get": { + "description": "Get total hints", + "summary": "get_total_hints", + "operationId": "StorageProxyTotalHintsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/hinted_handoff_enabled": { + "get": { + "description": "Return true if hinted handoff enabled", + "summary": "get_hinted_handoff_enabled", + "operationId": "StorageProxyHintedHandoffEnabledGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set hinted handoff status", + "summary": "set_hinted_handoff_enabled", + "operationId": "StorageProxyHintedHandoffEnabledPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "enable", + "in": "query", + "required": true, + "type": "boolean", + "description": "Set to true to enable hinted handoff" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/hinted_handoff_enabled_by_dc": { + "get": { + "description": "Get the hinted handoff enabled by dc", + "summary": "get_hinted_handoff_enabled_by_dc", + "operationId": "StorageProxyHintedHandoffEnabledByDcGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper_list" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the hinted handoff enabled by dc", + "summary": "set_hinted_handoff_enabled_by_dc_list", + "operationId": "StorageProxyHintedHandoffEnabledByDcPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "dcs", + "in": "query", + "required": true, + "type": "string", + "description": "The dcs to enable in the CSV format" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/max_hint_window": { + "get": { + "description": "Get the max hint window", + "summary": "get_max_hint_window", + "operationId": "StorageProxyMaxHintWindowGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the max hint window", + "summary": "set_max_hint_window", + "operationId": "StorageProxyMaxHintWindowPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "ms", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "max hint window in ms" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/max_hints_in_progress": { + "get": { + "description": "Get max hints in progress", + "summary": "get_max_hints_in_progress", + "operationId": "StorageProxyMaxHintsInProgressGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set max hints in progress", + "summary": "set_max_hints_in_progress", + "operationId": "StorageProxyMaxHintsInProgressPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "qs", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "max hints in progress" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/hints_in_progress": { + "get": { + "description": "get hints in progress", + "summary": "get_hints_in_progress", + "operationId": "StorageProxyHintsInProgressGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/rpc_timeout": { + "get": { + "description": "Get the RPC timeout in seconds", + "summary": "get_rpc_timeout", + "operationId": "StorageProxyRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the RPC timeout", + "summary": "set_rpc_timeout", + "operationId": "StorageProxyRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "Timeout in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/read_rpc_timeout": { + "get": { + "description": "Get the read RPC timeout in seconds", + "summary": "get_read_rpc_timeout", + "operationId": "StorageProxyReadRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the read RPC timeout", + "summary": "set_read_rpc_timeout", + "operationId": "StorageProxyReadRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "The timeout in second" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/write_rpc_timeout": { + "get": { + "description": "Get the write RPC timeout in seconds", + "summary": "get_write_rpc_timeout", + "operationId": "StorageProxyWriteRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set the write RPC timeout", + "summary": "set_write_rpc_timeout", + "operationId": "StorageProxyWriteRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "timeout in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/counter_write_rpc_timeout": { + "get": { + "description": "Get counter write rpc timeout in seconds", + "summary": "get_counter_write_rpc_timeout", + "operationId": "StorageProxyCounterWriteRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set counter write rpc timeout", + "summary": "set_counter_write_rpc_timeout", + "operationId": "StorageProxyCounterWriteRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "timeout in seconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/cas_contention_timeout": { + "get": { + "description": "Get CAS contention timeout in seconds", + "summary": "get_cas_contention_timeout", + "operationId": "StorageProxyCasContentionTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set CAS contention timeout", + "summary": "set_cas_contention_timeout", + "operationId": "StorageProxyCasContentionTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "timeout in second" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/range_rpc_timeout": { + "get": { + "description": "Get range rpc timeout in seconds", + "summary": "get_range_rpc_timeout", + "operationId": "StorageProxyRangeRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set range rpc timeout", + "summary": "set_range_rpc_timeout", + "operationId": "StorageProxyRangeRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "timeout in second" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/truncate_rpc_timeout": { + "get": { + "description": "Get truncate rpc timeout in seconds", + "summary": "get_truncate_rpc_timeout", + "operationId": "StorageProxyTruncateRpcTimeoutGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set truncate rpc timeout", + "summary": "set_truncate_rpc_timeout", + "operationId": "StorageProxyTruncateRpcTimeoutPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "timeout", + "in": "query", + "required": true, + "type": "string", + "description": "timeout in second" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/reload_trigger_classes": { + "post": { + "description": "Reload trigger classes", + "summary": "reload_trigger_classes", + "operationId": "StorageProxyReloadTriggerClassesPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/read_repair_attempted": { + "get": { + "description": "Get read repair attempted", + "summary": "get_read_repair_attempted", + "operationId": "StorageProxyReadRepairAttemptedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/read_repair_repaired_blocking": { + "get": { + "description": "Get read repair repaired blocking", + "summary": "get_read_repair_repaired_blocking", + "operationId": "StorageProxyReadRepairRepairedBlockingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/read_repair_repaired_background": { + "get": { + "description": "Get read repair repaired background", + "summary": "get_read_repair_repaired_background", + "operationId": "StorageProxyReadRepairRepairedBackgroundGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/schema_versions": { + "get": { + "description": "Get a map of the schema versions", + "summary": "get_schema_versions", + "operationId": "StorageProxySchemaVersionsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper_list" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_read/timeouts": { + "get": { + "description": "Get CAS read timeout", + "summary": "get_cas_read_timeouts", + "operationId": "StorageProxyMetricsCasReadTimeoutsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_read/unavailables": { + "get": { + "description": "Get CAS read unavailables", + "summary": "get_cas_read_unavailables", + "operationId": "StorageProxyMetricsCasReadUnavailablesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_write/timeouts": { + "get": { + "description": "Get CAS write timeout", + "summary": "get_cas_write_timeouts", + "operationId": "StorageProxyMetricsCasWriteTimeoutsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_write/unavailables": { + "get": { + "description": "Get CAS write unavailables", + "summary": "get_cas_write_unavailables", + "operationId": "StorageProxyMetricsCasWriteUnavailablesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_write/unfinished_commit": { + "get": { + "description": "Get cas write metrics", + "summary": "get_cas_write_metrics_unfinished_commit", + "operationId": "StorageProxyMetricsCasWriteUnfinishedCommitGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_write/contention": { + "get": { + "description": "Get cas write metrics", + "summary": "get_cas_write_metrics_contention", + "operationId": "StorageProxyMetricsCasWriteContentionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_write/condition_not_met": { + "get": { + "description": "Get cas write metrics", + "summary": "get_cas_write_metrics_condition_not_met", + "operationId": "StorageProxyMetricsCasWriteConditionNotMetGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_read/unfinished_commit": { + "get": { + "description": "Get cas read metrics", + "summary": "get_cas_read_metrics_unfinished_commit", + "operationId": "StorageProxyMetricsCasReadUnfinishedCommitGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_read/contention": { + "get": { + "description": "Get cas read metrics", + "summary": "get_cas_read_metrics_contention", + "operationId": "StorageProxyMetricsCasReadContentionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/cas_read/condition_not_met": { + "get": { + "description": "Get cas read metrics", + "summary": "get_cas_read_metrics_condition_not_met", + "operationId": "StorageProxyMetricsCasReadConditionNotMetGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/timeouts": { + "get": { + "description": "Get read metrics", + "summary": "get_read_metrics_timeouts", + "operationId": "StorageProxyMetricsReadTimeoutsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/unavailables": { + "get": { + "description": "Get read metrics", + "summary": "get_read_metrics_unavailables", + "operationId": "StorageProxyMetricsReadUnavailablesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/timeouts_rates": { + "get": { + "description": "Get read metrics rates", + "summary": "get_read_metrics_timeouts_rates", + "operationId": "StorageProxyMetricsReadTimeoutsRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/unavailables_rates": { + "get": { + "description": "Get read metrics rates", + "summary": "get_read_metrics_unavailables_rates", + "operationId": "StorageProxyMetricsReadUnavailablesRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/histogram": { + "get": { + "description": "Get read metrics", + "summary": "get_read_metrics_latency_histogram_depricated", + "operationId": "StorageProxyMetricsReadHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/histogram": { + "get": { + "description": "Get range metrics", + "summary": "get_range_metrics_latency_histogram_depricated", + "operationId": "StorageProxyMetricsRangeHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/moving_average_histogram": { + "get": { + "description": "Get read metrics", + "summary": "get_read_metrics_latency_histogram", + "operationId": "StorageProxyMetricsReadMovingAverageHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/moving_average_histogram": { + "get": { + "description": "Get range metrics rate and histogram", + "summary": "get_range_metrics_latency_histogram", + "operationId": "StorageProxyMetricsRangeMovingAverageHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/timeouts": { + "get": { + "description": "Get range metrics", + "summary": "get_range_metrics_timeouts", + "operationId": "StorageProxyMetricsRangeTimeoutsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/unavailables": { + "get": { + "description": "Get range metrics", + "summary": "get_range_metrics_unavailables", + "operationId": "StorageProxyMetricsRangeUnavailablesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/timeouts_rates": { + "get": { + "description": "Get range metrics rates", + "summary": "get_range_metrics_timeouts_rates", + "operationId": "StorageProxyMetricsRangeTimeoutsRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/unavailables_rates": { + "get": { + "description": "Get range metrics rates", + "summary": "get_range_metrics_unavailables_rates", + "operationId": "StorageProxyMetricsRangeUnavailablesRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/timeouts": { + "get": { + "description": "Get write metrics", + "summary": "get_write_metrics_timeouts", + "operationId": "StorageProxyMetricsWriteTimeoutsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/unavailables": { + "get": { + "description": "Get write metrics", + "summary": "get_write_metrics_unavailables", + "operationId": "StorageProxyMetricsWriteUnavailablesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/timeouts_rates": { + "get": { + "description": "Get write metrics rates", + "summary": "get_write_metrics_timeouts_rates", + "operationId": "StorageProxyMetricsWriteTimeoutsRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/unavailables_rates": { + "get": { + "description": "Get write metrics rates", + "summary": "get_write_metrics_unavailables_rates", + "operationId": "StorageProxyMetricsWriteUnavailablesRatesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/rate_moving_average" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/histogram": { + "get": { + "description": "Get write metrics", + "summary": "get_write_metrics_latency_histogram_depricated", + "operationId": "StorageProxyMetricsWriteHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/moving_average_histogram": { + "get": { + "description": "Get write metrics", + "summary": "get_write_metrics_latency_histogram", + "operationId": "StorageProxyMetricsWriteMovingAverageHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read/estimated_histogram/": { + "get": { + "description": "Get read estimated latency", + "summary": "get_read_estimated_histogram", + "operationId": "StorageProxyMetricsReadEstimatedHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/read": { + "get": { + "description": "Get read latency", + "summary": "get_read_latency", + "operationId": "StorageProxyMetricsReadGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write/estimated_histogram/": { + "get": { + "description": "Get write estimated latency", + "summary": "get_write_estimated_histogram", + "operationId": "StorageProxyMetricsWriteEstimatedHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/write": { + "get": { + "description": "Get write latency", + "summary": "get_write_latency", + "operationId": "StorageProxyMetricsWriteGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range/estimated_histogram/": { + "get": { + "description": "Get range estimated latency", + "summary": "get_range_estimated_histogram", + "operationId": "StorageProxyMetricsRangeEstimatedHistogramGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_proxy/metrics/range": { + "get": { + "description": "Get range latency", + "summary": "get_range_latency", + "operationId": "StorageProxyMetricsRangeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/hostid/local": { + "get": { + "description": "Returns the local host id", + "summary": "local_hostid", + "operationId": "StorageServiceHostidLocalGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/tokens": { + "get": { + "description": "Returns a list of the tokens for this node", + "summary": "get_tokens", + "operationId": "StorageServiceTokensGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/tokens/{endpoint}": { + "get": { + "description": "Returns a list of the tokens for or a specified node", + "summary": "get_node_tokens", + "operationId": "StorageServiceTokensByEndpointGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "endpoint", + "in": "path", + "required": true, + "type": "string", + "description": "The endpoint" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/commitlog": { + "get": { + "description": "Returns the location of the commit log files", + "summary": "get_commitlog", + "operationId": "StorageServiceCommitlogGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/tokens_endpoint": { + "get": { + "description": "Returns a list of the tokens endpoint mapping", + "summary": "get_token_endpoint", + "operationId": "StorageServiceTokensEndpointGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/nodes/leaving": { + "get": { + "description": "Retrieve the list of nodes currently leaving the ring", + "summary": "get_leaving_nodes", + "operationId": "StorageServiceNodesLeavingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/nodes/moving": { + "get": { + "description": "Retrieve the list of nodes currently moving in the ring", + "summary": "get_moving_nodes", + "operationId": "StorageServiceNodesMovingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/nodes/joining": { + "get": { + "description": "Retrieve the list of nodes currently bootstrapping into the ring", + "summary": "get_joining_nodes", + "operationId": "StorageServiceNodesJoiningGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/release_version": { + "get": { + "description": "Fetch a string representation of the Cassandra version.", + "summary": "get_release_version", + "operationId": "StorageServiceReleaseVersionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/scylla_release_version": { + "get": { + "description": "Fetch a string representation of the Scylla version.", + "summary": "get_scylla_release_version", + "operationId": "StorageServiceScyllaReleaseVersionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/schema_version": { + "get": { + "description": "Fetch a string representation of the current Schema version.", + "summary": "get_schema_version", + "operationId": "StorageServiceSchemaVersionGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/data_file/locations": { + "get": { + "description": "Get the list of all data file locations from conf", + "summary": "get_all_data_file_locations", + "operationId": "StorageServiceDataFileLocationsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/saved_caches/location": { + "get": { + "description": "Get location of the saved caches dir", + "summary": "get_saved_caches_location", + "operationId": "StorageServiceSavedCachesLocationGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/range_to_endpoint_map/{keyspace}": { + "get": { + "description": "Retrieve a map of range to end points that describe the ring topology of a Cassandra cluster.", + "summary": "get_range_to_endpoint_map", + "operationId": "StorageServiceRangeToEndpointMapByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + }, + { + "name": "rpc", + "in": "query", + "required": false, + "type": "boolean", + "description": "When set to true, return the rpc address" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/maplist_mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/pending_range/{keyspace}": { + "get": { + "description": "Retrieve a map of pending ranges to endpoints that describe the ring topology", + "summary": "get_pending_range_to_endpoint_map", + "operationId": "StorageServicePendingRangeByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/maplist_mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/describe_ring/": { + "get": { + "description": "The TokenRange for a any keyspace", + "summary": "describe_any_ring", + "operationId": "StorageServiceDescribeRingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/token_range" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/describe_ring/{keyspace}": { + "get": { + "description": "The TokenRange for a given keyspace", + "summary": "describe_ring", + "operationId": "StorageServiceDescribeRingByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to fetch information about" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/token_range" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/ownership/{keyspace}": { + "get": { + "description": "Effective ownership is % of the data each node owns given the keyspace", + "summary": "get_effective_ownership", + "operationId": "StorageServiceOwnershipByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to fetch information about" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/ownership/": { + "get": { + "description": "The mapping from token -> % of cluster owned by that token", + "summary": "get_ownership", + "operationId": "StorageServiceOwnershipGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/host_id": { + "get": { + "description": "Retrieve the mapping of endpoint to host ID", + "summary": "get_host_id_map", + "operationId": "StorageServiceHostIdGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/load": { + "get": { + "description": "get load value", + "summary": "get_load", + "operationId": "StorageServiceLoadGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/load_map": { + "get": { + "description": "load value. Keys are IP addresses", + "summary": "get_load_map", + "operationId": "StorageServiceLoadMapGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/map_string_double" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/generation_number": { + "get": { + "description": "Return the generation value for this node.", + "summary": "get_current_generation_number", + "operationId": "StorageServiceGenerationNumberGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/natural_endpoints/{keyspace}": { + "get": { + "description": "This method returns the N endpoints that are responsible for storing the specified key i.e for replication. the endpoint responsible for this key", + "summary": "get_natural_endpoints", + "operationId": "StorageServiceNaturalEndpointsByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + }, + { + "name": "cf", + "in": "query", + "required": true, + "type": "string", + "description": "Column family name" + }, + { + "name": "key", + "in": "query", + "required": true, + "type": "string", + "description": "key for which we need to find the endpoint return value - the endpoint responsible for this key" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/snapshots": { + "get": { + "description": "Get the details of all the snapshot", + "summary": "get_snapshot_details", + "operationId": "StorageServiceSnapshotsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/snapshots" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Takes the snapshot for the given keyspaces. A snapshot name must be specified.", + "summary": "take_snapshot", + "operationId": "StorageServiceSnapshotsPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "tag", + "in": "query", + "required": false, + "type": "string", + "description": "the tag given to the snapshot" + }, + { + "name": "kn", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated keyspaces name to snapshot" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "the column family to snapshot" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "delete": { + "description": "Remove the snapshot with the given name from the given keyspaces. If no tag is specified all snapshots will be removed", + "summary": "del_snapshot", + "operationId": "StorageServiceSnapshotsDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "tag", + "in": "query", + "required": false, + "type": "string", + "description": "the tag given to the snapshot" + }, + { + "name": "kn", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated keyspaces name to snapshot" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/snapshots/size/true": { + "get": { + "description": "Get the true size taken by all snapshots across all keyspaces.", + "summary": "true_snapshots_size", + "operationId": "StorageServiceSnapshotsSizeTrueGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspace_compaction/{keyspace}": { + "post": { + "description": "Forces major compaction of a single keyspace", + "summary": "force_keyspace_compaction", + "operationId": "StorageServiceKeyspaceCompactionByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspace_cleanup/{keyspace}": { + "post": { + "description": "Trigger a cleanup of keys on a single keyspace", + "summary": "force_keyspace_cleanup", + "operationId": "StorageServiceKeyspaceCleanupByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspace_scrub/{keyspace}": { + "get": { + "description": "Scrub (deserialize + reserialize at the latest version, skipping bad rows if any) the given keyspace. If columnFamilies array is empty, all CFs are scrubbed. Scrubbed CFs will be snapshotted first, if disableSnapshot is false", + "summary": "scrub", + "operationId": "StorageServiceKeyspaceScrubByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to query about" + }, + { + "name": "disable_snapshot", + "in": "query", + "required": false, + "type": "boolean", + "description": "When set to true, disable snapshot" + }, + { + "name": "skip_corrupted", + "in": "query", + "required": false, + "type": "boolean", + "description": "When set to true, skip corrupted" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspace_upgrade_sstables/{keyspace}": { + "get": { + "description": "Rewrite all sstables to the latest version. Unlike scrub, it doesn't skip bad rows and do not snapshot sstables first.", + "summary": "upgrade_sstables", + "operationId": "StorageServiceKeyspaceUpgradeSstablesByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "exclude_current_version", + "in": "query", + "required": false, + "type": "boolean", + "description": "When set to true exclude current version" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspace_flush/{keyspace}": { + "post": { + "description": "Flush all memtables for the given column families, or all columnfamilies for the given keyspace if none are explicitly listed.", + "summary": "force_keyspace_flush", + "operationId": "StorageServiceKeyspaceFlushByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to flush" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/active_repair/": { + "get": { + "description": "Return an array with the ids of the currently active repairs", + "summary": "get_active_repair_async", + "operationId": "StorageServiceActiveRepairGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/repair_async/{keyspace}": { + "post": { + "description": "Invoke repair asynchronously. You can track repair progress by using the get supplying id", + "summary": "repair_async", + "operationId": "StorageServiceRepairAsyncByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace to repair" + }, + { + "name": "primaryRange", + "in": "query", + "required": false, + "type": "string", + "description": "If the value is the string 'true' with any capitalization, repair only the first range returned by the partitioner." + }, + { + "name": "parallelism", + "in": "query", + "required": false, + "type": "string", + "description": "Repair parallelism, can be 0 (sequential), 1 (parallel) or 2 (datacenter-aware)." + }, + { + "name": "incremental", + "in": "query", + "required": false, + "type": "string", + "description": "If the value is the string 'true' with any capitalization, perform incremental repair." + }, + { + "name": "jobThreads", + "in": "query", + "required": false, + "type": "string", + "description": "An integer specifying the parallelism on each node." + }, + { + "name": "ranges", + "in": "query", + "required": false, + "type": "string", + "description": "An explicit list of ranges to repair, overriding the default choice. Each range is expressed as token1:token2, and multiple ranges can be given as a comma separated list." + }, + { + "name": "startToken", + "in": "query", + "required": false, + "type": "string", + "description": "Token on which to begin repair" + }, + { + "name": "endToken", + "in": "query", + "required": false, + "type": "string", + "description": "Token on which to end repair" + }, + { + "name": "columnFamilies", + "in": "query", + "required": false, + "type": "string", + "description": "Which column families to repair in the given keyspace. Multiple columns families can be named separated by commas. If this option is missing, all column families in the keyspace are repaired." + }, + { + "name": "dataCenters", + "in": "query", + "required": false, + "type": "string", + "description": "Which data centers are to participate in this repair. Multiple data centers can be listed separated by commas." + }, + { + "name": "hosts", + "in": "query", + "required": false, + "type": "string", + "description": "Which hosts are to participate in this repair. Multiple hosts can be listed separated by commas." + }, + { + "name": "trace", + "in": "query", + "required": false, + "type": "string", + "description": "If the value is the string 'true' with any capitalization, enable tracing of the repair." + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Track already running repair progress", + "summary": "repair_async_status", + "operationId": "StorageServiceRepairAsyncByKeyspaceGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace repair is running on" + }, + { + "name": "id", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "The repair ID to check for status" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/repair_async_statusResponse" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/force_terminate": { + "post": { + "description": "Force terminate all repair sessions", + "summary": "force_terminate_all_repair_sessions", + "operationId": "StorageServiceForceTerminatePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/force_terminate_repair": { + "post": { + "description": "Force terminate all repair sessions", + "summary": "force_terminate_all_repair_sessions_new", + "operationId": "StorageServiceForceTerminateRepairPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/decommission": { + "post": { + "description": "transfer this node's data to other machines and remove it from service.", + "summary": "decommission", + "operationId": "StorageServiceDecommissionPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/move": { + "post": { + "description": "This node will unload its data onto its neighbors, and bootstrap to the new token.", + "summary": "move", + "operationId": "StorageServiceMovePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "new_token", + "in": "query", + "required": true, + "type": "string", + "description": "token to move this node to" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/remove_node": { + "post": { + "description": "Removes token (and all data associated with enpoint that had it) from the ring", + "summary": "remove_node", + "operationId": "StorageServiceRemoveNodePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host_id", + "in": "query", + "required": true, + "type": "string", + "description": "Remove the node with host_id from the cluster" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/removal_status": { + "get": { + "description": "Get the status of a token removal.", + "summary": "get_removal_status", + "operationId": "StorageServiceRemovalStatusGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/force_remove_completion": { + "post": { + "description": "Force a remove operation to finish.", + "summary": "force_remove_completion", + "operationId": "StorageServiceForceRemoveCompletionPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/logging_level": { + "post": { + "description": "set the logging level at runtime

If both classQualifer and level are empty/null, it will reload the configuration to reset.
If classQualifer is not empty but level is empty/null, it will set the level to null for the defined classQualifer
If level cannot be parsed, then the level will be defaulted to DEBUG

The logback configuration should have < jmxConfigurator /> set", + "summary": "set_logging_level", + "operationId": "StorageServiceLoggingLevelPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "class_qualifier", + "in": "query", + "required": true, + "type": "string", + "description": "The logger's classQualifer" + }, + { + "name": "level", + "in": "query", + "required": true, + "type": "string", + "description": "The log level" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "get the runtime logging levels", + "summary": "get_logging_levels", + "operationId": "StorageServiceLoggingLevelGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/operation_mode": { + "get": { + "description": "Get the operational mode (leaving, joining, normal, decommissioned, client)", + "summary": "get_operation_mode", + "operationId": "StorageServiceOperationModeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/is_starting": { + "get": { + "description": "Returns whether the storage service is starting or not", + "summary": "is_starting", + "operationId": "StorageServiceIsStartingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/drain": { + "get": { + "description": "Get the progress of a drain operation", + "summary": "get_drain_progress", + "operationId": "StorageServiceDrainGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "makes node unavailable for writes, flushes memtables and replays commitlog", + "summary": "drain", + "operationId": "StorageServiceDrainPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/truncate/{keyspace}": { + "post": { + "description": "Truncates (deletes) the given columnFamily from the provided keyspace. Calling truncate results in actual deletion of all data in the cluster under the given columnFamily and it will fail unless all hosts are up. All data in the given column family will be deleted, but its definition will not be affected.", + "summary": "truncate", + "operationId": "StorageServiceTruncateByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Column family name" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/keyspaces": { + "get": { + "description": "Get the keyspaces", + "summary": "get_keyspaces", + "operationId": "StorageServiceKeyspacesGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "enum": [ + "all", + "user", + "non_local_strategy" + ], + "type": "string", + "description": "Which keyspaces to return" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/update_snitch": { + "post": { + "description": "Change endpointsnitch class and dynamic-ness (and dynamic attributes) at runtime", + "summary": "update_snitch", + "operationId": "StorageServiceUpdateSnitchPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "ep_snitch_class_name", + "in": "query", + "required": true, + "type": "string", + "description": "The canonical path name for a class implementing IEndpointSnitch" + }, + { + "name": "dynamic", + "in": "query", + "required": true, + "type": "boolean", + "description": "When true dynamicsnitch is used" + }, + { + "name": "dynamic_update_interval", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "integer, in ms (default 100)" + }, + { + "name": "dynamic_reset_interval", + "in": "query", + "required": false, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "integer, in ms (default 600,000)" + }, + { + "name": "dynamic_badness_threshold", + "in": "query", + "required": false, + "type": "string", + "description": "Dynamic badness threshold, (default 0.0)" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/gossiping": { + "delete": { + "description": "allows a user to forcibly 'kill' a sick node", + "summary": "stop_gossiping", + "operationId": "StorageServiceGossipingDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "allows a user to recover a forcibly 'killed' node", + "summary": "start_gossiping", + "operationId": "StorageServiceGossipingPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "allows a user to see whether gossip is running or not", + "summary": "is_gossip_running", + "operationId": "StorageServiceGossipingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/stop_daemon": { + "post": { + "description": "allows a user to forcibly completely stop cassandra", + "summary": "stop_daemon", + "operationId": "StorageServiceStopDaemonPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/is_initialized": { + "get": { + "description": "Determine if gossip is enable", + "summary": "is_initialized", + "operationId": "StorageServiceIsInitializedGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/rpc_server": { + "delete": { + "description": "Allows a user to disable thrift", + "summary": "stop_rpc_server", + "operationId": "StorageServiceRpcServerDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "allows a user to reenable thrift", + "summary": "start_rpc_server", + "operationId": "StorageServiceRpcServerPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Determine if thrift is running", + "summary": "is_rpc_server_running", + "operationId": "StorageServiceRpcServerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/native_transport": { + "post": { + "description": "Start native transport", + "summary": "start_native_transport", + "operationId": "StorageServiceNativeTransportPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "delete": { + "description": "Stop native transport", + "summary": "stop_native_transport", + "operationId": "StorageServiceNativeTransportDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Is native transport running", + "summary": "is_native_transport_running", + "operationId": "StorageServiceNativeTransportGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/join_ring": { + "post": { + "description": "Allows a node that have been started without joining the ring to join it", + "summary": "join_ring", + "operationId": "StorageServiceJoinRingPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "summary": "is_joined", + "operationId": "StorageServiceJoinRingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/stream_throughput": { + "post": { + "description": "set stream throughput mb per sec", + "summary": "set_stream_throughput_mb_per_sec", + "operationId": "StorageServiceStreamThroughputPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "value", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "Stream throughput" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Get stream throughput mb per sec", + "summary": "get_stream_throughput_mb_per_sec", + "operationId": "StorageServiceStreamThroughputGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/compaction_throughput": { + "get": { + "description": "get compaction throughput mb per sec", + "summary": "get_compaction_throughput_mb_per_sec", + "operationId": "StorageServiceCompactionThroughputGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set compaction throughput mb per sec", + "summary": "set_compaction_throughput_mb_per_sec", + "operationId": "StorageServiceCompactionThroughputPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "value", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "compaction throughput" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/incremental_backups": { + "get": { + "description": "Check if incremental backup is enabled", + "summary": "is_incremental_backups_enabled", + "operationId": "StorageServiceIncrementalBackupsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "boolean" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "summary": "set_incremental_backups_enabled", + "operationId": "StorageServiceIncrementalBackupsPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "value", + "in": "query", + "required": true, + "type": "boolean", + "description": "Set to true for incremental backup enabled" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/rebuild": { + "post": { + "description": "Initiate a process of streaming data for which we are responsible from other nodes. It is similar to bootstrap except meant to be used on a node which is already in the cluster (typically containing no data) as an alternative to running repair.", + "summary": "rebuild", + "operationId": "StorageServiceRebuildPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "source_dc", + "in": "query", + "required": false, + "type": "string", + "description": "Name of DC from which to select sources for streaming or none to pick any node" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/bulk_load/{path}": { + "post": { + "description": "Starts a bulk load and blocks until it completes", + "summary": "bulk_load", + "operationId": "StorageServiceBulkLoadByPathPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "type": "string", + "description": "Path to directory to load from" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/bulk_load_async/{path}": { + "get": { + "description": "Starts a bulk load asynchronously and returns the String representation of the planID for the new streaming session.", + "summary": "bulk_load_async", + "operationId": "StorageServiceBulkLoadAsyncByPathGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "type": "string", + "description": "Path to directory to load from" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/reschedule_failed_deletions": { + "post": { + "description": "Reschedule failed deletions", + "summary": "reschedule_failed_deletions", + "operationId": "StorageServiceRescheduleFailedDeletionsPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/sstables/{keyspace}": { + "post": { + "description": "Load new SSTables to the given keyspace/columnFamily", + "summary": "load_new_ss_tables", + "operationId": "StorageServiceSstablesByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "cf", + "in": "query", + "required": true, + "type": "string", + "description": "Column family name" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/sample_key_range": { + "get": { + "description": "Return a List of Tokens representing a sample of keys across all ColumnFamilyStores.", + "summary": "sample_key_range", + "operationId": "StorageServiceSampleKeyRangeGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/relocal_schema": { + "post": { + "description": "Reset local schema", + "summary": "reset_local_schema", + "operationId": "StorageServiceRelocalSchemaPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/trace_probability": { + "post": { + "description": "Enables/Disables tracing for the whole system. Only thrift requests can start tracing currently", + "summary": "set_trace_probability", + "operationId": "StorageServiceTraceProbabilityPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "probability", + "in": "query", + "required": true, + "type": "string", + "description": "[0,1] will enable tracing on a partial number of requests with the provided probability. 0 will disable tracing and 1 will enable tracing for all requests (which mich severely cripple the system)" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Returns the configured tracing probability.", + "summary": "get_trace_probability", + "operationId": "StorageServiceTraceProbabilityGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "object" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/slow_query": { + "post": { + "description": "Set slow query parameter", + "summary": "set_slow_query", + "operationId": "StorageServiceSlowQueryPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "enable", + "in": "query", + "required": false, + "type": "boolean", + "description": "set it to true to enable, anything else to disable" + }, + { + "name": "ttl", + "in": "query", + "required": false, + "type": "string", + "description": "TTL in seconds" + }, + { + "name": "threshold", + "in": "query", + "required": false, + "type": "string", + "description": "Slow query record threshold in microseconds" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "get": { + "description": "Returns the slow query record configuration.", + "summary": "get_slow_query_info", + "operationId": "StorageServiceSlowQueryGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/slow_query_info" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/auto_compaction/{keyspace}": { + "post": { + "description": "Enable auto compaction", + "summary": "enable_auto_compaction", + "operationId": "StorageServiceAutoCompactionByKeyspacePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "delete": { + "description": "Disable auto compaction", + "summary": "disable_auto_compaction", + "operationId": "StorageServiceAutoCompactionByKeyspaceDelete", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "cf", + "in": "query", + "required": false, + "type": "string", + "description": "Comma seperated column family names" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/deliver_hints": { + "post": { + "summary": "deliver_hints", + "operationId": "StorageServiceDeliverHintsPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "host", + "in": "query", + "required": true, + "type": "string", + "description": "The host name" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/cluster_name": { + "get": { + "description": "Returns the name of the cluster", + "summary": "get_cluster_name", + "operationId": "StorageServiceClusterNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/partitioner_name": { + "get": { + "description": "Returns the cluster partitioner", + "summary": "get_partitioner_name", + "operationId": "StorageServicePartitionerNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/tombstone_warn_threshold": { + "get": { + "description": "Returns the threshold for warning of queries with many tombstones", + "summary": "get_tombstone_warn_threshold", + "operationId": "StorageServiceTombstoneWarnThresholdGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Sets the threshold for warning queries with many tombstones", + "summary": "set_tombstone_warn_threshold", + "operationId": "StorageServiceTombstoneWarnThresholdPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "debug_threshold", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "tombstone debug threshold" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/tombstone_failure_threshold": { + "get": { + "summary": "get_tombstone_failure_threshold", + "operationId": "StorageServiceTombstoneFailureThresholdGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "summary": "set_tombstone_failure_threshold", + "operationId": "StorageServiceTombstoneFailureThresholdPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "tombstone_debug_threshold", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "tombstone debug threshold" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/batch_size_failure_threshold": { + "get": { + "description": "Returns the threshold for rejecting queries due to a large batch size", + "summary": "get_batch_size_failure_threshold", + "operationId": "StorageServiceBatchSizeFailureThresholdGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Sets the threshold for rejecting queries due to a large batch size", + "summary": "set_batch_size_failure_threshold", + "operationId": "StorageServiceBatchSizeFailureThresholdPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "threshold", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "batch size debug threshold" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/hinted_handoff": { + "post": { + "description": "Sets the hinted handoff throttle in kb per second, per delivery thread", + "summary": "set_hinted_handoff_throttle_in_kb", + "operationId": "StorageServiceHintedHandoffPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "throttle", + "in": "query", + "required": true, + "type": "integer", + "format": "int32", + "exclusiveMaximum": false, + "exclusiveMinimum": false, + "description": "throttle in kb" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/metrics/load": { + "get": { + "description": "Get load", + "summary": "get_metrics_load", + "operationId": "StorageServiceMetricsLoadGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/metrics/exceptions": { + "get": { + "description": "Get exceptions", + "summary": "get_exceptions", + "operationId": "StorageServiceMetricsExceptionsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/metrics/hints_in_progress": { + "get": { + "description": "Get total hints in progress", + "summary": "get_total_hints_in_progress", + "operationId": "StorageServiceMetricsHintsInProgressGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/metrics/total_hints": { + "get": { + "description": "Get total hints", + "summary": "get_total_hints1", + "operationId": "StorageServiceMetricsTotalHintsGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/storage_service/view_build_statuses/{keyspace}/{view}": { + "get": { + "description": "Gets the progress of a materialized view build", + "summary": "view_build_statuses", + "operationId": "StorageServiceViewBuildStatusesByKeyspaceAndViewGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "keyspace", + "in": "path", + "required": true, + "type": "string", + "description": "The keyspace" + }, + { + "name": "view", + "in": "path", + "required": true, + "type": "string", + "description": "View name" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/mapper" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/": { + "get": { + "description": "Returns the current state of all ongoing streams.", + "summary": "get_current_streams", + "operationId": "StreamManagerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/stream_state" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/metrics/outbound": { + "get": { + "description": "Get number of active outbound streams", + "summary": "get_all_active_streams_outbound", + "operationId": "StreamManagerMetricsOutboundGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/metrics/incoming/{peer}": { + "get": { + "description": "Get total incoming bytes", + "summary": "get_total_incoming_bytes", + "operationId": "StreamManagerMetricsIncomingByPeerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "peer", + "in": "path", + "required": true, + "type": "string", + "description": "The stream peer" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/metrics/incoming": { + "get": { + "description": "Get all total incoming bytes", + "summary": "get_all_total_incoming_bytes", + "operationId": "StreamManagerMetricsIncomingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/metrics/outgoing/{peer}": { + "get": { + "description": "Get total outgoing bytes", + "summary": "get_total_outgoing_bytes", + "operationId": "StreamManagerMetricsOutgoingByPeerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "peer", + "in": "path", + "required": true, + "type": "string", + "description": "The stream peer" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/stream_manager/metrics/outgoing": { + "get": { + "description": "Get all total outgoing bytes", + "summary": "get_all_total_outgoing_bytes", + "operationId": "StreamManagerMetricsOutgoingGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "integer", + "format": "int32" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/system/logger": { + "get": { + "description": "Get all logger names", + "summary": "get_all_logger_names", + "operationId": "SystemLoggerGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [], + "responses": { + "200": { + "description": "", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set all logger level", + "summary": "set_all_logger_level", + "operationId": "SystemLoggerPost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "level", + "in": "query", + "required": true, + "enum": [ + "error", + "warn", + "info", + "debug", + "trace" + ], + "type": "string", + "description": "The new log level" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + }, + "/system/logger/{name}": { + "get": { + "description": "Get logger level", + "summary": "get_logger_level", + "operationId": "SystemLoggerByNameGet", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The logger to query about" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "type": "string" + }, + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + }, + "post": { + "description": "Set logger level", + "summary": "set_logger_level", + "operationId": "SystemLoggerByNamePost", + "deprecated": false, + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string", + "description": "The logger to query about" + }, + { + "name": "level", + "in": "query", + "required": true, + "enum": [ + "error", + "warn", + "info", + "debug", + "trace" + ], + "type": "string", + "description": "The new log level" + } + ], + "responses": { + "200": { + "description": "", + "headers": {} + }, + "default": { + "description": "internal server error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + }, + "security": [] + } + } + }, + "definitions": { + "type_instance_id": { + "title": "type_instance_id", + "description": "A type instance ID", + "type": "object", + "properties": { + "plugin": { + "description": "The plugin ID", + "type": "string" + }, + "plugin_instance": { + "description": "The plugin instance", + "type": "string" + }, + "type": { + "description": "The plugin type", + "type": "string" + }, + "type_instance": { + "description": "The plugin type instance", + "type": "string" + } + } + }, + "collectd_value": { + "title": "collectd_value", + "description": "Holds a collectd value", + "type": "object", + "properties": { + "values": { + "description": "An array of values", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "collectd_metric_status": { + "title": "collectd_metric_status", + "description": "Holds a collectd id and an enable flag", + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/type_instance_id" + }, + "enable": { + "description": "Is the metric enabled", + "type": "boolean" + } + } + }, + "mapper": { + "title": "mapper", + "description": "A key value mapping", + "type": "object", + "properties": { + "key": { + "description": "The key", + "type": "string" + }, + "value": { + "description": "The value", + "type": "string" + } + } + }, + "column_family_info": { + "title": "column_family_info", + "description": "Information about column family", + "type": "object", + "properties": { + "ks": { + "description": "The Keyspace", + "type": "string" + }, + "cf": { + "description": "The column family", + "type": "string" + }, + "type": { + "description": "The column family type", + "type": "string" + } + } + }, + "row_merged": { + "title": "row_merged", + "description": "A row merged information", + "type": "object", + "properties": { + "key": { + "description": "The number of sstable", + "type": "integer", + "format": "int32" + }, + "value": { + "description": "The number or row compacted", + "type": "object" + } + } + }, + "compaction_info": { + "title": "compaction_info", + "description": "A key value mapping", + "type": "object", + "properties": { + "operation_type": { + "description": "The operation type", + "type": "string" + }, + "completed": { + "description": "The current completed", + "type": "object" + }, + "total": { + "description": "The total to compact", + "type": "object" + }, + "unit": { + "description": "The compacted unit", + "type": "string" + } + } + }, + "summary": { + "title": "summary", + "description": "A compaction summary object", + "type": "object", + "properties": { + "id": { + "description": "The UUID", + "type": "string" + }, + "ks": { + "description": "The keyspace name", + "type": "string" + }, + "cf": { + "description": "The column family name", + "type": "string" + }, + "completed": { + "description": "The number of units completed", + "type": "object" + }, + "total": { + "description": "The total number of units", + "type": "object" + }, + "task_type": { + "description": "The task compaction type", + "type": "string" + }, + "unit": { + "description": "The units being used", + "type": "string" + } + } + }, + "history": { + "title": "history", + "description": "Compaction history information", + "type": "object", + "properties": { + "id": { + "description": "The UUID", + "type": "string" + }, + "cf": { + "description": "The column family name", + "type": "string" + }, + "ks": { + "description": "The keyspace name", + "type": "string" + }, + "compacted_at": { + "description": "The time of compaction", + "type": "object" + }, + "bytes_in": { + "description": "Bytes in", + "type": "object" + }, + "bytes_out": { + "description": "Bytes out", + "type": "object" + }, + "rows_merged": { + "description": "The merged rows", + "type": "array", + "items": { + "$ref": "#/definitions/row_merged" + } + } + } + }, + "endpoint_state": { + "title": "endpoint_state", + "description": "Holds an endpoint state", + "type": "object", + "properties": { + "addrs": { + "description": "The endpoint address", + "type": "string" + }, + "generation": { + "description": "The heart beat generation", + "type": "integer", + "format": "int32" + }, + "version": { + "description": "The heart beat version", + "type": "integer", + "format": "int32" + }, + "update_time": { + "description": "The update timestamp", + "type": "object" + }, + "is_alive": { + "description": "Is the endpoint alive", + "type": "boolean" + }, + "application_state": { + "description": "Is the endpoint alive", + "type": "array", + "items": { + "$ref": "#/definitions/version_value" + } + } + } + }, + "version_value": { + "title": "version_value", + "description": "Holds a version value for an application state", + "type": "object", + "properties": { + "application_state": { + "description": "The application state enum index", + "type": "integer", + "format": "int32" + }, + "value": { + "description": "The version value", + "type": "string" + }, + "version": { + "description": "The application state version", + "type": "integer", + "format": "int32" + } + } + }, + "endpoint_phi_value": { + "title": "endpoint_phi_value", + "description": "Holds phi value for a single end point", + "type": "object", + "properties": { + "phi": { + "description": "Phi value", + "type": "object" + }, + "endpoint": { + "description": "end point address", + "type": "string" + } + } + }, + "message_counter": { + "title": "message_counter", + "description": "Holds command counters", + "type": "object", + "properties": { + "value": { + "type": "object" + }, + "key": { + "type": "string" + } + } + }, + "verb_counter": { + "title": "verb_counter", + "description": "Holds verb counters", + "type": "object", + "properties": { + "count": { + "type": "object" + }, + "verb": { + "$ref": "#/definitions/Verb" + } + } + }, + "mapper_list": { + "title": "mapper_list", + "description": "Holds a key value which is a list", + "type": "object", + "properties": { + "key": { + "description": "The key", + "type": "string" + }, + "value": { + "description": "The value", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "map_string_double": { + "title": "map_string_double", + "description": "A key value mapping between a string and a double", + "type": "object", + "properties": { + "key": { + "description": "The key", + "type": "string" + }, + "value": { + "description": "The value", + "type": "object" + } + } + }, + "maplist_mapper": { + "title": "maplist_mapper", + "description": "A key value mapping, where key and value are list", + "type": "object", + "properties": { + "key": { + "description": "The key", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "description": "The value", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "snapshot": { + "title": "snapshot", + "description": "Snapshot detail", + "type": "object", + "properties": { + "ks": { + "description": "The key space snapshot key", + "type": "string" + }, + "cf": { + "description": "The column family", + "type": "string" + }, + "total": { + "description": "The total snapshot size", + "type": "object" + }, + "live": { + "description": "The live snapshot size", + "type": "object" + } + } + }, + "snapshots": { + "title": "snapshots", + "description": "List of Snapshot detail", + "type": "object", + "properties": { + "key": { + "description": "The snapshot key", + "type": "string" + }, + "value": { + "description": "The column family", + "type": "array", + "items": { + "$ref": "#/definitions/snapshot" + } + } + } + }, + "slow_query_info": { + "title": "slow_query_info", + "description": "Slow query triggering information", + "type": "object", + "properties": { + "enable": { + "description": "Is slow query logging enable or disable", + "type": "boolean" + }, + "ttl": { + "description": "The slow query TTL in seconds", + "type": "object" + }, + "threshold": { + "description": "The slow query logging threshold in microseconds. Queries that takes longer, will be logged", + "type": "object" + } + } + }, + "endpoint_detail": { + "title": "endpoint_detail", + "description": "Endpoint detail", + "type": "object", + "properties": { + "host": { + "description": "The endpoint host", + "type": "string" + }, + "datacenter": { + "description": "The endpoint datacenter", + "type": "string" + }, + "rack": { + "description": "The endpoint rack", + "type": "string" + } + } + }, + "token_range": { + "title": "token_range", + "description": "Endpoint range information", + "type": "object", + "properties": { + "start_token": { + "description": "The range start token", + "type": "string" + }, + "end_token": { + "description": "The range start token", + "type": "string" + }, + "endpoints": { + "description": "The endpoints", + "type": "array", + "items": { + "type": "string" + } + }, + "rpc_endpoints": { + "description": "The rpc endpoints", + "type": "array", + "items": { + "type": "string" + } + }, + "endpoint_details": { + "description": "The endpoint details", + "type": "array", + "items": { + "$ref": "#/definitions/endpoint_detail" + } + } + } + }, + "stream_state": { + "title": "stream_state", + "description": "Current snapshot of streaming progress", + "type": "object", + "properties": { + "plan_id": { + "description": "Plan UUID", + "type": "string" + }, + "description": { + "description": "The stream description", + "type": "string" + }, + "sessions": { + "description": "The sessions info", + "type": "array", + "items": { + "$ref": "#/definitions/stream_info" + } + } + } + }, + "stream_info": { + "title": "stream_info", + "description": "Stream session info", + "type": "object", + "properties": { + "peer": { + "description": "The peer", + "type": "string" + }, + "session_index": { + "description": "The session index", + "type": "integer", + "format": "int32" + }, + "connecting": { + "type": "string" + }, + "receiving_summaries": { + "description": "Receiving summaries", + "type": "array", + "items": { + "$ref": "#/definitions/stream_summary" + } + }, + "sending_summaries": { + "description": "Sending summaries", + "type": "array", + "items": { + "$ref": "#/definitions/stream_summary" + } + }, + "state": { + "$ref": "#/definitions/State" + }, + "receiving_files": { + "description": "Receiving files", + "type": "array", + "items": { + "$ref": "#/definitions/progress_info_mapper" + } + }, + "sending_files": { + "description": "Sending files", + "type": "array", + "items": { + "$ref": "#/definitions/progress_info_mapper" + } + } + } + }, + "stream_summary": { + "title": "stream_summary", + "description": "Stream summary info", + "type": "object", + "properties": { + "cf_id": { + "description": "The ID", + "type": "string" + }, + "files": { + "description": "Number of files to transfer. Can be 0 if nothing to transfer for some streaming request.", + "type": "integer", + "format": "int32" + }, + "total_size": { + "type": "object" + } + } + }, + "progress_info_mapper": { + "title": "progress_info_mapper", + "description": "A mapping between file and its progress info", + "type": "object", + "properties": { + "key": { + "description": "The key", + "type": "string" + }, + "value": { + "$ref": "#/definitions/progress_info" + } + } + }, + "progress_info": { + "title": "progress_info", + "description": "File transfer progress", + "type": "object", + "properties": { + "peer": { + "description": "The peer address", + "type": "string" + }, + "session_index": { + "description": "The session index", + "type": "integer", + "format": "int32" + }, + "file_name": { + "description": "The file name", + "type": "string" + }, + "direction": { + "$ref": "#/definitions/Direction" + }, + "current_bytes": { + "description": "The current bytes", + "type": "object" + }, + "total_bytes": { + "description": "The total bytes", + "type": "object" + } + } + }, + "histogram": { + "title": "histogram", + "description": "A histogram values", + "type": "object", + "properties": { + "count": { + "description": "Total count so far", + "type": "object" + }, + "sum": { + "description": "Total sum so far", + "type": "object" + }, + "min": { + "description": "The min so far", + "type": "object" + }, + "max": { + "description": "The max so far", + "type": "object" + }, + "variance": { + "description": "The variance", + "type": "object" + }, + "mean": { + "description": "The mean", + "type": "object" + }, + "sample": { + "description": "A sample containing the last n elements", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "estimated_histogram": { + "title": "estimated_histogram", + "description": "An estimated histogram values", + "type": "object", + "properties": { + "buckets": { + "description": "The histogram buckets", + "type": "array", + "items": { + "type": "object" + } + }, + "bucket_offsets": { + "description": "The series of values to which the counts in `buckets` correspond", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "rate_moving_average": { + "title": "rate_moving_average", + "description": "A meter metric which measures mean throughput and one, five, and fifteen-minute exponentially-weighted moving average throughputs", + "type": "object", + "properties": { + "rates": { + "description": "One, five and fifteen mintues rates", + "type": "array", + "items": { + "type": "object" + } + }, + "mean_rate": { + "description": "The mean rate from startup", + "type": "object" + }, + "count": { + "description": "Total number of events from startup", + "type": "object" + } + } + }, + "rate_moving_average_and_histogram": { + "title": "rate_moving_average_and_histogram", + "description": "A timer metric which aggregates timing durations and provides duration statistics, plus throughput statistics", + "type": "object", + "properties": { + "meter": { + "$ref": "#/definitions/rate_moving_average" + }, + "hist": { + "$ref": "#/definitions/histogram" + } + } + }, + "Direction": { + "title": "Direction", + "description": "The file name", + "example": "OUT", + "type": "string", + "enum": [ + "OUT", + "IN" + ] + }, + "level": { + "title": "level", + "example": "error", + "type": "string", + "enum": [ + "error", + "warn", + "info", + "debug", + "trace" + ] + }, + "repair_async_statusResponse": { + "title": "repair_async_statusResponse", + "example": "RUNNING", + "type": "string", + "enum": [ + "RUNNING", + "SUCCESSFUL", + "FAILED" + ] + }, + "State": { + "title": "State", + "description": "Current session state", + "example": "INITIALIZED", + "type": "string", + "enum": [ + "INITIALIZED", + "PREPARING", + "STREAMING", + "WAIT_COMPLETE", + "COMPLETE", + "FAILED" + ] + }, + "type": { + "title": "type", + "example": "all", + "type": "string", + "enum": [ + "all", + "user", + "non_local_strategy" + ] + }, + "Verb": { + "title": "Verb", + "example": "CLIENT_ID", + "type": "string", + "enum": [ + "CLIENT_ID", + "MUTATION", + "MUTATION_DONE", + "READ_DATA", + "READ_MUTATION_DATA", + "READ_DIGEST", + "GOSSIP_ECHO", + "GOSSIP_DIGEST_SYN", + "GOSSIP_DIGEST_ACK2", + "GOSSIP_SHUTDOWN", + "DEFINITIONS_UPDATE", + "TRUNCATE", + "REPLICATION_FINISHED", + "MIGRATION_REQUEST", + "PREPARE_MESSAGE", + "PREPARE_DONE_MESSAGE", + "STREAM_MUTATION", + "STREAM_MUTATION_DONE", + "COMPLETE_MESSAGE", + "REPAIR_CHECKSUM_RANGE", + "GET_SCHEMA_VERSION" + ] + }, + "ErrorModel": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer" + } + } + } + }, + "tags": [] +} diff --git a/pkg/scyllaclient/scylla_v2.json b/pkg/scyllaclient/scylla_v2.json new file mode 100644 index 00000000000..3e11dd8ce04 --- /dev/null +++ b/pkg/scyllaclient/scylla_v2.json @@ -0,0 +1,4895 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Scylla API", + "description": "The scylla API version 2.0", + "termsOfService": "http://www.scylladb.com/tos/", + "contact": { + "name": "Scylla Team", + "email": "info@scylladb.com", + "url": "http://scylladb.com" + }, + "license": { + "name": "AGPL", + "url": "https://github.com/scylladb/scylla/blob/master/LICENSE.AGPL" + } + }, + "host": "mermaid.magic.host", + "basePath": "/v2", + "schemes": [ + "http" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/config/background_writer_scheduling_quota": { + "get": { + "description": "max cpu usage ratio (between 0 and 1) for compaction process. Not intended for setting in normal operations. Setting it to 1 or higher will disable it, recommended operational setting is 0.5.", + "operationId": "find_config_background_writer_scheduling_quota", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/auto_adjust_flush_quota": { + "get": { + "description": "true: auto-adjust memtable shares for flush processes", + "operationId": "find_config_auto_adjust_flush_quota", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_flush_static_shares": { + "get": { + "description": "If set to higher than 0, ignore the controller's output and set the memtable shares statically. Do not set this unless you know what you are doing and suspect a problem in the controller. This option will be retired when the controller reaches more maturity", + "operationId": "find_config_memtable_flush_static_shares", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_static_shares": { + "get": { + "description": "If set to higher than 0, ignore the controller's output and set the compaction shares statically. Do not set this unless you know what you are doing and suspect a problem in the controller. This option will be retired when the controller reaches more maturity", + "operationId": "find_config_compaction_static_shares", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_enforce_min_threshold": { + "get": { + "description": "If set to true, enforce the min_threshold option for compactions strictly. If false (default), Scylla may decide to compact even if below min_threshold", + "operationId": "find_config_compaction_enforce_min_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/cluster_name": { + "get": { + "description": "The name of the cluster; used to prevent machines in one logical cluster from joining another. All nodes participating in a cluster must have the same value.", + "operationId": "find_config_cluster_name", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/listen_address": { + "get": { + "description": "The IP address or hostname that Scylla binds to for connecting to other Scylla nodes. Set this parameter or listen_interface, not both. You must change the default setting for multiple nodes to communicate:\n\nGenerally set to empty. If the node is properly configured (host name, name resolution, and so on), Scylla uses InetAddress.getLocalHost() to get the local address from the system.\nFor a single node cluster, you can use the default setting (localhost).\nIf Scylla can't find the correct address, you must specify the IP address or host name.\nNever specify 0.0.0.0; it is always wrong.", + "operationId": "find_config_listen_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/listen_interface": { + "get": { + "description": "The interface that Scylla binds to for connecting to other Scylla nodes. Interfaces must correspond to a single address, IP aliasing is not supported. See listen_address.", + "operationId": "find_config_listen_interface", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_directory": { + "get": { + "description": "The directory where the commit log is stored. For optimal write performance, it is recommended the commit log be on a separate disk partition (ideally, a separate physical device) from the data file directories.", + "operationId": "find_config_commitlog_directory", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/data_file_directories": { + "get": { + "description": "The directory location where table data (SSTables) is stored", + "operationId": "find_config_data_file_directories", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/hints_directory": { + "get": { + "description": "The directory where hints files are stored if hinted handoff is enabled.", + "operationId": "find_config_hints_directory", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/view_hints_directory": { + "get": { + "description": "The directory where materialized-view updates are stored while a view replica is unreachable.", + "operationId": "find_config_view_hints_directory", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/saved_caches_directory": { + "get": { + "description": "The directory location where table key and row caches are stored.", + "operationId": "find_config_saved_caches_directory", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commit_failure_policy": { + "get": { + "description": "Policy for commit disk failures:\n\n die Shut down gossip and Thrift and kill the JVM, so the node can be replaced.\n stop Shut down gossip and Thrift, leaving the node effectively dead, but can be inspected using JMX.\n stop_commit Shut down the commit log, letting writes collect but continuing to service reads (as in pre-2.0.5 Cassandra).\n ignore Ignore fatal errors and let the batches fail.", + "operationId": "find_config_commit_failure_policy", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/disk_failure_policy": { + "get": { + "description": "Sets how Scylla responds to disk failure. Recommend settings are stop or best_effort.\n\n die Shut down gossip and Thrift and kill the JVM for any file system errors or single SSTable errors, so the node can be replaced.\n stop_paranoid Shut down gossip and Thrift even for single SSTable errors.\n stop Shut down gossip and Thrift, leaving the node effectively dead, but available for inspection using JMX.\n best_effort Stop using the failed disk and respond to requests based on the remaining available SSTables. This means you will see obsolete data at consistency level of ONE.\n ignore Ignores fatal errors and lets the requests fail; all file system errors are logged but otherwise ignored. Scylla acts as in versions prior to Cassandra 1.2.\n\nRelated information: Handling Disk Failures In Cassandra 1.2 blog and Recovering from a single disk failure using JBOD.\n", + "operationId": "find_config_disk_failure_policy", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/endpoint_snitch": { + "get": { + "description": "Set to a class that implements the IEndpointSnitch. Scylla uses snitches for locating nodes and routing requests.\n\n SimpleSnitch: Use for single-data center deployments or single-zone in public clouds. Does not recognize data center or rack information. It treats strategy order as proximity, which can improve cache locality when disabling read repair.\n\n GossipingPropertyFileSnitch: Recommended for production. The rack and data center for the local node are defined in the cassandra-rackdc.properties file and propagated to other nodes via gossip. To allow migration from the PropertyFileSnitch, it uses the cassandra-topology.properties file if it is present.\n\n Ec2Snitch: For EC2 deployments in a single region. Loads region and availability zone information from the EC2 API. The region is treated as the data center and the availability zone as the rack. Uses only private IPs. Subsequently it does not work across multiple regions.\n\n Ec2MultiRegionSnitch: Uses public IPs as the broadcast_address to allow cross-region connectivity. This means you must also set seed addresses to the public IP and open the storage_port or ssl_storage_port on the public IP firewall. For intra-region traffic, Scylla switches to the private IP after establishing a connection.\n\n GoogleCloudSnitch: For deployments on Google Cloud Platform across one or more regions. The region is treated as a datacenter and the availability zone is treated as a rack within the datacenter. The communication should occur over private IPs within the same logical network.\n\n RackInferringSnitch: Proximity is determined by rack and data center, which are assumed to correspond to the 3rd and 2nd octet of each node's IP address, respectively. This snitch is best used as an example for writing a custom snitch class (unless this happens to match your deployment conventions).\n\nRelated information: Snitches\n", + "operationId": "find_config_endpoint_snitch", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_address": { + "get": { + "description": "The listen address for client connections (Thrift RPC service and native transport).Valid values are:\n\n unset: Resolves the address using the hostname configuration of the node. If left unset, the hostname must resolve to the IP address of this node using /etc/hostname, /etc/hosts, or DNS.\n 0.0.0.0 : Listens on all configured interfaces, but you must set the broadcast_rpc_address to a value other than 0.0.0.0.\n IP address\n hostname\nRelated information: Network\n", + "operationId": "find_config_rpc_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_interface": { + "get": { + "description": "The listen address for client connections. Interfaces must correspond to a single address, IP aliasing is not supported. See rpc_address.", + "operationId": "find_config_rpc_interface", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/seed_provider": { + "get": { + "description": "The addresses of hosts deemed contact points. Scylla nodes use the -seeds list to find each other and learn the topology of the ring.\n\n class_name (Default: org.apache.cassandra.locator.SimpleSeedProvider)\n The class within Scylla that handles the seed logic. It can be customized, but this is typically not required.\n - seeds (Default: 127.0.0.1) A comma-delimited list of IP addresses used by gossip for bootstrapping new nodes joining a cluster. When running multiple nodes, you must change the list from the default value. In multiple data-center clusters, the seed list should include at least one node from each data center (replication group). More than a single seed node per data center is recommended for fault tolerance. Otherwise, gossip has to communicate with another data center when bootstrapping a node. Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance. Gossip optimization is not critical, but it is recommended to use a small seed list (approximately three nodes per data center).\n\nRelated information: Initializing a multiple node cluster (single data center) and Initializing a multiple node cluster (multiple data centers).", + "operationId": "find_config_seed_provider", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_throughput_mb_per_sec": { + "get": { + "description": "Throttles compaction to the specified total throughput across the entire system. The faster you insert data, the faster you need to compact in order to keep the SSTable count down. The recommended Value is 16 to 32 times the rate of write throughput (in MBs/second). Setting the value to 0 disables compaction throttling.\nRelated information: Configuring compaction", + "operationId": "find_config_compaction_throughput_mb_per_sec", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_large_partition_warning_threshold_mb": { + "get": { + "description": "Log a warning when writing partitions larger than this value", + "operationId": "find_config_compaction_large_partition_warning_threshold_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_large_row_warning_threshold_mb": { + "get": { + "description": "Log a warning when writing rows larger than this value", + "operationId": "find_config_compaction_large_row_warning_threshold_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_large_cell_warning_threshold_mb": { + "get": { + "description": "Log a warning when writing cells larger than this value", + "operationId": "find_config_compaction_large_cell_warning_threshold_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_rows_count_warning_threshold": { + "get": { + "description": "Log a warning when writing a number of rows larger than this value", + "operationId": "find_config_compaction_rows_count_warning_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_total_space_in_mb": { + "get": { + "description": "Specifies the total memory used for all memtables on a node. This replaces the per-table storage settings memtable_operations_in_millions and memtable_throughput_in_mb.", + "operationId": "find_config_memtable_total_space_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/concurrent_reads": { + "get": { + "description": "For workloads with more data than can fit in memory, the bottleneck is reads fetching data from disk. Setting to (16 × number_of_drives) allows operations to queue low enough in the stack so that the OS and drives can reorder them.", + "operationId": "find_config_concurrent_reads", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/concurrent_writes": { + "get": { + "description": "Writes in Cassandra are rarely I/O bound, so the ideal number of concurrent writes depends on the number of CPU cores in your system. The recommended value is (8 x number_of_cpu_cores).", + "operationId": "find_config_concurrent_writes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/concurrent_counter_writes": { + "get": { + "description": "Counter writes read the current values before incrementing and writing them back. The recommended value is (16 × number_of_drives) .", + "operationId": "find_config_concurrent_counter_writes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/incremental_backups": { + "get": { + "description": "Backs up data updated since the last snapshot was taken. When enabled, Scylla creates a hard link to each SSTable flushed or streamed locally in a backups/ subdirectory of the keyspace data. Removing these links is the operator's responsibility.\nRelated information: Enabling incremental backups", + "operationId": "find_config_incremental_backups", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/snapshot_before_compaction": { + "get": { + "description": "Enable or disable taking a snapshot before each compaction. This option is useful to back up data when there is a data format change. Be careful using this option because Cassandra does not clean up older snapshots automatically.\nRelated information: Configuring compaction", + "operationId": "find_config_snapshot_before_compaction", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/phi_convict_threshold": { + "get": { + "description": "Adjusts the sensitivity of the failure detector on an exponential scale. Generally this setting never needs adjusting.\nRelated information: Failure detection and recovery", + "operationId": "find_config_phi_convict_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_sync": { + "get": { + "description": "The method that Scylla uses to acknowledge writes in milliseconds:\n\n periodic : Used with commitlog_sync_period_in_ms (Default: 10000 - 10 seconds ) to control how often the commit log is synchronized to disk. Periodic syncs are acknowledged immediately.\n batch : Used with commitlog_sync_batch_window_in_ms (Default: disabled **) to control how long Scylla waits for other writes before performing a sync. When using this method, writes are not acknowledged until fsynced to disk.\nRelated information: Durability", + "operationId": "find_config_commitlog_sync", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_segment_size_in_mb": { + "get": { + "description": "Sets the size of the individual commitlog file segments. A commitlog segment may be archived, deleted, or recycled after all its data has been flushed to SSTables. This amount of data can potentially include commitlog segments from every table in the system. The default size is usually suitable for most commitlog archiving, but if you want a finer granularity, 8 or 16 MB is reasonable. See Commit log archive configuration.\nRelated information: Commit log archive configuration", + "operationId": "find_config_commitlog_segment_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_sync_period_in_ms": { + "get": { + "description": "Controls how long the system waits for other writes before performing a sync in ''periodic'' mode.", + "operationId": "find_config_commitlog_sync_period_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_sync_batch_window_in_ms": { + "get": { + "description": "Controls how long the system waits for other writes before performing a sync in ''batch'' mode.", + "operationId": "find_config_commitlog_sync_batch_window_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_total_space_in_mb": { + "get": { + "description": "Total space used for commitlogs. If the used space goes above this value, Scylla rounds up to the next nearest segment multiple and flushes memtables to disk for the oldest commitlog segments, removing those log segments. This reduces the amount of data to replay on startup, and prevents infrequently-updated tables from indefinitely keeping commitlog segments. A small total commitlog space tends to cause more flush activity on less-active tables.\nRelated information: Configuring memtable throughput", + "operationId": "find_config_commitlog_total_space_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_reuse_segments": { + "get": { + "description": "Whether or not to re-use commitlog segments when finished instead of deleting them. Can improve commitlog latency on some file systems.\n", + "operationId": "find_config_commitlog_reuse_segments", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/commitlog_use_o_dsync": { + "get": { + "description": "Whether or not to use O_DSYNC mode for commitlog segments IO. Can improve commitlog latency on some file systems.\n", + "operationId": "find_config_commitlog_use_o_dsync", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/compaction_preheat_key_cache": { + "get": { + "description": "When set to true , cached row keys are tracked during compaction, and re-cached to their new positions in the compacted SSTable. If you have extremely large key caches for tables, set the value to false ; see Global row and key caches properties.", + "operationId": "find_config_compaction_preheat_key_cache", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/concurrent_compactors": { + "get": { + "description": "Sets the number of concurrent compaction processes allowed to run simultaneously on a node, not including validation compactions for anti-entropy repair. Simultaneous compactions help preserve read performance in a mixed read-write workload by mitigating the tendency of small SSTables to accumulate during a single long-running compaction. If compactions run too slowly or too fast, change compaction_throughput_mb_per_sec first.", + "operationId": "find_config_concurrent_compactors", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/in_memory_compaction_limit_in_mb": { + "get": { + "description": "Size limit for rows being compacted in memory. Larger rows spill to disk and use a slower two-pass compaction process. When this occurs, a message is logged specifying the row key. The recommended value is 5 to 10 percent of the available Java heap size.", + "operationId": "find_config_in_memory_compaction_limit_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/preheat_kernel_page_cache": { + "get": { + "description": "Enable or disable kernel page cache preheating from contents of the key cache after compaction. When enabled it preheats only first page (4KB) of each row to optimize for sequential access. It can be harmful for fat rows, see CASSANDRA-4937 for more details.", + "operationId": "find_config_preheat_kernel_page_cache", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/sstable_preemptive_open_interval_in_mb": { + "get": { + "description": "When compacting, the replacement opens SSTables before they are completely written and uses in place of the prior SSTables for any range previously written. This setting helps to smoothly transfer reads between the SSTables by reducing page cache churn and keeps hot rows hot.", + "operationId": "find_config_sstable_preemptive_open_interval_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/defragment_memory_on_idle": { + "get": { + "description": "When set to true, will defragment memory when the cpu is idle. This reduces the amount of work Scylla performs when processing client requests.", + "operationId": "find_config_defragment_memory_on_idle", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_allocation_type": { + "get": { + "description": "Specify the way Cassandra allocates and manages memtable memory. See Off-heap memtables in Cassandra 2.1. Options are:\n heap_buffers On heap NIO (non-blocking I/O) buffers.\n offheap_buffers Off heap (direct) NIO buffers.\n offheap_objects Native memory, eliminating NIO buffer heap overhead.", + "operationId": "find_config_memtable_allocation_type", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_cleanup_threshold": { + "get": { + "description": "Ratio of occupied non-flushing memtable size to total permitted size for triggering a flush of the largest memtable. Larger values mean larger flushes and less compaction, but also less concurrent flush activity, which can make it difficult to keep your disks saturated under heavy write load.", + "operationId": "find_config_memtable_cleanup_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/file_cache_size_in_mb": { + "get": { + "description": "Total memory to use for SSTable-reading buffers.", + "operationId": "find_config_file_cache_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_flush_queue_size": { + "get": { + "description": "The number of full memtables to allow pending flush (memtables waiting for a write thread). At a minimum, set to the maximum number of indexes created on a single table.\nRelated information: Flushing data from the memtable", + "operationId": "find_config_memtable_flush_queue_size", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_flush_writers": { + "get": { + "description": "Sets the number of memtable flush writer threads. These threads are blocked by disk I/O, and each one holds a memtable in memory while blocked. If you have a large Java heap size and many data directories, you can increase the value for better flush performance.", + "operationId": "find_config_memtable_flush_writers", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_heap_space_in_mb": { + "get": { + "description": "Total permitted memory to use for memtables. Triggers a flush based on memtable_cleanup_threshold. Cassandra stops accepting writes when the limit is exceeded until a flush completes. If unset, sets to default.", + "operationId": "find_config_memtable_heap_space_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memtable_offheap_space_in_mb": { + "get": { + "description": "See memtable_heap_space_in_mb", + "operationId": "find_config_memtable_offheap_space_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/column_index_size_in_kb": { + "get": { + "description": "Granularity of the index of rows within a partition. For huge rows, decrease this setting to improve seek time. If you use key cache, be careful not to make this setting too large because key cache will be overwhelmed. If you're unsure of the size of the rows, it's best to use the default setting.", + "operationId": "find_config_column_index_size_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/index_summary_capacity_in_mb": { + "get": { + "description": "Fixed memory pool size in MB for SSTable index summaries. If the memory usage of all index summaries exceeds this limit, any SSTables with low read rates shrink their index summaries to meet this limit. This is a best-effort process. In extreme conditions, Cassandra may need to use more than this amount of memory.", + "operationId": "find_config_index_summary_capacity_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/index_summary_resize_interval_in_minutes": { + "get": { + "description": "How frequently index summaries should be re-sampled. This is done periodically to redistribute memory from the fixed-size pool to SSTables proportional their recent read rates. To disable, set to -1. This leaves existing index summaries at their current sampling level.", + "operationId": "find_config_index_summary_resize_interval_in_minutes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/reduce_cache_capacity_to": { + "get": { + "description": "Sets the size percentage to which maximum cache capacity is reduced when Java heap usage reaches the threshold defined by reduce_cache_sizes_at. Together with flush_largest_memtables_at, these properties constitute an emergency measure for preventing sudden out-of-memory (OOM) errors.", + "operationId": "find_config_reduce_cache_capacity_to", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/reduce_cache_sizes_at": { + "get": { + "description": "When Java heap usage (after a full concurrent mark sweep (CMS) garbage collection) exceeds this percentage, Cassandra reduces the cache capacity to the fraction of the current size as specified by reduce_cache_capacity_to. To disable, set the value to 1.0.", + "operationId": "find_config_reduce_cache_sizes_at", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/stream_throughput_outbound_megabits_per_sec": { + "get": { + "description": "Throttles all outbound streaming file transfers on a node to the specified throughput. Cassandra does mostly sequential I/O when streaming data during bootstrap or repair, which can lead to saturating the network connection and degrading client (RPC) performance.", + "operationId": "find_config_stream_throughput_outbound_megabits_per_sec", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/inter_dc_stream_throughput_outbound_megabits_per_sec": { + "get": { + "description": "Throttles all streaming file transfer between the data centers. This setting allows throttles streaming throughput betweens data centers in addition to throttling all network stream traffic as configured with stream_throughput_outbound_megabits_per_sec.", + "operationId": "find_config_inter_dc_stream_throughput_outbound_megabits_per_sec", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/trickle_fsync": { + "get": { + "description": "When doing sequential writing, enabling this option tells fsync to force the operating system to flush the dirty buffers at a set interval trickle_fsync_interval_in_kb. Enable this parameter to avoid sudden dirty buffer flushing from impacting read latencies. Recommended to use on SSDs, but not on HDDs.", + "operationId": "find_config_trickle_fsync", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/trickle_fsync_interval_in_kb": { + "get": { + "description": "Sets the size of the fsync in kilobytes.", + "operationId": "find_config_trickle_fsync_interval_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/auto_bootstrap": { + "get": { + "description": "This setting has been removed from default configuration. It makes new (non-seed) nodes automatically migrate the right data to themselves. Do not set this to false unless you really know what you are doing.\nRelated information: Initializing a multiple node cluster (single data center) and Initializing a multiple node cluster (multiple data centers).", + "operationId": "find_config_auto_bootstrap", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/batch_size_warn_threshold_in_kb": { + "get": { + "description": "Log WARN on any batch size exceeding this value in kilobytes. Caution should be taken on increasing the size of this threshold as it can lead to node instability.", + "operationId": "find_config_batch_size_warn_threshold_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/batch_size_fail_threshold_in_kb": { + "get": { + "description": "Fail any multiple-partition batch exceeding this value. 50kb (10x warn threshold) by default.", + "operationId": "find_config_batch_size_fail_threshold_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/broadcast_address": { + "get": { + "description": "The IP address a node tells other nodes in the cluster to contact it by. It allows public and private address to be different. For example, use the broadcast_address parameter in topologies where not all nodes have access to other nodes by their private IP addresses.\nIf your Scylla cluster is deployed across multiple Amazon EC2 regions and you use the EC2MultiRegionSnitch , set the broadcast_address to public IP address of the node and the listen_address to the private IP.", + "operationId": "find_config_broadcast_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/listen_on_broadcast_address": { + "get": { + "description": "When using multiple physical network interfaces, set this to true to listen on broadcast_address in addition to the listen_address, allowing nodes to communicate in both interfaces. Ignore this property if the network configuration automatically routes between the public and private networks such as EC2.", + "operationId": "find_config_listen_on_broadcast_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/initial_token": { + "get": { + "description": "Used in the single-node-per-token architecture, where a node owns exactly one contiguous range in the ring space. Setting this property overrides num_tokens.\nIf you not using vnodes or have num_tokens set it to 1 or unspecified (#num_tokens), you should always specify this parameter when setting up a production cluster for the first time and when adding capacity. For more information, see this parameter in the Cassandra 1.1 Node and Cluster Configuration documentation.\nThis parameter can be used with num_tokens (vnodes ) in special cases such as Restoring from a snapshot.", + "operationId": "find_config_initial_token", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/num_tokens": { + "get": { + "description": "Defines the number of tokens randomly assigned to this node on the ring when using virtual nodes (vnodes). The more tokens, relative to other nodes, the larger the proportion of data that the node stores. Generally all nodes should have the same number of tokens assuming equal hardware capability. The recommended value is 256. If unspecified (#num_tokens), Scylla uses 1 (equivalent to #num_tokens : 1) for legacy compatibility and uses the initial_token setting.\nIf not using vnodes, comment #num_tokens : 256 or set num_tokens : 1 and use initial_token. If you already have an existing cluster with one token per node and wish to migrate to vnodes, see Enabling virtual nodes on an existing production cluster.\nNote: If using DataStax Enterprise, the default setting of this property depends on the type of node and type of install.", + "operationId": "find_config_num_tokens", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/partitioner": { + "get": { + "description": "Distributes rows (by partition key) across all nodes in the cluster. Any IPartitioner may be used, including your own as long as it is in the class path. For new clusters use the default partitioner.\nScylla provides the following partitioners for backwards compatibility:\n\n RandomPartitioner\n ByteOrderedPartitioner\n OrderPreservingPartitioner (deprecated)\n\nRelated information: Partitioners", + "operationId": "find_config_partitioner", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/storage_port": { + "get": { + "description": "The port for inter-node communication.", + "operationId": "find_config_storage_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/auto_snapshot": { + "get": { + "description": "Enable or disable whether a snapshot is taken of the data before keyspace truncation or dropping of tables. To prevent data loss, using the default setting is strongly advised. If you set to false, you will lose data on truncation or drop.", + "operationId": "find_config_auto_snapshot", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/key_cache_keys_to_save": { + "get": { + "description": "Number of keys from the key cache to save. (0: all)", + "operationId": "find_config_key_cache_keys_to_save", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/key_cache_save_period": { + "get": { + "description": "Duration in seconds that keys are saved in cache. Caches are saved to saved_caches_directory. Saved caches greatly improve cold-start speeds and has relatively little effect on I/O.", + "operationId": "find_config_key_cache_save_period", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/key_cache_size_in_mb": { + "get": { + "description": "A global cache setting for tables. It is the maximum size of the key cache in memory. To disable set to 0.\nRelated information: nodetool setcachecapacity.", + "operationId": "find_config_key_cache_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/row_cache_keys_to_save": { + "get": { + "description": "Number of keys from the row cache to save.", + "operationId": "find_config_row_cache_keys_to_save", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/row_cache_size_in_mb": { + "get": { + "description": "Maximum size of the row cache in memory. Row cache can save more time than key_cache_size_in_mb, but is space-intensive because it contains the entire row. Use the row cache only for hot rows or static rows. If you reduce the size, you may not get you hottest keys loaded on start up.", + "operationId": "find_config_row_cache_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/row_cache_save_period": { + "get": { + "description": "Duration in seconds that rows are saved in cache. Caches are saved to saved_caches_directory.", + "operationId": "find_config_row_cache_save_period", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/memory_allocator": { + "get": { + "description": "The off-heap memory allocator. In addition to caches, this property affects storage engine meta data. Supported values:\n NativeAllocator\n JEMallocAllocator\n\nExperiments show that jemalloc saves some memory compared to the native allocator because it is more fragmentation resistant. To use, install jemalloc as a library and modify cassandra-env.sh (instructions in file).", + "operationId": "find_config_memory_allocator", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/counter_cache_size_in_mb": { + "get": { + "description": "When no value is specified a minimum of 2.5% of Heap or 50MB. If you perform counter deletes and rely on low gc_grace_seconds, you should disable the counter cache. To disable, set to 0", + "operationId": "find_config_counter_cache_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/counter_cache_save_period": { + "get": { + "description": "Duration after which Cassandra should save the counter cache (keys only). Caches are saved to saved_caches_directory.", + "operationId": "find_config_counter_cache_save_period", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/counter_cache_keys_to_save": { + "get": { + "description": "Number of keys from the counter cache to save. When disabled all keys are saved.", + "operationId": "find_config_counter_cache_keys_to_save", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/tombstone_warn_threshold": { + "get": { + "description": "The maximum number of tombstones a query can scan before warning.", + "operationId": "find_config_tombstone_warn_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/tombstone_failure_threshold": { + "get": { + "description": "The maximum number of tombstones a query can scan before aborting.", + "operationId": "find_config_tombstone_failure_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/range_request_timeout_in_ms": { + "get": { + "description": "The time in milliseconds that the coordinator waits for sequential or index scans to complete.", + "operationId": "find_config_range_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/read_request_timeout_in_ms": { + "get": { + "description": "The time that the coordinator waits for read operations to complete", + "operationId": "find_config_read_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/counter_write_request_timeout_in_ms": { + "get": { + "description": "The time that the coordinator waits for counter writes to complete.", + "operationId": "find_config_counter_write_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/cas_contention_timeout_in_ms": { + "get": { + "description": "The time that the coordinator continues to retry a CAS (compare and set) operation that contends with other proposals for the same row.", + "operationId": "find_config_cas_contention_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/truncate_request_timeout_in_ms": { + "get": { + "description": "The time that the coordinator waits for truncates (remove all data from a table) to complete. The long default value allows for a snapshot to be taken before removing the data. If auto_snapshot is disabled (not recommended), you can reduce this time.", + "operationId": "find_config_truncate_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/write_request_timeout_in_ms": { + "get": { + "description": "The time in milliseconds that the coordinator waits for write operations to complete.\nRelated information: About hinted handoff writes", + "operationId": "find_config_write_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/request_timeout_in_ms": { + "get": { + "description": "The default timeout for other, miscellaneous operations.\nRelated information: About hinted handoff writes", + "operationId": "find_config_request_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/cross_node_timeout": { + "get": { + "description": "Enable or disable operation timeout information exchange between nodes (to accurately measure request timeouts). If disabled Cassandra assumes the request was forwarded to the replica instantly by the coordinator.\nCAUTION:\nBefore enabling this property make sure NTP (network time protocol) is installed and the times are synchronized between the nodes.", + "operationId": "find_config_cross_node_timeout", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/internode_send_buff_size_in_bytes": { + "get": { + "description": "Sets the sending socket buffer size in bytes for inter-node calls.\nWhen setting this parameter and internode_recv_buff_size_in_bytes, the buffer size is limited by net.core.wmem_max. When unset, buffer size is defined by net.ipv4.tcp_wmem. See man tcp and:\n\n /proc/sys/net/core/wmem_max\n /proc/sys/net/core/rmem_max\n /proc/sys/net/ipv4/tcp_wmem\n /proc/sys/net/ipv4/tcp_wmem\n", + "operationId": "find_config_internode_send_buff_size_in_bytes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/internode_recv_buff_size_in_bytes": { + "get": { + "description": "Sets the receiving socket buffer size in bytes for inter-node calls.", + "operationId": "find_config_internode_recv_buff_size_in_bytes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/internode_compression": { + "get": { + "description": "Controls whether traffic between nodes is compressed. The valid values are:\n\n all: All traffic is compressed.\n dc : Traffic between data centers is compressed.\n none : No compression.", + "operationId": "find_config_internode_compression", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/inter_dc_tcp_nodelay": { + "get": { + "description": "Enable or disable tcp_nodelay for inter-data center communication. When disabled larger, but fewer, network packets are sent. This reduces overhead from the TCP protocol itself. However, if cross data-center responses are blocked, it will increase latency.", + "operationId": "find_config_inter_dc_tcp_nodelay", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/streaming_socket_timeout_in_ms": { + "get": { + "description": "Enable or disable socket timeout for streaming operations. When a timeout occurs during streaming, streaming is retried from the start of the current file. Avoid setting this value too low, as it can result in a significant amount of data re-streaming.", + "operationId": "find_config_streaming_socket_timeout_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/start_native_transport": { + "get": { + "description": "Enable or disable the native transport server. Uses the same address as the rpc_address, but the port is different from the rpc_port. See native_transport_port.", + "operationId": "find_config_start_native_transport", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/native_transport_port": { + "get": { + "description": "Port on which the CQL native transport listens for clients.", + "operationId": "find_config_native_transport_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/native_transport_port_ssl": { + "get": { + "description": "Port on which the CQL TLS native transport listens for clients.Enabling client encryption and keeping native_transport_port_ssl disabled will use encryptionfor native_transport_port. Setting native_transport_port_ssl to a different valuefrom native_transport_port will use encryption for native_transport_port_ssl whilekeeping native_transport_port unencrypted", + "operationId": "find_config_native_transport_port_ssl", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/native_transport_max_threads": { + "get": { + "description": "The maximum number of thread handling requests. The meaning is the same as rpc_max_threads.\nDefault is different (128 versus unlimited).\nNo corresponding native_transport_min_threads.\nIdle threads are stopped after 30 seconds.\n", + "operationId": "find_config_native_transport_max_threads", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/native_transport_max_frame_size_in_mb": { + "get": { + "description": "The maximum size of allowed frame. Frame (requests) larger than this are rejected as invalid.", + "operationId": "find_config_native_transport_max_frame_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/broadcast_rpc_address": { + "get": { + "description": "RPC address to broadcast to drivers and other Scylla nodes. This cannot be set to 0.0.0.0. If blank, it is set to the value of the rpc_address or rpc_interface. If rpc_address or rpc_interfaceis set to 0.0.0.0, this property must be set.\n", + "operationId": "find_config_broadcast_rpc_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_port": { + "get": { + "description": "Thrift port for client connections.", + "operationId": "find_config_rpc_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/start_rpc": { + "get": { + "description": "Starts the Thrift RPC server", + "operationId": "find_config_start_rpc", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_keepalive": { + "get": { + "description": "Enable or disable keepalive on client connections (RPC or native).", + "operationId": "find_config_rpc_keepalive", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_max_threads": { + "get": { + "description": "Regardless of your choice of RPC server (rpc_server_type), the number of maximum requests in the RPC thread pool dictates how many concurrent requests are possible. However, if you are using the parameter sync in the rpc_server_type, it also dictates the number of clients that can be connected. For a large number of client connections, this could cause excessive memory usage for the thread stack. Connection pooling on the client side is highly recommended. Setting a maximum thread pool size acts as a safeguard against misbehaved clients. If the maximum is reached, Cassandra blocks additional connections until a client disconnects.", + "operationId": "find_config_rpc_max_threads", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_min_threads": { + "get": { + "description": "Sets the minimum thread pool size for remote procedure calls.", + "operationId": "find_config_rpc_min_threads", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_recv_buff_size_in_bytes": { + "get": { + "description": "Sets the receiving socket buffer size for remote procedure calls.", + "operationId": "find_config_rpc_recv_buff_size_in_bytes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_send_buff_size_in_bytes": { + "get": { + "description": "Sets the sending socket buffer size in bytes for remote procedure calls.", + "operationId": "find_config_rpc_send_buff_size_in_bytes", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/rpc_server_type": { + "get": { + "description": "Cassandra provides three options for the RPC server. On Windows, sync is about 30% slower than hsha. On Linux, sync and hsha performance is about the same, but hsha uses less memory.\n\n sync (Default One thread per Thrift connection.) For a very large number of clients, memory is the limiting factor. On a 64-bit JVM, 180KB is the minimum stack size per thread and corresponds to your use of virtual memory. Physical memory may be limited depending on use of stack space.\n hsh Half synchronous, half asynchronous. All Thrift clients are handled asynchronously using a small number of threads that does not vary with the number of clients and thus scales well to many clients. The RPC requests are synchronous (one thread per active request).\n Note: When selecting this option, you must change the default value (unlimited) of rpc_max_threads.\n Your own RPC server: You must provide a fully-qualified class name of an o.a.c.t.TServerFactory that can create a server instance.", + "operationId": "find_config_rpc_server_type", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/cache_hit_rate_read_balancing": { + "get": { + "description": "This boolean controls whether the replicas for read query will be choosen based on cache hit ratio", + "operationId": "find_config_cache_hit_rate_read_balancing", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/dynamic_snitch_badness_threshold": { + "get": { + "description": "Sets the performance threshold for dynamically routing requests away from a poorly performing node. A value of 0.2 means Cassandra continues to prefer the static snitch values until the node response time is 20% worse than the best performing node. Until the threshold is reached, incoming client requests are statically routed to the closest replica (as determined by the snitch). Having requests consistently routed to a given replica can help keep a working set of data hot when read repair is less than 1.", + "operationId": "find_config_dynamic_snitch_badness_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/dynamic_snitch_reset_interval_in_ms": { + "get": { + "description": "Time interval in milliseconds to reset all node scores, which allows a bad node to recover.", + "operationId": "find_config_dynamic_snitch_reset_interval_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/dynamic_snitch_update_interval_in_ms": { + "get": { + "description": "The time interval for how often the snitch calculates node scores. Because score calculation is CPU intensive, be careful when reducing this interval.", + "operationId": "find_config_dynamic_snitch_update_interval_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/hinted_handoff_enabled": { + "get": { + "description": "Enable or disable hinted handoff. To enable per data center, add data center list. For example: hinted_handoff_enabled: DC1,DC2. A hint indicates that the write needs to be replayed to an unavailable node. Related information: About hinted handoff writes", + "operationId": "find_config_hinted_handoff_enabled", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/hinted_handoff_throttle_in_kb": { + "get": { + "description": "Maximum throttle per delivery thread in kilobytes per second. This rate reduces proportionally to the number of nodes in the cluster. For example, if there are two nodes in the cluster, each delivery thread will use the maximum rate. If there are three, each node will throttle to half of the maximum, since the two nodes are expected to deliver hints simultaneously.", + "operationId": "find_config_hinted_handoff_throttle_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/max_hint_window_in_ms": { + "get": { + "description": "Maximum amount of time that hints are generates hints for an unresponsive node. After this interval, new hints are no longer generated until the node is back up and responsive. If the node goes down again, a new interval begins. This setting can prevent a sudden demand for resources when a node is brought back online and the rest of the cluster attempts to replay a large volume of hinted writes.\nRelated information: Failure detection and recovery", + "operationId": "find_config_max_hint_window_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/max_hints_delivery_threads": { + "get": { + "description": "Number of threads with which to deliver hints. In multiple data-center deployments, consider increasing this number because cross data-center handoff is generally slower.", + "operationId": "find_config_max_hints_delivery_threads", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/batchlog_replay_throttle_in_kb": { + "get": { + "description": "Total maximum throttle. Throttling is reduced proportionally to the number of nodes in the cluster.", + "operationId": "find_config_batchlog_replay_throttle_in_kb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/request_scheduler": { + "get": { + "description": "Defines a scheduler to handle incoming client requests according to a defined policy. This scheduler is useful for throttling client requests in single clusters containing multiple keyspaces. This parameter is specifically for requests from the client and does not affect inter-node communication. Valid values are:\n\n org.apache.cassandra.scheduler.NoScheduler No scheduling takes place.\n org.apache.cassandra.scheduler.RoundRobinScheduler Round robin of client requests to a node with a separate queue for each request_scheduler_id property.\n A Java class that implements the RequestScheduler interface.", + "operationId": "find_config_request_scheduler", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/request_scheduler_id": { + "get": { + "description": "An identifier on which to perform request scheduling. Currently the only valid value is keyspace. See weights.", + "operationId": "find_config_request_scheduler_id", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/request_scheduler_options": { + "get": { + "description": "Contains a list of properties that define configuration options for request_scheduler:\n\n throttle_limit: The number of in-flight requests per client. Requests beyond this limit are queued up until running requests complete. Recommended value is ((concurrent_reads + concurrent_writes) × 2)\n default_weight: (Default: 1 **) How many requests are handled during each turn of the RoundRobin.\n weights: (Default: Keyspace: 1) Takes a list of keyspaces. It sets how many requests are handled during each turn of the RoundRobin, based on the request_scheduler_id.", + "operationId": "find_config_request_scheduler_options", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/thrift_framed_transport_size_in_mb": { + "get": { + "description": "Frame size (maximum field length) for Thrift. The frame is the row or part of the row the application is inserting.", + "operationId": "find_config_thrift_framed_transport_size_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/thrift_max_message_length_in_mb": { + "get": { + "description": "The maximum length of a Thrift message in megabytes, including all fields and internal Thrift overhead (1 byte of overhead for each frame). Message length is usually used in conjunction with batches. A frame length greater than or equal to 24 accommodates a batch with four inserts, each of which is 24 bytes. The required message length is greater than or equal to 24+24+24+24+4 (number of frames).", + "operationId": "find_config_thrift_max_message_length_in_mb", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/authenticator": { + "get": { + "description": "The authentication backend, used to identify users. The available authenticators are:\n\n org.apache.cassandra.auth.AllowAllAuthenticator : Disables authentication; no checks are performed.\n org.apache.cassandra.auth.PasswordAuthenticator : Authenticates users with user names and hashed passwords stored in the system_auth.credentials table. If you use the default, 1, and the node with the lone replica goes down, you will not be able to log into the cluster because the system_auth keyspace was not replicated.\nRelated information: Internal authentication", + "operationId": "find_config_authenticator", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/internode_authenticator": { + "get": { + "description": "Internode authentication backend. It implements org.apache.cassandra.auth.AllowAllInternodeAuthenticator to allows or disallow connections from peer nodes.", + "operationId": "find_config_internode_authenticator", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/authorizer": { + "get": { + "description": "The authorization backend. It implements IAuthenticator, which limits access and provides permissions. The available authorizers are:\n\n AllowAllAuthorizer : Disables authorization; allows any action to any user.\n CassandraAuthorizer : Stores permissions in system_auth.permissions table. If you use the default, 1, and the node with the lone replica goes down, you will not be able to log into the cluster because the system_auth keyspace was not replicated.\nRelated information: Object permissions", + "operationId": "find_config_authorizer", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/role_manager": { + "get": { + "description": "The role-management backend, used to maintain grantts and memberships between roles.\nThe available role-managers are:\n CassandraRoleManager : Stores role data in the system_auth keyspace.", + "operationId": "find_config_role_manager", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/permissions_validity_in_ms": { + "get": { + "description": "How long permissions in cache remain valid. Depending on the authorizer, such as CassandraAuthorizer, fetching permissions can be resource intensive. Permissions caching is disabled when this property is set to 0 or when AllowAllAuthorizer is used. The cached value is considered valid as long as both its value is not older than the permissions_validity_in_ms and the cached value has been read at least once during the permissions_validity_in_ms time frame. If any of these two conditions doesn't hold the cached value is going to be evicted from the cache.\nRelated information: Object permissions", + "operationId": "find_config_permissions_validity_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/permissions_update_interval_in_ms": { + "get": { + "description": "Refresh interval for permissions cache (if enabled). After this interval, cache entries become eligible for refresh. An async reload is scheduled every permissions_update_interval_in_ms time period and the old value is returned until it completes. If permissions_validity_in_ms has a non-zero value, then this property must also have a non-zero value. It's recommended to set this value to be at least 3 times smaller than the permissions_validity_in_ms.", + "operationId": "find_config_permissions_update_interval_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/permissions_cache_max_entries": { + "get": { + "description": "Maximum cached permission entries. Must have a non-zero value if permissions caching is enabled (see a permissions_validity_in_ms description).", + "operationId": "find_config_permissions_cache_max_entries", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/server_encryption_options": { + "get": { + "description": "Enable or disable inter-node encryption. You must also generate keys and provide the appropriate key and trust store locations and passwords. No custom encryption options are currently enabled. The available options are:\n\ninternode_encryption : (Default: none ) Enable or disable encryption of inter-node communication using the TLS_RSA_WITH_AES_128_CBC_SHA cipher suite for authentication, key exchange, and encryption of data transfers. The available inter-node options are:\n all : Encrypt all inter-node communications.\n none : No encryption.\n dc : Encrypt the traffic between the data centers (server only).\n rack : Encrypt the traffic between the racks(server only).\ncertificate : (Default: conf/scylla.crt) The location of a PEM-encoded x509 certificate used to identify and encrypt the internode communication.\nkeyfile : (Default: conf/scylla.key) PEM Key file associated with certificate.\ntruststore : (Default: ) Location of the truststore containing the trusted certificate for authenticating remote servers.\n\nThe advanced settings are:\n\n priority_string : GnuTLS priority string controlling TLS algorithms used/allowed.\n require_client_auth : (Default: false ) Enables or disables certificate authentication.\nRelated information: Node-to-node encryption", + "operationId": "find_config_server_encryption_options", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/client_encryption_options": { + "get": { + "description": "Enable or disable client-to-node encryption. You must also generate keys and provide the appropriate key and certificate. No custom encryption options are currently enabled. The available options are:\n\n enabled : (Default: false ) To enable, set to true.\n certificate: (Default: conf/scylla.crt) The location of a PEM-encoded x509 certificate used to identify and encrypt the client/server communication.\n keyfile: (Default: conf/scylla.key) PEM Key file associated with certificate.\ntruststore : (Default: ) Location of the truststore containing the trusted certificate for authenticating remote servers.\n\nThe advanced settings are:\n\n priority_string : GnuTLS priority string controlling TLS algorithms used/allowed.\n require_client_auth : (Default: false ) Enables or disables certificate authentication.\nRelated information: Client-to-node encryption", + "operationId": "find_config_client_encryption_options", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/ssl_storage_port": { + "get": { + "description": "The SSL port for encrypted communication. Unused unless enabled in encryption_options.", + "operationId": "find_config_ssl_storage_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_in_memory_data_store": { + "get": { + "description": "Enable in memory mode (system tables are always persisted)", + "operationId": "find_config_enable_in_memory_data_store", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_cache": { + "get": { + "description": "Enable cache", + "operationId": "find_config_enable_cache", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_commitlog": { + "get": { + "description": "Enable commitlog", + "operationId": "find_config_enable_commitlog", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/volatile_system_keyspace_for_testing": { + "get": { + "description": "Don't persist system keyspace - testing only!", + "operationId": "find_config_volatile_system_keyspace_for_testing", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/api_port": { + "get": { + "description": "Http Rest API port", + "operationId": "find_config_api_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/api_address": { + "get": { + "description": "Http Rest API address", + "operationId": "find_config_api_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/api_ui_dir": { + "get": { + "description": "The directory location of the API GUI", + "operationId": "find_config_api_ui_dir", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/api_doc_dir": { + "get": { + "description": "The API definition file directory", + "operationId": "find_config_api_doc_dir", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/load_balance": { + "get": { + "description": "CQL request load balancing: 'none' or round-robin'", + "operationId": "find_config_load_balance", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/consistent_rangemovement": { + "get": { + "description": "When set to true, range movements will be consistent. It means: 1) it will refuse to bootstrap a new node if other bootstrapping/leaving/moving nodes detected. 2) data will be streamed to a new node only from the node which is no longer responsible for the token range. Same as -Dcassandra.consistent.rangemovement in cassandra", + "operationId": "find_config_consistent_rangemovement", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/join_ring": { + "get": { + "description": "When set to true, a node will join the token ring. When set to false, a node will not join the token ring. User can use nodetool join to initiate ring joinging later. Same as -Dcassandra.join_ring in cassandra.", + "operationId": "find_config_join_ring", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/load_ring_state": { + "get": { + "description": "When set to true, load tokens and host_ids previously saved. Same as -Dcassandra.load_ring_state in cassandra.", + "operationId": "find_config_load_ring_state", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/replace_node": { + "get": { + "description": "The UUID of the node to replace. Same as -Dcassandra.replace_node in cssandra.", + "operationId": "find_config_replace_node", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/replace_token": { + "get": { + "description": "The tokens of the node to replace. Same as -Dcassandra.replace_token in cassandra.", + "operationId": "find_config_replace_token", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/replace_address": { + "get": { + "description": "The listen_address or broadcast_address of the dead node to replace. Same as -Dcassandra.replace_address.", + "operationId": "find_config_replace_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/replace_address_first_boot": { + "get": { + "description": "Like replace_address option, but if the node has been bootstrapped successfully it will be ignored. Same as -Dcassandra.replace_address_first_boot.", + "operationId": "find_config_replace_address_first_boot", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/override_decommission": { + "get": { + "description": "Set true to force a decommissioned node to join the cluster", + "operationId": "find_config_override_decommission", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/ring_delay_ms": { + "get": { + "description": "Time a node waits to hear from other nodes before joining the ring in milliseconds. Same as -Dcassandra.ring_delay_ms in cassandra.", + "operationId": "find_config_ring_delay_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/shadow_round_ms": { + "get": { + "description": "The maximum gossip shadow round time. Can be used to reduce the gossip feature check time during node boot up.", + "operationId": "find_config_shadow_round_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/fd_max_interval_ms": { + "get": { + "description": "The maximum failure_detector interval time in milliseconds. Interval larger than the maximum will be ignored. Larger cluster may need to increase the default.", + "operationId": "find_config_fd_max_interval_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/fd_initial_value_ms": { + "get": { + "description": "The initial failure_detector interval time in milliseconds.", + "operationId": "find_config_fd_initial_value_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/shutdown_announce_in_ms": { + "get": { + "description": "Time a node waits after sending gossip shutdown message in milliseconds. Same as -Dcassandra.shutdown_announce_in_ms in cassandra.", + "operationId": "find_config_shutdown_announce_in_ms", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/developer_mode": { + "get": { + "description": "Relax environment checks. Setting to true can reduce performance and reliability significantly.", + "operationId": "find_config_developer_mode", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/skip_wait_for_gossip_to_settle": { + "get": { + "description": "An integer to configure the wait for gossip to settle. -1: wait normally, 0: do not wait at all, n: wait for at most n polls. Same as -Dcassandra.skip_wait_for_gossip_to_settle in cassandra.", + "operationId": "find_config_skip_wait_for_gossip_to_settle", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/experimental": { + "get": { + "description": "Set to true to unlock experimental features.", + "operationId": "find_config_experimental", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/lsa_reclamation_step": { + "get": { + "description": "Minimum number of segments to reclaim in a single step", + "operationId": "find_config_lsa_reclamation_step", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/prometheus_port": { + "get": { + "description": "Prometheus port, set to zero to disable", + "operationId": "find_config_prometheus_port", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/prometheus_address": { + "get": { + "description": "Prometheus listening address", + "operationId": "find_config_prometheus_address", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/prometheus_prefix": { + "get": { + "description": "Set the prefix of the exported Prometheus metrics. Changing this will break Scylla's dashboard compatibility, do not change unless you know what you are doing.", + "operationId": "find_config_prometheus_prefix", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/abort_on_lsa_bad_alloc": { + "get": { + "description": "Abort when allocation in LSA region fails", + "operationId": "find_config_abort_on_lsa_bad_alloc", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/murmur3_partitioner_ignore_msb_bits": { + "get": { + "description": "Number of most siginificant token bits to ignore in murmur3 partitioner; increase for very large clusters", + "operationId": "find_config_murmur3_partitioner_ignore_msb_bits", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/virtual_dirty_soft_limit": { + "get": { + "description": "Soft limit of virtual dirty memory expressed as a portion of the hard limit", + "operationId": "find_config_virtual_dirty_soft_limit", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/sstable_summary_ratio": { + "get": { + "description": "Enforces that 1 byte of summary is written for every N (2000 by default) bytes written to data file. Value must be between 0 and 1.", + "operationId": "find_config_sstable_summary_ratio", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "number" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/large_memory_allocation_warning_threshold": { + "get": { + "description": "Warn about memory allocations above this size; set to zero to disable", + "operationId": "find_config_large_memory_allocation_warning_threshold", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "integer" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_deprecated_partitioners": { + "get": { + "description": "Enable the byteordered and murmurs partitioners. These partitioners are deprecated and will be removed in a future version.", + "operationId": "find_config_enable_deprecated_partitioners", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_keyspace_column_family_metrics": { + "get": { + "description": "Enable per keyspace and per column family metrics reporting", + "operationId": "find_config_enable_keyspace_column_family_metrics", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_sstable_data_integrity_check": { + "get": { + "description": "Enable interposer which checks for integrity of every sstable write. Performance is affected to some extent as a result. Useful to help debugging problems that may arise at another layers.", + "operationId": "find_config_enable_sstable_data_integrity_check", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/cpu_scheduler": { + "get": { + "description": "Enable cpu scheduling", + "operationId": "find_config_cpu_scheduler", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/view_building": { + "get": { + "description": "Enable view building; should only be set to false when the node is experience issues due to view building", + "operationId": "find_config_view_building", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_sstables_mc_format": { + "get": { + "description": "Enable SSTables 'mc' format to be used as the default file format", + "operationId": "find_config_enable_sstables_mc_format", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_dangerous_direct_import_of_cassandra_counters": { + "get": { + "description": "Only turn this option on if you want to import tables from Cassandra containing counters, and you are SURE that no counters in that table were created in a version earlier than Cassandra 2.1. It is not enough to have ever since upgraded to newer versions of Cassandra. If you EVER used a version earlier than 2.1 in the cluster where these SSTables come from, DO NOT TURN ON THIS OPTION! You will corrupt your data. You have been warned.", + "operationId": "find_config_enable_dangerous_direct_import_of_cassandra_counters", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/enable_shard_aware_drivers": { + "get": { + "description": "Enable native transport drivers to use connection-per-shard for better performance", + "operationId": "find_config_enable_shard_aware_drivers", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/default_log_level": { + "get": { + "description": "", + "operationId": "find_config_default_log_level", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "string" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/logger_log_level": { + "get": { + "description": "", + "operationId": "find_config_logger_log_level", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/log_to_stdout": { + "get": { + "description": "", + "operationId": "find_config_log_to_stdout", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + }, + "/config/log_to_syslog": { + "get": { + "description": "", + "operationId": "find_config_log_to_syslog", + "produces": [ + "application/json" + ], + "tags": [ + "config" + ], + "parameters": [], + "responses": { + "200": { + "description": "Config value", + "schema": { + "type": "boolean" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/ErrorModel" + } + } + } + } + } + }, + "definitions": { + "ErrorModel": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer" + } + } + } + } +} \ No newline at end of file diff --git a/pkg/scyllaclient/status.go b/pkg/scyllaclient/status.go new file mode 100644 index 00000000000..b1e9ffc21c6 --- /dev/null +++ b/pkg/scyllaclient/status.go @@ -0,0 +1,39 @@ +// Copyright (C) 2017 ScyllaDB + +package scyllaclient + +import ( + "github.com/go-openapi/runtime" + "github.com/pkg/errors" + agentModels "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/agent/models" + scylla2Models "github.com/scylladb/scylla-operator/pkg/scyllaclient/internal/scylla_v2/models" +) + +// StatusCodeOf returns HTTP status code carried by the error or it's cause. +// If not status can be found it returns 0. +func StatusCodeOf(err error) int { + err = errors.Cause(err) + switch v := err.(type) { + case interface { + Code() int + }: + return v.Code() + case *runtime.APIError: + return v.Code + case interface { + GetPayload() *agentModels.ErrorResponse + }: + p := v.GetPayload() + if p != nil { + return int(p.Status) + } + case interface { + GetPayload() *scylla2Models.ErrorModel + }: + p := v.GetPayload() + if p != nil { + return int(p.Code) + } + } + return 0 +} diff --git a/pkg/scyllaclient/timeout.go b/pkg/scyllaclient/timeout.go new file mode 100644 index 00000000000..574f7282abb --- /dev/null +++ b/pkg/scyllaclient/timeout.go @@ -0,0 +1,48 @@ +package scyllaclient + +import ( + "context" + "io" + "net/http" + "time" + + "github.com/scylladb/scylla-operator/pkg/util/httpx" + + "github.com/pkg/errors" +) + +// body defers context cancellation until response body is closed. +type body struct { + io.ReadCloser + cancel context.CancelFunc +} + +func (b body) Close() error { + defer b.cancel() + return b.ReadCloser.Close() +} + +// timeout sets request context timeout for individual requests. +func timeout(next http.RoundTripper, timeout time.Duration) http.RoundTripper { + return httpx.RoundTripperFunc(func(req *http.Request) (resp *http.Response, err error) { + d, ok := req.Context().Value(ctxCustomTimeout).(time.Duration) + if !ok { + d = timeout + } + + ctx, cancel := context.WithTimeout(req.Context(), d) + defer func() { + if resp != nil { + resp.Body = body{ + ReadCloser: resp.Body, + cancel: cancel, + } + } + + if errors.Cause(err) == context.DeadlineExceeded && ctx.Err() == context.DeadlineExceeded { + err = errors.Errorf("timeout after %s", d) + } + }() + return next.RoundTrip(req.WithContext(ctx)) + }) +} diff --git a/pkg/sidecar/checks.go b/pkg/sidecar/checks.go index cf92acc1471..2b93e7306fa 100644 --- a/pkg/sidecar/checks.go +++ b/pkg/sidecar/checks.go @@ -5,11 +5,12 @@ import ( "fmt" "net/http" + "github.com/scylladb/scylla-operator/pkg/util/network" + "github.com/pkg/errors" "github.com/scylladb/go-log" "github.com/scylladb/scylla-operator/pkg/naming" - "github.com/yanniszark/go-nodetool/nodetool" ) // setupHTTPChecks brings up the liveness and readiness probes. @@ -26,48 +27,43 @@ func (mc *MemberController) setupHTTPChecks(ctx context.Context) { func livenessCheck(mc *MemberController) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, req *http.Request) { - status := http.StatusOK + host, err := network.FindFirstNonLocalIP() + if err != nil { + w.WriteHeader(http.StatusServiceUnavailable) + mc.logger.Error(log.WithTraceID(req.Context()), "Liveness check failed", "error", err) + return + } // Check if JMX is reachable - _, err := mc.nodetool.Status() + _, err = mc.scyllaClient.Status(context.Background(), host.String()) if err != nil { mc.logger.Error(log.WithTraceID(req.Context()), "Liveness check failed", "error", err) - status = http.StatusServiceUnavailable + w.WriteHeader(http.StatusServiceUnavailable) + return } - w.WriteHeader(status) + w.WriteHeader(http.StatusOK) } } func readinessCheck(mc *MemberController) func(http.ResponseWriter, *http.Request) { return func(w http.ResponseWriter, req *http.Request) { - status := http.StatusOK - err := func() error { - // Contact Scylla to learn about the status of the member - HostIDMap, err := mc.nodetool.Status() - if err != nil { - return fmt.Errorf("Error while executing nodetool status in readiness check: %s", err.Error()) - } - // Get local node through static ip - localNode, ok := HostIDMap[mc.member.StaticIP] - if !ok { - return fmt.Errorf("Couldn't find node with ip %s in nodetool status.", mc.member.StaticIP) - } - // Check local node status - // Up means the member is alive - if localNode.Status != nodetool.NodeStatusUp { - return fmt.Errorf("Unexpected local node status: %s", localNode.Status) - } - // Check local node state - // Normal means that the member has completed bootstrap and joined the cluster - if localNode.State != nodetool.NodeStateNormal { - return fmt.Errorf("Unexpected local node state: %s", localNode.State) - } - return nil - }() - + host, err := network.FindFirstNonLocalIP() if err != nil { + w.WriteHeader(http.StatusServiceUnavailable) mc.logger.Error(log.WithTraceID(req.Context()), "Readiness check failed", "error", err) - status = http.StatusServiceUnavailable + return + } + // Contact Scylla to learn about the status of the member + hosts, err := mc.scyllaClient.Status(context.Background(), host.String()) + if err != nil { + mc.logger.Error(log.WithTraceID(req.Context()), "error while executing nodetool status in readiness check", "error", err) + } + for _, h := range hosts { + if h.Addr == mc.member.StaticIP && h.IsUN() { + w.WriteHeader(http.StatusOK) + return + } } - w.WriteHeader(status) + mc.logger.Error(log.WithTraceID(req.Context()), "Readiness check failed, node not ready") + w.WriteHeader(http.StatusServiceUnavailable) } } diff --git a/pkg/sidecar/config/config.go b/pkg/sidecar/config/config.go index c50b119b598..e278a309a21 100644 --- a/pkg/sidecar/config/config.go +++ b/pkg/sidecar/config/config.go @@ -26,7 +26,6 @@ const ( scyllaYAMLConfigMapPath = naming.ScyllaConfigDirName + "/" + naming.ScyllaConfigName scyllaRackDCPropertiesPath = configDirScylla + "/" + naming.ScyllaRackDCPropertiesName scyllaRackDCPropertiesConfigMapPath = naming.ScyllaConfigDirName + "/" + naming.ScyllaRackDCPropertiesName - jolokiaPath = naming.SharedDirName + "/" + naming.JolokiaJarName entrypointPath = "/docker-entrypoint.py" ) @@ -64,10 +63,6 @@ func (s *ScyllaConfig) Setup(ctx context.Context) (*exec.Cmd, error) { if err = s.setupRackDCProperties(); err != nil { return nil, errors.Wrap(err, "failed to setup rackdc properties file") } - s.logger.Info(ctx, "Setting up jolokia config") - if err = s.setupJolokia(); err != nil { - return nil, errors.Wrap(err, "failed to setup jolokia") - } s.logger.Info(ctx, "Setting up entrypoint script") if cmd, err = s.setupEntrypoint(ctx); err != nil { return nil, errors.Wrap(err, "failed to setup entrypoint") @@ -159,76 +154,6 @@ func loadProperties(fileName string, logger log.Logger) *properties.Properties { return p } -// setupJolokia injects jolokia as a javaagent by -// modifying the scylla-jmx file. -func (s *ScyllaConfig) setupJolokia() error { - - // Create Jolokia Config - opts := []struct { - flag, value string - }{ - { - flag: "host", - value: "localhost", - }, - { - flag: "port", - value: fmt.Sprintf("%d", naming.JolokiaPort), - }, - { - flag: "executor", - value: "fixed", - }, - { - flag: "threadNr", - value: "2", - }, - } - - cmd := []string{} - for _, opt := range opts { - cmd = append(cmd, fmt.Sprintf("%s=%s", opt.flag, opt.value)) - } - jolokiaCfg := fmt.Sprintf("-javaagent:%s=%s", jolokiaPath, strings.Join(cmd, ",")) - - scyllaJMXPath, err := findScyllaJMX() - if err != nil { - return errors.Wrap(err, "scylla-jmx unavailable") - } - // Open scylla-jmx file - scyllaJMXBytes, err := ioutil.ReadFile(scyllaJMXPath) - if err != nil { - return errors.Wrap(err, "error reading scylla-jmx") - } - // Inject jolokia as a javaagent - scyllaJMX := string(scyllaJMXBytes) - splitIndex := strings.Index(scyllaJMX, `\`) + len(`\`) - injectedLine := fmt.Sprintf("\n %s \\", jolokiaCfg) - scyllaJMXCustom := scyllaJMX[:splitIndex] + injectedLine + scyllaJMX[splitIndex:] - // Write the custom scylla-jmx contents back - if err := ioutil.WriteFile(scyllaJMXPath, []byte(scyllaJMXCustom), os.ModePerm); err != nil { - return errors.Wrap(err, "error writing scylla-jmx: %s") - } - return nil -} - -func findScyllaJMX() (string, error) { - for _, file := range scyllaJMXPaths { - if fileExists(file) { - return file, nil - } - } - return "", errors.Errorf("No scylla-jmx found, tried [%v]", scyllaJMXPaths) -} - -func fileExists(filename string) bool { - info, err := os.Stat(filename) - if os.IsNotExist(err) { - return false - } - return !info.IsDir() -} - func (s *ScyllaConfig) setupEntrypoint(ctx context.Context) (*exec.Cmd, error) { m := s.member // Get seeds diff --git a/pkg/sidecar/sidecar_controller.go b/pkg/sidecar/sidecar_controller.go index 0d9f4eb4874..854c8220d23 100644 --- a/pkg/sidecar/sidecar_controller.go +++ b/pkg/sidecar/sidecar_controller.go @@ -18,16 +18,16 @@ package sidecar import ( "context" "fmt" - "net/url" "time" + "github.com/scylladb/scylla-operator/pkg/scyllaclient" + "github.com/pkg/errors" "github.com/scylladb/go-log" "github.com/scylladb/scylla-operator/cmd/options" "github.com/scylladb/scylla-operator/pkg/naming" "github.com/scylladb/scylla-operator/pkg/sidecar/config" "github.com/scylladb/scylla-operator/pkg/sidecar/identity" - "github.com/yanniszark/go-nodetool/nodetool" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -63,23 +63,22 @@ func newReconciler(mgr manager.Manager, logger log.Logger) reconcile.Reconciler } logger.Info(ctx, "Member loaded", "member", member) - url, err := url.Parse(fmt.Sprintf("http://127.0.0.1:%d/%s/", naming.JolokiaPort, naming.JolokiaContext)) - if err != nil { - logger.Fatal(ctx, "Failed to parse url", "error", err) - } - client, err := client.New(mgr.GetConfig(), client.Options{}) if err != nil { logger.Fatal(ctx, "Error getting dynamic client", "error", err) } - + l := logger.Named("member_controller") + scyllaClient, err := scyllaclient.NewClient(scyllaclient.DefaultConfig(), l.Named("scylla_client")) + if err != nil { + logger.Fatal(ctx, "Error creating scylla client", "error", err) + } mc := &MemberController{ - Client: client, - kubeClient: kubeClient, - member: member, - scheme: mgr.GetScheme(), - nodetool: nodetool.NewFromURL(url), - logger: logger, + Client: client, + kubeClient: kubeClient, + member: member, + scheme: mgr.GetScheme(), + scyllaClient: scyllaClient, + logger: l, } if err = mc.onStartup(ctx); err != nil { @@ -147,11 +146,11 @@ var _ reconcile.Reconciler = &MemberController{} // MemberController reconciles the sidecar type MemberController struct { client.Client - kubeClient kubernetes.Interface - member *identity.Member - nodetool *nodetool.Nodetool - scheme *runtime.Scheme - logger log.Logger + kubeClient kubernetes.Interface + member *identity.Member + scyllaClient *scyllaclient.Client + scheme *runtime.Scheme + logger log.Logger } // Reconcile observes the state of a Scylla Member diff --git a/pkg/sidecar/sync.go b/pkg/sidecar/sync.go index 9a69d6f35d7..0287cb0359d 100644 --- a/pkg/sidecar/sync.go +++ b/pkg/sidecar/sync.go @@ -3,26 +3,31 @@ package sidecar import ( "context" + "github.com/scylladb/scylla-operator/pkg/util/network" + "github.com/pkg/errors" "github.com/scylladb/scylla-operator/pkg/controller/cluster/util" "github.com/scylladb/scylla-operator/pkg/naming" - "github.com/yanniszark/go-nodetool/nodetool" corev1 "k8s.io/api/core/v1" ) func (mc *MemberController) sync(ctx context.Context, memberService *corev1.Service) error { // Check if member must decommission if decommission, ok := memberService.Labels[naming.DecommissionLabel]; ok { + host, err := network.FindFirstNonLocalIP() + if err != nil { + return errors.Wrapf(err, "error during decommission") + } // Check if member has already decommissioned if decommission == naming.LabelValueTrue { return nil } // Else, decommission member - if err := mc.nodetool.Decommission(); err != nil { + if err := mc.scyllaClient.Decommission(ctx, host.String()); err != nil { mc.logger.Error(ctx, "Error during decommission", "error", errors.WithStack(err)) } // Confirm memberService has been decommissioned - if opMode, err := mc.nodetool.OperationMode(); err != nil || opMode != nodetool.NodeOperationModeDecommissioned { + if opMode, err := mc.scyllaClient.OperationMode(ctx, host.String()); err != nil || !opMode.IsDecommisioned() { return errors.Wrapf(err, "error during decommission, operation mode: %s", opMode) } // Update Label to signal that decommission has completed diff --git a/pkg/util/httpx/clone.go b/pkg/util/httpx/clone.go new file mode 100644 index 00000000000..4f8a54588f7 --- /dev/null +++ b/pkg/util/httpx/clone.go @@ -0,0 +1,40 @@ +// Copyright (C) 2017 ScyllaDB + +package httpx + +import ( + "net/http" + "net/url" +) + +// CloneRequest creates a shallow copy of the request along with a deep copy +// of the Headers and URL. +func CloneRequest(req *http.Request) *http.Request { + r := new(http.Request) + + // Shallow clone + *r = *req + + // Copy ctx + r = r.WithContext(req.Context()) + + // Deep copy headers + r.Header = CloneHeader(req.Header) + + // Deep copy URL + r.URL = new(url.URL) + *r.URL = *req.URL + + return r +} + +// CloneHeader creates a deep copy of an http.Header. +func CloneHeader(in http.Header) http.Header { + out := make(http.Header, len(in)) + for key, values := range in { + newValues := make([]string, len(values)) + copy(newValues, values) + out[key] = newValues + } + return out +} diff --git a/pkg/util/httpx/rt.go b/pkg/util/httpx/rt.go new file mode 100644 index 00000000000..1cd0aaf06ab --- /dev/null +++ b/pkg/util/httpx/rt.go @@ -0,0 +1,15 @@ +// Copyright (C) 2017 ScyllaDB + +package httpx + +import "net/http" + +// The RoundTripperFunc type is an adapter to allow the use of ordinary +// functions as RoundTrippers. If f is a function with the appropriate +// signature, RountTripperFunc(f) is a RoundTripper that calls f. +type RoundTripperFunc func(req *http.Request) (*http.Response, error) + +// RoundTrip implements the RoundTripper interface. +func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { + return rt(r) +} diff --git a/pkg/util/network/network.go b/pkg/util/network/network.go new file mode 100644 index 00000000000..daaea7d266d --- /dev/null +++ b/pkg/util/network/network.go @@ -0,0 +1,22 @@ +package network + +import ( + "net" + + "github.com/pkg/errors" +) + +func FindFirstNonLocalIP() (net.IP, error) { + addrs, err := net.InterfaceAddrs() + if err != nil { + return nil, errors.Wrap(err, "unable to discover interfaces") + } + for _, a := range addrs { + if ipnet, ok := a.(*net.IPNet); ok && !ipnet.IP.IsLoopback() { + if ipnet.IP.To4() != nil { + return ipnet.IP.To4(), nil + } + } + } + return nil, errors.New("no local ip found") +} diff --git a/pkg/util/retry/backoff.go b/pkg/util/retry/backoff.go new file mode 100644 index 00000000000..32360a2f00b --- /dev/null +++ b/pkg/util/retry/backoff.go @@ -0,0 +1,55 @@ +// Copyright (C) 2017 ScyllaDB + +package retry + +import ( + "time" + + "github.com/cenkalti/backoff" +) + +// Backoff specifies a policy for how long to wait between retries. +// It is called after a failing request, to determine the amount of time +// that should pass before trying again. +type Backoff = backoff.BackOff + +// Stop indicates that no more retries should be made. +const Stop time.Duration = -1 + +// NewExponentialBackoff returns Backoff implementation that increases each +// wait period exponentially. +// Multiplier controls how fast each wait period grows, and randomizationFactor +// allows to inject some jitter between periods. +func NewExponentialBackoff(initialInterval, maxElapsedTime, maxInterval time.Duration, multiplier, randomizationFactor float64) Backoff { + b := backoff.NewExponentialBackOff() + b.InitialInterval = initialInterval + b.MaxElapsedTime = maxElapsedTime + b.MaxInterval = maxInterval + + b.Multiplier = multiplier + b.RandomizationFactor = randomizationFactor + b.Reset() + return b +} + +// WithMaxRetries allows to set maximum number of retries for given backoff strategy. +func WithMaxRetries(b Backoff, maxRetries uint64) Backoff { + return backoff.WithMaxRetries(b, maxRetries) +} + +// BackoffFunc type is an adapter to allow the use of ordinary +// functions as Backoff. +type BackoffFunc func() time.Duration + +// NextBackOff returns the duration to wait before retrying the operation. +func (b BackoffFunc) NextBackOff() time.Duration { + return b() +} + +// Reset to initial state. +func (b BackoffFunc) Reset() {} + +// Clone returns a copy of BackoffFunc. +func (b BackoffFunc) Clone() Backoff { + return b +} diff --git a/pkg/util/retry/retry.go b/pkg/util/retry/retry.go new file mode 100644 index 00000000000..dc4e44481e0 --- /dev/null +++ b/pkg/util/retry/retry.go @@ -0,0 +1,29 @@ +// Copyright (C) 2017 ScyllaDB + +package retry + +import ( + "context" + + "github.com/cenkalti/backoff" +) + +// An Operation is executing by WithNotify(). +// The operation will be retried using a backoff policy if it returns an error. +type Operation = backoff.Operation + +// Notify is a notify-on-error function. It receives an operation error and +// backoff delay if the operation failed (with an error). +type Notify = backoff.Notify + +// WithNotify calls notify function with the error and wait duration +// for each failed attempt before sleep. +func WithNotify(ctx context.Context, op Operation, b Backoff, n Notify) error { + return backoff.RetryNotify(op, backoff.WithContext(b, ctx), n) +} + +// Permanent wraps the given err in a *backoff.PermanentError. +// This error interrupts further retries and causes retrying mechanism. +func Permanent(err error) *backoff.PermanentError { + return backoff.Permanent(err) +} diff --git a/pkg/util/timeutc/timeutc.go b/pkg/util/timeutc/timeutc.go new file mode 100644 index 00000000000..15033549883 --- /dev/null +++ b/pkg/util/timeutc/timeutc.go @@ -0,0 +1,37 @@ +// Copyright (C) 2017 ScyllaDB + +package timeutc + +import "time" + +// Now returns current time in UTC. +func Now() time.Time { + return time.Now().UTC() +} + +// Parse calls time.Parse and returns value in UTC. +func Parse(layout, value string) (time.Time, error) { + t, err := time.Parse(layout, value) + return t.UTC(), err +} + +// Since returns the time elapsed since t. +func Since(t time.Time) time.Duration { + return Now().Sub(t.UTC()) +} + +// TodayMidnight returns local midnight time in UTC. +func TodayMidnight() time.Time { + t := time.Now().AddDate(0, 0, 1) + return time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local).UTC() +} + +// MustParse call time.Parse and returns value in UTC. +// It panics on time.Parse error. +func MustParse(layout, value string) time.Time { + t, err := Parse(layout, value) + if err != nil { + panic(err) + } + return t +} diff --git a/pkg/util/timeutc/timeutc_test.go b/pkg/util/timeutc/timeutc_test.go new file mode 100644 index 00000000000..26790624769 --- /dev/null +++ b/pkg/util/timeutc/timeutc_test.go @@ -0,0 +1,24 @@ +// Copyright (C) 2017 ScyllaDB + +package timeutc + +import ( + "testing" + "time" +) + +func TestTodayMidnight(t *testing.T) { + l := TodayMidnight().In(time.Local) + if l.Hour() != 0 { + t.Error("invalid hour", l) + } + if l.Minute() != 0 { + t.Error("invalid minute", l) + } + if l.Second() != 0 { + t.Error("invalid second", l) + } + if l.Nanosecond() != 0 { + t.Error("invalid sub second", l) + } +} diff --git a/timeutc/timeutc.go b/timeutc/timeutc.go new file mode 100644 index 00000000000..15033549883 --- /dev/null +++ b/timeutc/timeutc.go @@ -0,0 +1,37 @@ +// Copyright (C) 2017 ScyllaDB + +package timeutc + +import "time" + +// Now returns current time in UTC. +func Now() time.Time { + return time.Now().UTC() +} + +// Parse calls time.Parse and returns value in UTC. +func Parse(layout, value string) (time.Time, error) { + t, err := time.Parse(layout, value) + return t.UTC(), err +} + +// Since returns the time elapsed since t. +func Since(t time.Time) time.Duration { + return Now().Sub(t.UTC()) +} + +// TodayMidnight returns local midnight time in UTC. +func TodayMidnight() time.Time { + t := time.Now().AddDate(0, 0, 1) + return time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.Local).UTC() +} + +// MustParse call time.Parse and returns value in UTC. +// It panics on time.Parse error. +func MustParse(layout, value string) time.Time { + t, err := Parse(layout, value) + if err != nil { + panic(err) + } + return t +} diff --git a/timeutc/timeutc_test.go b/timeutc/timeutc_test.go new file mode 100644 index 00000000000..26790624769 --- /dev/null +++ b/timeutc/timeutc_test.go @@ -0,0 +1,24 @@ +// Copyright (C) 2017 ScyllaDB + +package timeutc + +import ( + "testing" + "time" +) + +func TestTodayMidnight(t *testing.T) { + l := TodayMidnight().In(time.Local) + if l.Hour() != 0 { + t.Error("invalid hour", l) + } + if l.Minute() != 0 { + t.Error("invalid minute", l) + } + if l.Second() != 0 { + t.Error("invalid second", l) + } + if l.Nanosecond() != 0 { + t.Error("invalid sub second", l) + } +} diff --git a/vendor/github.com/PuerkitoBio/purell/.gitignore b/vendor/github.com/PuerkitoBio/purell/.gitignore new file mode 100644 index 00000000000..748e4c8073c --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/.gitignore @@ -0,0 +1,5 @@ +*.sublime-* +.DS_Store +*.swp +*.swo +tags diff --git a/vendor/github.com/PuerkitoBio/purell/.travis.yml b/vendor/github.com/PuerkitoBio/purell/.travis.yml new file mode 100644 index 00000000000..cf31e6af6d5 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/.travis.yml @@ -0,0 +1,12 @@ +language: go + +go: + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - "1.10.x" + - "1.11.x" + - tip diff --git a/vendor/github.com/PuerkitoBio/purell/LICENSE b/vendor/github.com/PuerkitoBio/purell/LICENSE new file mode 100644 index 00000000000..4b9986dea71 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2012, Martin Angers +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/PuerkitoBio/purell/README.md b/vendor/github.com/PuerkitoBio/purell/README.md new file mode 100644 index 00000000000..07de0c49866 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/README.md @@ -0,0 +1,188 @@ +# Purell + +Purell is a tiny Go library to normalize URLs. It returns a pure URL. Pure-ell. Sanitizer and all. Yeah, I know... + +Based on the [wikipedia paper][wiki] and the [RFC 3986 document][rfc]. + +[![build status](https://travis-ci.org/PuerkitoBio/purell.svg?branch=master)](http://travis-ci.org/PuerkitoBio/purell) + +## Install + +`go get github.com/PuerkitoBio/purell` + +## Changelog + +* **v1.1.1** : Fix failing test due to Go1.12 changes (thanks to @ianlancetaylor). +* **2016-11-14 (v1.1.0)** : IDN: Conform to RFC 5895: Fold character width (thanks to @beeker1121). +* **2016-07-27 (v1.0.0)** : Normalize IDN to ASCII (thanks to @zenovich). +* **2015-02-08** : Add fix for relative paths issue ([PR #5][pr5]) and add fix for unnecessary encoding of reserved characters ([see issue #7][iss7]). +* **v0.2.0** : Add benchmarks, Attempt IDN support. +* **v0.1.0** : Initial release. + +## Examples + +From `example_test.go` (note that in your code, you would import "github.com/PuerkitoBio/purell", and would prefix references to its methods and constants with "purell."): + +```go +package purell + +import ( + "fmt" + "net/url" +) + +func ExampleNormalizeURLString() { + if normalized, err := NormalizeURLString("hTTp://someWEBsite.com:80/Amazing%3f/url/", + FlagLowercaseScheme|FlagLowercaseHost|FlagUppercaseEscapes); err != nil { + panic(err) + } else { + fmt.Print(normalized) + } + // Output: http://somewebsite.com:80/Amazing%3F/url/ +} + +func ExampleMustNormalizeURLString() { + normalized := MustNormalizeURLString("hTTpS://someWEBsite.com:443/Amazing%fa/url/", + FlagsUnsafeGreedy) + fmt.Print(normalized) + + // Output: http://somewebsite.com/Amazing%FA/url +} + +func ExampleNormalizeURL() { + if u, err := url.Parse("Http://SomeUrl.com:8080/a/b/.././c///g?c=3&a=1&b=9&c=0#target"); err != nil { + panic(err) + } else { + normalized := NormalizeURL(u, FlagsUsuallySafeGreedy|FlagRemoveDuplicateSlashes|FlagRemoveFragment) + fmt.Print(normalized) + } + + // Output: http://someurl.com:8080/a/c/g?c=3&a=1&b=9&c=0 +} +``` + +## API + +As seen in the examples above, purell offers three methods, `NormalizeURLString(string, NormalizationFlags) (string, error)`, `MustNormalizeURLString(string, NormalizationFlags) (string)` and `NormalizeURL(*url.URL, NormalizationFlags) (string)`. They all normalize the provided URL based on the specified flags. Here are the available flags: + +```go +const ( + // Safe normalizations + FlagLowercaseScheme NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1 + FlagLowercaseHost // http://HOST -> http://host + FlagUppercaseEscapes // http://host/t%ef -> http://host/t%EF + FlagDecodeUnnecessaryEscapes // http://host/t%41 -> http://host/tA + FlagEncodeNecessaryEscapes // http://host/!"#$ -> http://host/%21%22#$ + FlagRemoveDefaultPort // http://host:80 -> http://host + FlagRemoveEmptyQuerySeparator // http://host/path? -> http://host/path + + // Usually safe normalizations + FlagRemoveTrailingSlash // http://host/path/ -> http://host/path + FlagAddTrailingSlash // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags) + FlagRemoveDotSegments // http://host/path/./a/b/../c -> http://host/path/a/c + + // Unsafe normalizations + FlagRemoveDirectoryIndex // http://host/path/index.html -> http://host/path/ + FlagRemoveFragment // http://host/path#fragment -> http://host/path + FlagForceHTTP // https://host -> http://host + FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b + FlagRemoveWWW // http://www.host/ -> http://host/ + FlagAddWWW // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags) + FlagSortQuery // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3 + + // Normalizations not in the wikipedia article, required to cover tests cases + // submitted by jehiah + FlagDecodeDWORDHost // http://1113982867 -> http://66.102.7.147 + FlagDecodeOctalHost // http://0102.0146.07.0223 -> http://66.102.7.147 + FlagDecodeHexHost // http://0x42660793 -> http://66.102.7.147 + FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path + FlagRemoveEmptyPortSeparator // http://host:/path -> http://host/path + + // Convenience set of safe normalizations + FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator + + // For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags, + // while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix". + + // Convenience set of usually safe normalizations (includes FlagsSafe) + FlagsUsuallySafeGreedy NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments + FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments + + // Convenience set of unsafe normalizations (includes FlagsUsuallySafe) + FlagsUnsafeGreedy NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery + FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery + + // Convenience set of all available flags + FlagsAllGreedy = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator + FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator +) +``` + +For convenience, the set of flags `FlagsSafe`, `FlagsUsuallySafe[Greedy|NonGreedy]`, `FlagsUnsafe[Greedy|NonGreedy]` and `FlagsAll[Greedy|NonGreedy]` are provided for the similarly grouped normalizations on [wikipedia's URL normalization page][wiki]. You can add (using the bitwise OR `|` operator) or remove (using the bitwise AND NOT `&^` operator) individual flags from the sets if required, to build your own custom set. + +The [full godoc reference is available on gopkgdoc][godoc]. + +Some things to note: + +* `FlagDecodeUnnecessaryEscapes`, `FlagEncodeNecessaryEscapes`, `FlagUppercaseEscapes` and `FlagRemoveEmptyQuerySeparator` are always implicitly set, because internally, the URL string is parsed as an URL object, which automatically decodes unnecessary escapes, uppercases and encodes necessary ones, and removes empty query separators (an unnecessary `?` at the end of the url). So this operation cannot **not** be done. For this reason, `FlagRemoveEmptyQuerySeparator` (as well as the other three) has been included in the `FlagsSafe` convenience set, instead of `FlagsUnsafe`, where Wikipedia puts it. + +* The `FlagDecodeUnnecessaryEscapes` decodes the following escapes (*from -> to*): + - %24 -> $ + - %26 -> & + - %2B-%3B -> +,-./0123456789:; + - %3D -> = + - %40-%5A -> @ABCDEFGHIJKLMNOPQRSTUVWXYZ + - %5F -> _ + - %61-%7A -> abcdefghijklmnopqrstuvwxyz + - %7E -> ~ + + +* When the `NormalizeURL` function is used (passing an URL object), this source URL object is modified (that is, after the call, the URL object will be modified to reflect the normalization). + +* The *replace IP with domain name* normalization (`http://208.77.188.166/ → http://www.example.com/`) is obviously not possible for a library without making some network requests. This is not implemented in purell. + +* The *remove unused query string parameters* and *remove default query parameters* are also not implemented, since this is a very case-specific normalization, and it is quite trivial to do with an URL object. + +### Safe vs Usually Safe vs Unsafe + +Purell allows you to control the level of risk you take while normalizing an URL. You can aggressively normalize, play it totally safe, or anything in between. + +Consider the following URL: + +`HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid` + +Normalizing with the `FlagsSafe` gives: + +`https://www.root.com/toto/tE%1F///a/./b/../c/?z=3&w=2&a=4&w=1#invalid` + +With the `FlagsUsuallySafeGreedy`: + +`https://www.root.com/toto/tE%1F///a/c?z=3&w=2&a=4&w=1#invalid` + +And with `FlagsUnsafeGreedy`: + +`http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3` + +## TODOs + +* Add a class/default instance to allow specifying custom directory index names? At the moment, removing directory index removes `(^|/)((?:default|index)\.\w{1,4})$`. + +## Thanks / Contributions + +@rogpeppe +@jehiah +@opennota +@pchristopher1275 +@zenovich +@beeker1121 + +## License + +The [BSD 3-Clause license][bsd]. + +[bsd]: http://opensource.org/licenses/BSD-3-Clause +[wiki]: http://en.wikipedia.org/wiki/URL_normalization +[rfc]: http://tools.ietf.org/html/rfc3986#section-6 +[godoc]: http://go.pkgdoc.org/github.com/PuerkitoBio/purell +[pr5]: https://github.com/PuerkitoBio/purell/pull/5 +[iss7]: https://github.com/PuerkitoBio/purell/issues/7 diff --git a/vendor/github.com/PuerkitoBio/purell/purell.go b/vendor/github.com/PuerkitoBio/purell/purell.go new file mode 100644 index 00000000000..6d0fc190a18 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/purell/purell.go @@ -0,0 +1,379 @@ +/* +Package purell offers URL normalization as described on the wikipedia page: +http://en.wikipedia.org/wiki/URL_normalization +*/ +package purell + +import ( + "bytes" + "fmt" + "net/url" + "regexp" + "sort" + "strconv" + "strings" + + "github.com/PuerkitoBio/urlesc" + "golang.org/x/net/idna" + "golang.org/x/text/unicode/norm" + "golang.org/x/text/width" +) + +// A set of normalization flags determines how a URL will +// be normalized. +type NormalizationFlags uint + +const ( + // Safe normalizations + FlagLowercaseScheme NormalizationFlags = 1 << iota // HTTP://host -> http://host, applied by default in Go1.1 + FlagLowercaseHost // http://HOST -> http://host + FlagUppercaseEscapes // http://host/t%ef -> http://host/t%EF + FlagDecodeUnnecessaryEscapes // http://host/t%41 -> http://host/tA + FlagEncodeNecessaryEscapes // http://host/!"#$ -> http://host/%21%22#$ + FlagRemoveDefaultPort // http://host:80 -> http://host + FlagRemoveEmptyQuerySeparator // http://host/path? -> http://host/path + + // Usually safe normalizations + FlagRemoveTrailingSlash // http://host/path/ -> http://host/path + FlagAddTrailingSlash // http://host/path -> http://host/path/ (should choose only one of these add/remove trailing slash flags) + FlagRemoveDotSegments // http://host/path/./a/b/../c -> http://host/path/a/c + + // Unsafe normalizations + FlagRemoveDirectoryIndex // http://host/path/index.html -> http://host/path/ + FlagRemoveFragment // http://host/path#fragment -> http://host/path + FlagForceHTTP // https://host -> http://host + FlagRemoveDuplicateSlashes // http://host/path//a///b -> http://host/path/a/b + FlagRemoveWWW // http://www.host/ -> http://host/ + FlagAddWWW // http://host/ -> http://www.host/ (should choose only one of these add/remove WWW flags) + FlagSortQuery // http://host/path?c=3&b=2&a=1&b=1 -> http://host/path?a=1&b=1&b=2&c=3 + + // Normalizations not in the wikipedia article, required to cover tests cases + // submitted by jehiah + FlagDecodeDWORDHost // http://1113982867 -> http://66.102.7.147 + FlagDecodeOctalHost // http://0102.0146.07.0223 -> http://66.102.7.147 + FlagDecodeHexHost // http://0x42660793 -> http://66.102.7.147 + FlagRemoveUnnecessaryHostDots // http://.host../path -> http://host/path + FlagRemoveEmptyPortSeparator // http://host:/path -> http://host/path + + // Convenience set of safe normalizations + FlagsSafe NormalizationFlags = FlagLowercaseHost | FlagLowercaseScheme | FlagUppercaseEscapes | FlagDecodeUnnecessaryEscapes | FlagEncodeNecessaryEscapes | FlagRemoveDefaultPort | FlagRemoveEmptyQuerySeparator + + // For convenience sets, "greedy" uses the "remove trailing slash" and "remove www. prefix" flags, + // while "non-greedy" uses the "add (or keep) the trailing slash" and "add www. prefix". + + // Convenience set of usually safe normalizations (includes FlagsSafe) + FlagsUsuallySafeGreedy NormalizationFlags = FlagsSafe | FlagRemoveTrailingSlash | FlagRemoveDotSegments + FlagsUsuallySafeNonGreedy NormalizationFlags = FlagsSafe | FlagAddTrailingSlash | FlagRemoveDotSegments + + // Convenience set of unsafe normalizations (includes FlagsUsuallySafe) + FlagsUnsafeGreedy NormalizationFlags = FlagsUsuallySafeGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagRemoveWWW | FlagSortQuery + FlagsUnsafeNonGreedy NormalizationFlags = FlagsUsuallySafeNonGreedy | FlagRemoveDirectoryIndex | FlagRemoveFragment | FlagForceHTTP | FlagRemoveDuplicateSlashes | FlagAddWWW | FlagSortQuery + + // Convenience set of all available flags + FlagsAllGreedy = FlagsUnsafeGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator + FlagsAllNonGreedy = FlagsUnsafeNonGreedy | FlagDecodeDWORDHost | FlagDecodeOctalHost | FlagDecodeHexHost | FlagRemoveUnnecessaryHostDots | FlagRemoveEmptyPortSeparator +) + +const ( + defaultHttpPort = ":80" + defaultHttpsPort = ":443" +) + +// Regular expressions used by the normalizations +var rxPort = regexp.MustCompile(`(:\d+)/?$`) +var rxDirIndex = regexp.MustCompile(`(^|/)((?:default|index)\.\w{1,4})$`) +var rxDupSlashes = regexp.MustCompile(`/{2,}`) +var rxDWORDHost = regexp.MustCompile(`^(\d+)((?:\.+)?(?:\:\d*)?)$`) +var rxOctalHost = regexp.MustCompile(`^(0\d*)\.(0\d*)\.(0\d*)\.(0\d*)((?:\.+)?(?:\:\d*)?)$`) +var rxHexHost = regexp.MustCompile(`^0x([0-9A-Fa-f]+)((?:\.+)?(?:\:\d*)?)$`) +var rxHostDots = regexp.MustCompile(`^(.+?)(:\d+)?$`) +var rxEmptyPort = regexp.MustCompile(`:+$`) + +// Map of flags to implementation function. +// FlagDecodeUnnecessaryEscapes has no action, since it is done automatically +// by parsing the string as an URL. Same for FlagUppercaseEscapes and FlagRemoveEmptyQuerySeparator. + +// Since maps have undefined traversing order, make a slice of ordered keys +var flagsOrder = []NormalizationFlags{ + FlagLowercaseScheme, + FlagLowercaseHost, + FlagRemoveDefaultPort, + FlagRemoveDirectoryIndex, + FlagRemoveDotSegments, + FlagRemoveFragment, + FlagForceHTTP, // Must be after remove default port (because https=443/http=80) + FlagRemoveDuplicateSlashes, + FlagRemoveWWW, + FlagAddWWW, + FlagSortQuery, + FlagDecodeDWORDHost, + FlagDecodeOctalHost, + FlagDecodeHexHost, + FlagRemoveUnnecessaryHostDots, + FlagRemoveEmptyPortSeparator, + FlagRemoveTrailingSlash, // These two (add/remove trailing slash) must be last + FlagAddTrailingSlash, +} + +// ... and then the map, where order is unimportant +var flags = map[NormalizationFlags]func(*url.URL){ + FlagLowercaseScheme: lowercaseScheme, + FlagLowercaseHost: lowercaseHost, + FlagRemoveDefaultPort: removeDefaultPort, + FlagRemoveDirectoryIndex: removeDirectoryIndex, + FlagRemoveDotSegments: removeDotSegments, + FlagRemoveFragment: removeFragment, + FlagForceHTTP: forceHTTP, + FlagRemoveDuplicateSlashes: removeDuplicateSlashes, + FlagRemoveWWW: removeWWW, + FlagAddWWW: addWWW, + FlagSortQuery: sortQuery, + FlagDecodeDWORDHost: decodeDWORDHost, + FlagDecodeOctalHost: decodeOctalHost, + FlagDecodeHexHost: decodeHexHost, + FlagRemoveUnnecessaryHostDots: removeUnncessaryHostDots, + FlagRemoveEmptyPortSeparator: removeEmptyPortSeparator, + FlagRemoveTrailingSlash: removeTrailingSlash, + FlagAddTrailingSlash: addTrailingSlash, +} + +// MustNormalizeURLString returns the normalized string, and panics if an error occurs. +// It takes an URL string as input, as well as the normalization flags. +func MustNormalizeURLString(u string, f NormalizationFlags) string { + result, e := NormalizeURLString(u, f) + if e != nil { + panic(e) + } + return result +} + +// NormalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object. +// It takes an URL string as input, as well as the normalization flags. +func NormalizeURLString(u string, f NormalizationFlags) (string, error) { + parsed, err := url.Parse(u) + if err != nil { + return "", err + } + + if f&FlagLowercaseHost == FlagLowercaseHost { + parsed.Host = strings.ToLower(parsed.Host) + } + + // The idna package doesn't fully conform to RFC 5895 + // (https://tools.ietf.org/html/rfc5895), so we do it here. + // Taken from Go 1.8 cycle source, courtesy of bradfitz. + // TODO: Remove when (if?) idna package conforms to RFC 5895. + parsed.Host = width.Fold.String(parsed.Host) + parsed.Host = norm.NFC.String(parsed.Host) + if parsed.Host, err = idna.ToASCII(parsed.Host); err != nil { + return "", err + } + + return NormalizeURL(parsed, f), nil +} + +// NormalizeURL returns the normalized string. +// It takes a parsed URL object as input, as well as the normalization flags. +func NormalizeURL(u *url.URL, f NormalizationFlags) string { + for _, k := range flagsOrder { + if f&k == k { + flags[k](u) + } + } + return urlesc.Escape(u) +} + +func lowercaseScheme(u *url.URL) { + if len(u.Scheme) > 0 { + u.Scheme = strings.ToLower(u.Scheme) + } +} + +func lowercaseHost(u *url.URL) { + if len(u.Host) > 0 { + u.Host = strings.ToLower(u.Host) + } +} + +func removeDefaultPort(u *url.URL) { + if len(u.Host) > 0 { + scheme := strings.ToLower(u.Scheme) + u.Host = rxPort.ReplaceAllStringFunc(u.Host, func(val string) string { + if (scheme == "http" && val == defaultHttpPort) || (scheme == "https" && val == defaultHttpsPort) { + return "" + } + return val + }) + } +} + +func removeTrailingSlash(u *url.URL) { + if l := len(u.Path); l > 0 { + if strings.HasSuffix(u.Path, "/") { + u.Path = u.Path[:l-1] + } + } else if l = len(u.Host); l > 0 { + if strings.HasSuffix(u.Host, "/") { + u.Host = u.Host[:l-1] + } + } +} + +func addTrailingSlash(u *url.URL) { + if l := len(u.Path); l > 0 { + if !strings.HasSuffix(u.Path, "/") { + u.Path += "/" + } + } else if l = len(u.Host); l > 0 { + if !strings.HasSuffix(u.Host, "/") { + u.Host += "/" + } + } +} + +func removeDotSegments(u *url.URL) { + if len(u.Path) > 0 { + var dotFree []string + var lastIsDot bool + + sections := strings.Split(u.Path, "/") + for _, s := range sections { + if s == ".." { + if len(dotFree) > 0 { + dotFree = dotFree[:len(dotFree)-1] + } + } else if s != "." { + dotFree = append(dotFree, s) + } + lastIsDot = (s == "." || s == "..") + } + // Special case if host does not end with / and new path does not begin with / + u.Path = strings.Join(dotFree, "/") + if u.Host != "" && !strings.HasSuffix(u.Host, "/") && !strings.HasPrefix(u.Path, "/") { + u.Path = "/" + u.Path + } + // Special case if the last segment was a dot, make sure the path ends with a slash + if lastIsDot && !strings.HasSuffix(u.Path, "/") { + u.Path += "/" + } + } +} + +func removeDirectoryIndex(u *url.URL) { + if len(u.Path) > 0 { + u.Path = rxDirIndex.ReplaceAllString(u.Path, "$1") + } +} + +func removeFragment(u *url.URL) { + u.Fragment = "" +} + +func forceHTTP(u *url.URL) { + if strings.ToLower(u.Scheme) == "https" { + u.Scheme = "http" + } +} + +func removeDuplicateSlashes(u *url.URL) { + if len(u.Path) > 0 { + u.Path = rxDupSlashes.ReplaceAllString(u.Path, "/") + } +} + +func removeWWW(u *url.URL) { + if len(u.Host) > 0 && strings.HasPrefix(strings.ToLower(u.Host), "www.") { + u.Host = u.Host[4:] + } +} + +func addWWW(u *url.URL) { + if len(u.Host) > 0 && !strings.HasPrefix(strings.ToLower(u.Host), "www.") { + u.Host = "www." + u.Host + } +} + +func sortQuery(u *url.URL) { + q := u.Query() + + if len(q) > 0 { + arKeys := make([]string, len(q)) + i := 0 + for k := range q { + arKeys[i] = k + i++ + } + sort.Strings(arKeys) + buf := new(bytes.Buffer) + for _, k := range arKeys { + sort.Strings(q[k]) + for _, v := range q[k] { + if buf.Len() > 0 { + buf.WriteRune('&') + } + buf.WriteString(fmt.Sprintf("%s=%s", k, urlesc.QueryEscape(v))) + } + } + + // Rebuild the raw query string + u.RawQuery = buf.String() + } +} + +func decodeDWORDHost(u *url.URL) { + if len(u.Host) > 0 { + if matches := rxDWORDHost.FindStringSubmatch(u.Host); len(matches) > 2 { + var parts [4]int64 + + dword, _ := strconv.ParseInt(matches[1], 10, 0) + for i, shift := range []uint{24, 16, 8, 0} { + parts[i] = dword >> shift & 0xFF + } + u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[2]) + } + } +} + +func decodeOctalHost(u *url.URL) { + if len(u.Host) > 0 { + if matches := rxOctalHost.FindStringSubmatch(u.Host); len(matches) > 5 { + var parts [4]int64 + + for i := 1; i <= 4; i++ { + parts[i-1], _ = strconv.ParseInt(matches[i], 8, 0) + } + u.Host = fmt.Sprintf("%d.%d.%d.%d%s", parts[0], parts[1], parts[2], parts[3], matches[5]) + } + } +} + +func decodeHexHost(u *url.URL) { + if len(u.Host) > 0 { + if matches := rxHexHost.FindStringSubmatch(u.Host); len(matches) > 2 { + // Conversion is safe because of regex validation + parsed, _ := strconv.ParseInt(matches[1], 16, 0) + // Set host as DWORD (base 10) encoded host + u.Host = fmt.Sprintf("%d%s", parsed, matches[2]) + // The rest is the same as decoding a DWORD host + decodeDWORDHost(u) + } + } +} + +func removeUnncessaryHostDots(u *url.URL) { + if len(u.Host) > 0 { + if matches := rxHostDots.FindStringSubmatch(u.Host); len(matches) > 1 { + // Trim the leading and trailing dots + u.Host = strings.Trim(matches[1], ".") + if len(matches) > 2 { + u.Host += matches[2] + } + } + } +} + +func removeEmptyPortSeparator(u *url.URL) { + if len(u.Host) > 0 { + u.Host = rxEmptyPort.ReplaceAllString(u.Host, "") + } +} diff --git a/vendor/github.com/PuerkitoBio/urlesc/.travis.yml b/vendor/github.com/PuerkitoBio/urlesc/.travis.yml new file mode 100644 index 00000000000..ba6b225f91e --- /dev/null +++ b/vendor/github.com/PuerkitoBio/urlesc/.travis.yml @@ -0,0 +1,15 @@ +language: go + +go: + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - tip + +install: + - go build . + +script: + - go test -v diff --git a/vendor/github.com/PuerkitoBio/urlesc/LICENSE b/vendor/github.com/PuerkitoBio/urlesc/LICENSE new file mode 100644 index 00000000000..74487567632 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/urlesc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/PuerkitoBio/urlesc/README.md b/vendor/github.com/PuerkitoBio/urlesc/README.md new file mode 100644 index 00000000000..57aff0a5396 --- /dev/null +++ b/vendor/github.com/PuerkitoBio/urlesc/README.md @@ -0,0 +1,16 @@ +urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.svg?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) +====== + +Package urlesc implements query escaping as per RFC 3986. + +It contains some parts of the net/url package, modified so as to allow +some reserved characters incorrectly escaped by net/url (see [issue 5684](https://github.com/golang/go/issues/5684)). + +## Install + + go get github.com/PuerkitoBio/urlesc + +## License + +Go license (BSD-3-Clause) + diff --git a/vendor/github.com/PuerkitoBio/urlesc/urlesc.go b/vendor/github.com/PuerkitoBio/urlesc/urlesc.go new file mode 100644 index 00000000000..1b84624594d --- /dev/null +++ b/vendor/github.com/PuerkitoBio/urlesc/urlesc.go @@ -0,0 +1,180 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package urlesc implements query escaping as per RFC 3986. +// It contains some parts of the net/url package, modified so as to allow +// some reserved characters incorrectly escaped by net/url. +// See https://github.com/golang/go/issues/5684 +package urlesc + +import ( + "bytes" + "net/url" + "strings" +) + +type encoding int + +const ( + encodePath encoding = 1 + iota + encodeUserPassword + encodeQueryComponent + encodeFragment +) + +// Return true if the specified character should be escaped when +// appearing in a URL string, according to RFC 3986. +func shouldEscape(c byte, mode encoding) bool { + // §2.3 Unreserved characters (alphanum) + if 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || '0' <= c && c <= '9' { + return false + } + + switch c { + case '-', '.', '_', '~': // §2.3 Unreserved characters (mark) + return false + + // §2.2 Reserved characters (reserved) + case ':', '/', '?', '#', '[', ']', '@', // gen-delims + '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=': // sub-delims + // Different sections of the URL allow a few of + // the reserved characters to appear unescaped. + switch mode { + case encodePath: // §3.3 + // The RFC allows sub-delims and : @. + // '/', '[' and ']' can be used to assign meaning to individual path + // segments. This package only manipulates the path as a whole, + // so we allow those as well. That leaves only ? and # to escape. + return c == '?' || c == '#' + + case encodeUserPassword: // §3.2.1 + // The RFC allows : and sub-delims in + // userinfo. The parsing of userinfo treats ':' as special so we must escape + // all the gen-delims. + return c == ':' || c == '/' || c == '?' || c == '#' || c == '[' || c == ']' || c == '@' + + case encodeQueryComponent: // §3.4 + // The RFC allows / and ?. + return c != '/' && c != '?' + + case encodeFragment: // §4.1 + // The RFC text is silent but the grammar allows + // everything, so escape nothing but # + return c == '#' + } + } + + // Everything else must be escaped. + return true +} + +// QueryEscape escapes the string so it can be safely placed +// inside a URL query. +func QueryEscape(s string) string { + return escape(s, encodeQueryComponent) +} + +func escape(s string, mode encoding) string { + spaceCount, hexCount := 0, 0 + for i := 0; i < len(s); i++ { + c := s[i] + if shouldEscape(c, mode) { + if c == ' ' && mode == encodeQueryComponent { + spaceCount++ + } else { + hexCount++ + } + } + } + + if spaceCount == 0 && hexCount == 0 { + return s + } + + t := make([]byte, len(s)+2*hexCount) + j := 0 + for i := 0; i < len(s); i++ { + switch c := s[i]; { + case c == ' ' && mode == encodeQueryComponent: + t[j] = '+' + j++ + case shouldEscape(c, mode): + t[j] = '%' + t[j+1] = "0123456789ABCDEF"[c>>4] + t[j+2] = "0123456789ABCDEF"[c&15] + j += 3 + default: + t[j] = s[i] + j++ + } + } + return string(t) +} + +var uiReplacer = strings.NewReplacer( + "%21", "!", + "%27", "'", + "%28", "(", + "%29", ")", + "%2A", "*", +) + +// unescapeUserinfo unescapes some characters that need not to be escaped as per RFC3986. +func unescapeUserinfo(s string) string { + return uiReplacer.Replace(s) +} + +// Escape reassembles the URL into a valid URL string. +// The general form of the result is one of: +// +// scheme:opaque +// scheme://userinfo@host/path?query#fragment +// +// If u.Opaque is non-empty, String uses the first form; +// otherwise it uses the second form. +// +// In the second form, the following rules apply: +// - if u.Scheme is empty, scheme: is omitted. +// - if u.User is nil, userinfo@ is omitted. +// - if u.Host is empty, host/ is omitted. +// - if u.Scheme and u.Host are empty and u.User is nil, +// the entire scheme://userinfo@host/ is omitted. +// - if u.Host is non-empty and u.Path begins with a /, +// the form host/path does not add its own /. +// - if u.RawQuery is empty, ?query is omitted. +// - if u.Fragment is empty, #fragment is omitted. +func Escape(u *url.URL) string { + var buf bytes.Buffer + if u.Scheme != "" { + buf.WriteString(u.Scheme) + buf.WriteByte(':') + } + if u.Opaque != "" { + buf.WriteString(u.Opaque) + } else { + if u.Scheme != "" || u.Host != "" || u.User != nil { + buf.WriteString("//") + if ui := u.User; ui != nil { + buf.WriteString(unescapeUserinfo(ui.String())) + buf.WriteByte('@') + } + if h := u.Host; h != "" { + buf.WriteString(h) + } + } + if u.Path != "" && u.Path[0] != '/' && u.Host != "" { + buf.WriteByte('/') + } + buf.WriteString(escape(u.Path, encodePath)) + } + if u.RawQuery != "" { + buf.WriteByte('?') + buf.WriteString(u.RawQuery) + } + if u.Fragment != "" { + buf.WriteByte('#') + buf.WriteString(escape(u.Fragment, encodeFragment)) + } + return buf.String() +} diff --git a/vendor/github.com/asaskevich/govalidator/.gitignore b/vendor/github.com/asaskevich/govalidator/.gitignore new file mode 100644 index 00000000000..8d69a9418aa --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/.gitignore @@ -0,0 +1,15 @@ +bin/ +.idea/ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + diff --git a/vendor/github.com/asaskevich/govalidator/.travis.yml b/vendor/github.com/asaskevich/govalidator/.travis.yml new file mode 100644 index 00000000000..17c4d0a7107 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/.travis.yml @@ -0,0 +1,18 @@ +dist: bionic +language: go +env: GO111MODULE=on GOFLAGS='-mod vendor' +install: true +email: false + +go: + - 1.10 + - 1.11 + - 1.12 + - 1.13 + - tip + +before_script: + - go install github.com/golangci/golangci-lint/cmd/golangci-lint +script: + - golangci-lint run # run a bunch of code checkers/linters in parallel + - go test -v -race ./... # Run all the tests with the race detector enabled diff --git a/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md new file mode 100644 index 00000000000..7ed268a1edd --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/CONTRIBUTING.md @@ -0,0 +1,63 @@ +#### Support +If you do have a contribution to the package, feel free to create a Pull Request or an Issue. + +#### What to contribute +If you don't know what to do, there are some features and functions that need to be done + +- [ ] Refactor code +- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check +- [ ] Create actual list of contributors and projects that currently using this package +- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) +- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) +- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new +- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [ ] Implement fuzzing testing +- [ ] Implement some struct/map/array utilities +- [ ] Implement map/array validation +- [ ] Implement benchmarking +- [ ] Implement batch of examples +- [ ] Look at forks for new features and fixes + +#### Advice +Feel free to create what you want, but keep in mind when you implement new features: +- Code must be clear and readable, names of variables/constants clearly describes what they are doing +- Public functions must be documented and described in source file and added to README.md to the list of available functions +- There are must be unit-tests for any new functions and improvements + +## Financial contributions + +We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/govalidator). +Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. + + +## Credits + + +### Contributors + +Thank you to all the people who have already contributed to govalidator! + + + +### Backers + +Thank you to all our backers! [[Become a backer](https://opencollective.com/govalidator#backer)] + + + + +### Sponsors + +Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/govalidator#sponsor)) + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/LICENSE b/vendor/github.com/asaskevich/govalidator/LICENSE new file mode 100644 index 00000000000..2f9a31fadf6 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Alex Saskevich + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/README.md b/vendor/github.com/asaskevich/govalidator/README.md new file mode 100644 index 00000000000..bfe6e35b182 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/README.md @@ -0,0 +1,605 @@ +govalidator +=========== +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/asaskevich/govalidator?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![GoDoc](https://godoc.org/github.com/asaskevich/govalidator?status.png)](https://godoc.org/github.com/asaskevich/govalidator) [![Coverage Status](https://img.shields.io/coveralls/asaskevich/govalidator.svg)](https://coveralls.io/r/asaskevich/govalidator?branch=master) [![wercker status](https://app.wercker.com/status/1ec990b09ea86c910d5f08b0e02c6043/s "wercker status")](https://app.wercker.com/project/bykey/1ec990b09ea86c910d5f08b0e02c6043) +[![Build Status](https://travis-ci.org/asaskevich/govalidator.svg?branch=master)](https://travis-ci.org/asaskevich/govalidator) [![Go Report Card](https://goreportcard.com/badge/github.com/asaskevich/govalidator)](https://goreportcard.com/report/github.com/asaskevich/govalidator) [![GoSearch](http://go-search.org/badge?id=github.com%2Fasaskevich%2Fgovalidator)](http://go-search.org/view?id=github.com%2Fasaskevich%2Fgovalidator) [![Backers on Open Collective](https://opencollective.com/govalidator/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/govalidator/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_shield) + +A package of validators and sanitizers for strings, structs and collections. Based on [validator.js](https://github.com/chriso/validator.js). + +#### Installation +Make sure that Go is installed on your computer. +Type the following command in your terminal: + + go get github.com/asaskevich/govalidator + +or you can get specified release of the package with `gopkg.in`: + + go get gopkg.in/asaskevich/govalidator.v10 + +After it the package is ready to use. + + +#### Import package in your project +Add following line in your `*.go` file: +```go +import "github.com/asaskevich/govalidator" +``` +If you are unhappy to use long `govalidator`, you can do something like this: +```go +import ( + valid "github.com/asaskevich/govalidator" +) +``` + +#### Activate behavior to require all fields have a validation tag by default +`SetFieldsRequiredByDefault` causes validation to fail when struct fields do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). A good place to activate this is a package init function or the main() function. + +`SetNilPtrAllowedByRequired` causes validation to pass when struct fields marked by `required` are set to nil. This is disabled by default for consistency, but some packages that need to be able to determine between `nil` and `zero value` state can use this. If disabled, both `nil` and `zero` values cause validation errors. + +```go +import "github.com/asaskevich/govalidator" + +func init() { + govalidator.SetFieldsRequiredByDefault(true) +} +``` + +Here's some code to explain it: +```go +// this struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): +type exampleStruct struct { + Name string `` + Email string `valid:"email"` +} + +// this, however, will only fail when Email is empty or an invalid email address: +type exampleStruct2 struct { + Name string `valid:"-"` + Email string `valid:"email"` +} + +// lastly, this will only fail when Email is an invalid email address but not when it's empty: +type exampleStruct2 struct { + Name string `valid:"-"` + Email string `valid:"email,optional"` +} +``` + +#### Recent breaking changes (see [#123](https://github.com/asaskevich/govalidator/pull/123)) +##### Custom validator function signature +A context was added as the second parameter, for structs this is the object being validated – this makes dependent validation possible. +```go +import "github.com/asaskevich/govalidator" + +// old signature +func(i interface{}) bool + +// new signature +func(i interface{}, o interface{}) bool +``` + +##### Adding a custom validator +This was changed to prevent data races when accessing custom validators. +```go +import "github.com/asaskevich/govalidator" + +// before +govalidator.CustomTypeTagMap["customByteArrayValidator"] = CustomTypeValidator(func(i interface{}, o interface{}) bool { + // ... +}) + +// after +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, o interface{}) bool { + // ... +})) +``` + +#### List of functions: +```go +func Abs(value float64) float64 +func BlackList(str, chars string) string +func ByteLength(str string, params ...string) bool +func CamelCaseToUnderscore(str string) string +func Contains(str, substring string) bool +func Count(array []interface{}, iterator ConditionIterator) int +func Each(array []interface{}, iterator Iterator) +func ErrorByField(e error, field string) string +func ErrorsByField(e error) map[string]string +func Filter(array []interface{}, iterator ConditionIterator) []interface{} +func Find(array []interface{}, iterator ConditionIterator) interface{} +func GetLine(s string, index int) (string, error) +func GetLines(s string) []string +func HasLowerCase(str string) bool +func HasUpperCase(str string) bool +func HasWhitespace(str string) bool +func HasWhitespaceOnly(str string) bool +func InRange(value interface{}, left interface{}, right interface{}) bool +func InRangeFloat32(value, left, right float32) bool +func InRangeFloat64(value, left, right float64) bool +func InRangeInt(value, left, right interface{}) bool +func IsASCII(str string) bool +func IsAlpha(str string) bool +func IsAlphanumeric(str string) bool +func IsBase64(str string) bool +func IsByteLength(str string, min, max int) bool +func IsCIDR(str string) bool +func IsCRC32(str string) bool +func IsCRC32b(str string) bool +func IsCreditCard(str string) bool +func IsDNSName(str string) bool +func IsDataURI(str string) bool +func IsDialString(str string) bool +func IsDivisibleBy(str, num string) bool +func IsEmail(str string) bool +func IsExistingEmail(email string) bool +func IsFilePath(str string) (bool, int) +func IsFloat(str string) bool +func IsFullWidth(str string) bool +func IsHalfWidth(str string) bool +func IsHash(str string, algorithm string) bool +func IsHexadecimal(str string) bool +func IsHexcolor(str string) bool +func IsHost(str string) bool +func IsIP(str string) bool +func IsIPv4(str string) bool +func IsIPv6(str string) bool +func IsISBN(str string, version int) bool +func IsISBN10(str string) bool +func IsISBN13(str string) bool +func IsISO3166Alpha2(str string) bool +func IsISO3166Alpha3(str string) bool +func IsISO4217(str string) bool +func IsISO693Alpha2(str string) bool +func IsISO693Alpha3b(str string) bool +func IsIn(str string, params ...string) bool +func IsInRaw(str string, params ...string) bool +func IsInt(str string) bool +func IsJSON(str string) bool +func IsLatitude(str string) bool +func IsLongitude(str string) bool +func IsLowerCase(str string) bool +func IsMAC(str string) bool +func IsMD4(str string) bool +func IsMD5(str string) bool +func IsMagnetURI(str string) bool +func IsMongoID(str string) bool +func IsMultibyte(str string) bool +func IsNatural(value float64) bool +func IsNegative(value float64) bool +func IsNonNegative(value float64) bool +func IsNonPositive(value float64) bool +func IsNotNull(str string) bool +func IsNull(str string) bool +func IsNumeric(str string) bool +func IsPort(str string) bool +func IsPositive(value float64) bool +func IsPrintableASCII(str string) bool +func IsRFC3339(str string) bool +func IsRFC3339WithoutZone(str string) bool +func IsRGBcolor(str string) bool +func IsRequestURI(rawurl string) bool +func IsRequestURL(rawurl string) bool +func IsRipeMD128(str string) bool +func IsRipeMD160(str string) bool +func IsRsaPub(str string, params ...string) bool +func IsRsaPublicKey(str string, keylen int) bool +func IsSHA1(str string) bool +func IsSHA256(str string) bool +func IsSHA384(str string) bool +func IsSHA512(str string) bool +func IsSSN(str string) bool +func IsSemver(str string) bool +func IsTiger128(str string) bool +func IsTiger160(str string) bool +func IsTiger192(str string) bool +func IsTime(str string, format string) bool +func IsType(v interface{}, params ...string) bool +func IsURL(str string) bool +func IsUTFDigit(str string) bool +func IsUTFLetter(str string) bool +func IsUTFLetterNumeric(str string) bool +func IsUTFNumeric(str string) bool +func IsUUID(str string) bool +func IsUUIDv3(str string) bool +func IsUUIDv4(str string) bool +func IsUUIDv5(str string) bool +func IsUnixTime(str string) bool +func IsUpperCase(str string) bool +func IsVariableWidth(str string) bool +func IsWhole(value float64) bool +func LeftTrim(str, chars string) string +func Map(array []interface{}, iterator ResultIterator) []interface{} +func Matches(str, pattern string) bool +func MaxStringLength(str string, params ...string) bool +func MinStringLength(str string, params ...string) bool +func NormalizeEmail(str string) (string, error) +func PadBoth(str string, padStr string, padLen int) string +func PadLeft(str string, padStr string, padLen int) string +func PadRight(str string, padStr string, padLen int) string +func PrependPathToErrors(err error, path string) error +func Range(str string, params ...string) bool +func RemoveTags(s string) string +func ReplacePattern(str, pattern, replace string) string +func Reverse(s string) string +func RightTrim(str, chars string) string +func RuneLength(str string, params ...string) bool +func SafeFileName(str string) string +func SetFieldsRequiredByDefault(value bool) +func SetNilPtrAllowedByRequired(value bool) +func Sign(value float64) float64 +func StringLength(str string, params ...string) bool +func StringMatches(s string, params ...string) bool +func StripLow(str string, keepNewLines bool) string +func ToBoolean(str string) (bool, error) +func ToFloat(str string) (float64, error) +func ToInt(value interface{}) (res int64, err error) +func ToJSON(obj interface{}) (string, error) +func ToString(obj interface{}) string +func Trim(str, chars string) string +func Truncate(str string, length int, ending string) string +func TruncatingErrorf(str string, args ...interface{}) error +func UnderscoreToCamelCase(s string) string +func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) +func ValidateStruct(s interface{}) (bool, error) +func WhiteList(str, chars string) string +type ConditionIterator +type CustomTypeValidator +type Error +func (e Error) Error() string +type Errors +func (es Errors) Error() string +func (es Errors) Errors() []error +type ISO3166Entry +type ISO693Entry +type InterfaceParamValidator +type Iterator +type ParamValidator +type ResultIterator +type UnsupportedTypeError +func (e *UnsupportedTypeError) Error() string +type Validator +``` + +#### Examples +###### IsURL +```go +println(govalidator.IsURL(`http://user@pass:domain.com/path/page`)) +``` +###### IsType +```go +println(govalidator.IsType("Bob", "string")) +println(govalidator.IsType(1, "int")) +i := 1 +println(govalidator.IsType(&i, "*int")) +``` + +IsType can be used through the tag `type` which is essential for map validation: +```go +type User struct { + Name string `valid:"type(string)"` + Age int `valid:"type(int)"` + Meta interface{} `valid:"type(string)"` +} +result, err := govalidator.ValidateStruct(user{"Bob", 20, "meta"}) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` +###### ToString +```go +type User struct { + FirstName string + LastName string +} + +str := govalidator.ToString(&User{"John", "Juan"}) +println(str) +``` +###### Each, Map, Filter, Count for slices +Each iterates over the slice/array and calls Iterator for every item +```go +data := []interface{}{1, 2, 3, 4, 5} +var fn govalidator.Iterator = func(value interface{}, index int) { + println(value.(int)) +} +govalidator.Each(data, fn) +``` +```go +data := []interface{}{1, 2, 3, 4, 5} +var fn govalidator.ResultIterator = func(value interface{}, index int) interface{} { + return value.(int) * 3 +} +_ = govalidator.Map(data, fn) // result = []interface{}{1, 6, 9, 12, 15} +``` +```go +data := []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10} +var fn govalidator.ConditionIterator = func(value interface{}, index int) bool { + return value.(int)%2 == 0 +} +_ = govalidator.Filter(data, fn) // result = []interface{}{2, 4, 6, 8, 10} +_ = govalidator.Count(data, fn) // result = 5 +``` +###### ValidateStruct [#2](https://github.com/asaskevich/govalidator/pull/2) +If you want to validate structs, you can use tag `valid` for any field in your structure. All validators used with this field in one tag are separated by comma. If you want to skip validation, place `-` in your tag. If you need a validator that is not on the list below, you can add it like this: +```go +govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { + return str == "duck" +}) +``` +For completely custom validators (interface-based), see below. + +Here is a list of available validators for struct fields (validator - used function): +```go +"email": IsEmail, +"url": IsURL, +"dialstring": IsDialString, +"requrl": IsRequestURL, +"requri": IsRequestURI, +"alpha": IsAlpha, +"utfletter": IsUTFLetter, +"alphanum": IsAlphanumeric, +"utfletternum": IsUTFLetterNumeric, +"numeric": IsNumeric, +"utfnumeric": IsUTFNumeric, +"utfdigit": IsUTFDigit, +"hexadecimal": IsHexadecimal, +"hexcolor": IsHexcolor, +"rgbcolor": IsRGBcolor, +"lowercase": IsLowerCase, +"uppercase": IsUpperCase, +"int": IsInt, +"float": IsFloat, +"null": IsNull, +"uuid": IsUUID, +"uuidv3": IsUUIDv3, +"uuidv4": IsUUIDv4, +"uuidv5": IsUUIDv5, +"creditcard": IsCreditCard, +"isbn10": IsISBN10, +"isbn13": IsISBN13, +"json": IsJSON, +"multibyte": IsMultibyte, +"ascii": IsASCII, +"printableascii": IsPrintableASCII, +"fullwidth": IsFullWidth, +"halfwidth": IsHalfWidth, +"variablewidth": IsVariableWidth, +"base64": IsBase64, +"datauri": IsDataURI, +"ip": IsIP, +"port": IsPort, +"ipv4": IsIPv4, +"ipv6": IsIPv6, +"dns": IsDNSName, +"host": IsHost, +"mac": IsMAC, +"latitude": IsLatitude, +"longitude": IsLongitude, +"ssn": IsSSN, +"semver": IsSemver, +"rfc3339": IsRFC3339, +"rfc3339WithoutZone": IsRFC3339WithoutZone, +"ISO3166Alpha2": IsISO3166Alpha2, +"ISO3166Alpha3": IsISO3166Alpha3, +``` +Validators with parameters + +```go +"range(min|max)": Range, +"length(min|max)": ByteLength, +"runelength(min|max)": RuneLength, +"stringlength(min|max)": StringLength, +"matches(pattern)": StringMatches, +"in(string1|string2|...|stringN)": IsIn, +"rsapub(keylength)" : IsRsaPub, +``` +Validators with parameters for any type + +```go +"type(type)": IsType, +``` + +And here is small example of usage: +```go +type Post struct { + Title string `valid:"alphanum,required"` + Message string `valid:"duck,ascii"` + Message2 string `valid:"animal(dog)"` + AuthorIP string `valid:"ipv4"` + Date string `valid:"-"` +} +post := &Post{ + Title: "My Example Post", + Message: "duck", + Message2: "dog", + AuthorIP: "123.234.54.3", +} + +// Add your own struct validation tags +govalidator.TagMap["duck"] = govalidator.Validator(func(str string) bool { + return str == "duck" +}) + +// Add your own struct validation tags with parameter +govalidator.ParamTagMap["animal"] = govalidator.ParamValidator(func(str string, params ...string) bool { + species := params[0] + return str == species +}) +govalidator.ParamTagRegexMap["animal"] = regexp.MustCompile("^animal\\((\\w+)\\)$") + +result, err := govalidator.ValidateStruct(post) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` +###### ValidateMap [#2](https://github.com/asaskevich/govalidator/pull/338) +If you want to validate maps, you can use the map to be validated and a validation map that contain the same tags used in ValidateStruct, both maps have to be in the form `map[string]interface{}` + +So here is small example of usage: +```go +var mapTemplate = map[string]interface{}{ + "name":"required,alpha", + "family":"required,alpha", + "email":"required,email", + "cell-phone":"numeric", + "address":map[string]interface{}{ + "line1":"required,alphanum", + "line2":"alphanum", + "postal-code":"numeric", + }, +} + +var inputMap = map[string]interface{}{ + "name":"Bob", + "family":"Smith", + "email":"foo@bar.baz", + "address":map[string]interface{}{ + "line1":"", + "line2":"", + "postal-code":"", + }, +} + +result, err := govalidator.ValidateMap(mapTemplate, inputMap) +if err != nil { + println("error: " + err.Error()) +} +println(result) +``` + +###### WhiteList +```go +// Remove all characters from string ignoring characters between "a" and "z" +println(govalidator.WhiteList("a3a43a5a4a3a2a23a4a5a4a3a4", "a-z") == "aaaaaaaaaaaa") +``` + +###### Custom validation functions +Custom validation using your own domain specific validators is also available - here's an example of how to use it: +```go +import "github.com/asaskevich/govalidator" + +type CustomByteArray [6]byte // custom types are supported and can be validated + +type StructWithCustomByteArray struct { + ID CustomByteArray `valid:"customByteArrayValidator,customMinLengthValidator"` // multiple custom validators are possible as well and will be evaluated in sequence + Email string `valid:"email"` + CustomMinLength int `valid:"-"` +} + +govalidator.CustomTypeTagMap.Set("customByteArrayValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool { + switch v := context.(type) { // you can type switch on the context interface being validated + case StructWithCustomByteArray: + // you can check and validate against some other field in the context, + // return early or not validate against the context at all – your choice + case SomeOtherType: + // ... + default: + // expecting some other type? Throw/panic here or continue + } + + switch v := i.(type) { // type switch on the struct field being validated + case CustomByteArray: + for _, e := range v { // this validator checks that the byte array is not empty, i.e. not all zeroes + if e != 0 { + return true + } + } + } + return false +})) +govalidator.CustomTypeTagMap.Set("customMinLengthValidator", CustomTypeValidator(func(i interface{}, context interface{}) bool { + switch v := context.(type) { // this validates a field against the value in another field, i.e. dependent validation + case StructWithCustomByteArray: + return len(v.ID) >= v.CustomMinLength + } + return false +})) +``` + +###### Custom error messages +Custom error messages are supported via annotations by adding the `~` separator - here's an example of how to use it: +```go +type Ticket struct { + Id int64 `json:"id"` + FirstName string `json:"firstname" valid:"required~First name is blank"` +} +``` + +#### Notes +Documentation is available here: [godoc.org](https://godoc.org/github.com/asaskevich/govalidator). +Full information about code coverage is also available here: [govalidator on gocover.io](http://gocover.io/github.com/asaskevich/govalidator). + +#### Support +If you do have a contribution to the package, feel free to create a Pull Request or an Issue. + +#### What to contribute +If you don't know what to do, there are some features and functions that need to be done + +- [ ] Refactor code +- [ ] Edit docs and [README](https://github.com/asaskevich/govalidator/README.md): spellcheck, grammar and typo check +- [ ] Create actual list of contributors and projects that currently using this package +- [ ] Resolve [issues and bugs](https://github.com/asaskevich/govalidator/issues) +- [ ] Update actual [list of functions](https://github.com/asaskevich/govalidator#list-of-functions) +- [ ] Update [list of validators](https://github.com/asaskevich/govalidator#validatestruct-2) that available for `ValidateStruct` and add new +- [ ] Implement new validators: `IsFQDN`, `IsIMEI`, `IsPostalCode`, `IsISIN`, `IsISRC` etc +- [x] Implement [validation by maps](https://github.com/asaskevich/govalidator/issues/224) +- [ ] Implement fuzzing testing +- [ ] Implement some struct/map/array utilities +- [ ] Implement map/array validation +- [ ] Implement benchmarking +- [ ] Implement batch of examples +- [ ] Look at forks for new features and fixes + +#### Advice +Feel free to create what you want, but keep in mind when you implement new features: +- Code must be clear and readable, names of variables/constants clearly describes what they are doing +- Public functions must be documented and described in source file and added to README.md to the list of available functions +- There are must be unit-tests for any new functions and improvements + +## Credits +### Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + +#### Special thanks to [contributors](https://github.com/asaskevich/govalidator/graphs/contributors) +* [Daniel Lohse](https://github.com/annismckenzie) +* [Attila Oláh](https://github.com/attilaolah) +* [Daniel Korner](https://github.com/Dadie) +* [Steven Wilkin](https://github.com/stevenwilkin) +* [Deiwin Sarjas](https://github.com/deiwin) +* [Noah Shibley](https://github.com/slugmobile) +* [Nathan Davies](https://github.com/nathj07) +* [Matt Sanford](https://github.com/mzsanford) +* [Simon ccl1115](https://github.com/ccl1115) + + + + +### Backers + +Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/govalidator#backer)] + + + + +### Sponsors + +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/govalidator#sponsor)] + + + + + + + + + + + + + + + +## License +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fasaskevich%2Fgovalidator?ref=badge_large) \ No newline at end of file diff --git a/vendor/github.com/asaskevich/govalidator/arrays.go b/vendor/github.com/asaskevich/govalidator/arrays.go new file mode 100644 index 00000000000..5bace2654d3 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/arrays.go @@ -0,0 +1,58 @@ +package govalidator + +// Iterator is the function that accepts element of slice/array and its index +type Iterator func(interface{}, int) + +// ResultIterator is the function that accepts element of slice/array and its index and returns any result +type ResultIterator func(interface{}, int) interface{} + +// ConditionIterator is the function that accepts element of slice/array and its index and returns boolean +type ConditionIterator func(interface{}, int) bool + +// Each iterates over the slice and apply Iterator to every item +func Each(array []interface{}, iterator Iterator) { + for index, data := range array { + iterator(data, index) + } +} + +// Map iterates over the slice and apply ResultIterator to every item. Returns new slice as a result. +func Map(array []interface{}, iterator ResultIterator) []interface{} { + var result = make([]interface{}, len(array)) + for index, data := range array { + result[index] = iterator(data, index) + } + return result +} + +// Find iterates over the slice and apply ConditionIterator to every item. Returns first item that meet ConditionIterator or nil otherwise. +func Find(array []interface{}, iterator ConditionIterator) interface{} { + for index, data := range array { + if iterator(data, index) { + return data + } + } + return nil +} + +// Filter iterates over the slice and apply ConditionIterator to every item. Returns new slice. +func Filter(array []interface{}, iterator ConditionIterator) []interface{} { + var result = make([]interface{}, 0) + for index, data := range array { + if iterator(data, index) { + result = append(result, data) + } + } + return result +} + +// Count iterates over the slice and apply ConditionIterator to every item. Returns count of items that meets ConditionIterator. +func Count(array []interface{}, iterator ConditionIterator) int { + count := 0 + for index, data := range array { + if iterator(data, index) { + count = count + 1 + } + } + return count +} diff --git a/vendor/github.com/asaskevich/govalidator/converter.go b/vendor/github.com/asaskevich/govalidator/converter.go new file mode 100644 index 00000000000..cf1e5d569ba --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/converter.go @@ -0,0 +1,64 @@ +package govalidator + +import ( + "encoding/json" + "fmt" + "reflect" + "strconv" +) + +// ToString convert the input to a string. +func ToString(obj interface{}) string { + res := fmt.Sprintf("%v", obj) + return string(res) +} + +// ToJSON convert the input to a valid JSON string +func ToJSON(obj interface{}) (string, error) { + res, err := json.Marshal(obj) + if err != nil { + res = []byte("") + } + return string(res), err +} + +// ToFloat convert the input string to a float, or 0.0 if the input is not a float. +func ToFloat(str string) (float64, error) { + res, err := strconv.ParseFloat(str, 64) + if err != nil { + res = 0.0 + } + return res, err +} + +// ToInt convert the input string or any int type to an integer type 64, or 0 if the input is not an integer. +func ToInt(value interface{}) (res int64, err error) { + val := reflect.ValueOf(value) + + switch value.(type) { + case int, int8, int16, int32, int64: + res = val.Int() + case uint, uint8, uint16, uint32, uint64: + res = int64(val.Uint()) + case string: + if IsInt(val.String()) { + res, err = strconv.ParseInt(val.String(), 0, 64) + if err != nil { + res = 0 + } + } else { + err = fmt.Errorf("math: square root of negative number %g", value) + res = 0 + } + default: + err = fmt.Errorf("math: square root of negative number %g", value) + res = 0 + } + + return +} + +// ToBoolean convert the input string to a boolean. +func ToBoolean(str string) (bool, error) { + return strconv.ParseBool(str) +} diff --git a/vendor/github.com/asaskevich/govalidator/doc.go b/vendor/github.com/asaskevich/govalidator/doc.go new file mode 100644 index 00000000000..55dce62dc8c --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/doc.go @@ -0,0 +1,3 @@ +package govalidator + +// A package of validators and sanitizers for strings, structures and collections. diff --git a/vendor/github.com/asaskevich/govalidator/error.go b/vendor/github.com/asaskevich/govalidator/error.go new file mode 100644 index 00000000000..655b750cb8f --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/error.go @@ -0,0 +1,43 @@ +package govalidator + +import "strings" + +// Errors is an array of multiple errors and conforms to the error interface. +type Errors []error + +// Errors returns itself. +func (es Errors) Errors() []error { + return es +} + +func (es Errors) Error() string { + var errs []string + for _, e := range es { + errs = append(errs, e.Error()) + } + return strings.Join(errs, ";") +} + +// Error encapsulates a name, an error and whether there's a custom error message or not. +type Error struct { + Name string + Err error + CustomErrorMessageExists bool + + // Validator indicates the name of the validator that failed + Validator string + Path []string +} + +func (e Error) Error() string { + if e.CustomErrorMessageExists { + return e.Err.Error() + } + + errName := e.Name + if len(e.Path) > 0 { + errName = strings.Join(append(e.Path, e.Name), ".") + } + + return errName + ": " + e.Err.Error() +} diff --git a/vendor/github.com/asaskevich/govalidator/go.mod b/vendor/github.com/asaskevich/govalidator/go.mod new file mode 100644 index 00000000000..c1ce891dfa0 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/go.mod @@ -0,0 +1,3 @@ +module github.com/asaskevich/govalidator + +go 1.12 diff --git a/vendor/github.com/asaskevich/govalidator/numerics.go b/vendor/github.com/asaskevich/govalidator/numerics.go new file mode 100644 index 00000000000..7e6c652e140 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/numerics.go @@ -0,0 +1,97 @@ +package govalidator + +import ( + "math" + "reflect" +) + +// Abs returns absolute value of number +func Abs(value float64) float64 { + return math.Abs(value) +} + +// Sign returns signum of number: 1 in case of value > 0, -1 in case of value < 0, 0 otherwise +func Sign(value float64) float64 { + if value > 0 { + return 1 + } else if value < 0 { + return -1 + } else { + return 0 + } +} + +// IsNegative returns true if value < 0 +func IsNegative(value float64) bool { + return value < 0 +} + +// IsPositive returns true if value > 0 +func IsPositive(value float64) bool { + return value > 0 +} + +// IsNonNegative returns true if value >= 0 +func IsNonNegative(value float64) bool { + return value >= 0 +} + +// IsNonPositive returns true if value <= 0 +func IsNonPositive(value float64) bool { + return value <= 0 +} + +// InRange returns true if value lies between left and right border +func InRangeInt(value, left, right interface{}) bool { + value64, _ := ToInt(value) + left64, _ := ToInt(left) + right64, _ := ToInt(right) + if left64 > right64 { + left64, right64 = right64, left64 + } + return value64 >= left64 && value64 <= right64 +} + +// InRange returns true if value lies between left and right border +func InRangeFloat32(value, left, right float32) bool { + if left > right { + left, right = right, left + } + return value >= left && value <= right +} + +// InRange returns true if value lies between left and right border +func InRangeFloat64(value, left, right float64) bool { + if left > right { + left, right = right, left + } + return value >= left && value <= right +} + +// InRange returns true if value lies between left and right border, generic type to handle int, float32 or float64, all types must the same type +func InRange(value interface{}, left interface{}, right interface{}) bool { + + reflectValue := reflect.TypeOf(value).Kind() + reflectLeft := reflect.TypeOf(left).Kind() + reflectRight := reflect.TypeOf(right).Kind() + + if reflectValue == reflect.Int && reflectLeft == reflect.Int && reflectRight == reflect.Int { + return InRangeInt(value.(int), left.(int), right.(int)) + } else if reflectValue == reflect.Float32 && reflectLeft == reflect.Float32 && reflectRight == reflect.Float32 { + return InRangeFloat32(value.(float32), left.(float32), right.(float32)) + } else if reflectValue == reflect.Float64 && reflectLeft == reflect.Float64 && reflectRight == reflect.Float64 { + return InRangeFloat64(value.(float64), left.(float64), right.(float64)) + } else { + return false + } +} + +// IsWhole returns true if value is whole number +func IsWhole(value float64) bool { + return math.Remainder(value, 1) == 0 +} + +// IsNatural returns true if value is natural number (positive and whole) +func IsNatural(value float64) bool { + return IsWhole(value) && IsPositive(value) +} diff --git a/vendor/github.com/asaskevich/govalidator/patterns.go b/vendor/github.com/asaskevich/govalidator/patterns.go new file mode 100644 index 00000000000..1cf972683e9 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/patterns.go @@ -0,0 +1,103 @@ +package govalidator + +import "regexp" + +// Basic regular expressions for validating strings +const ( + Email string = "^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$" + CreditCard string = "^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11}|6[27][0-9]{14})$" + ISBN10 string = "^(?:[0-9]{9}X|[0-9]{10})$" + ISBN13 string = "^(?:[0-9]{13})$" + UUID3 string = "^[0-9a-f]{8}-[0-9a-f]{4}-3[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$" + UUID4 string = "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID5 string = "^[0-9a-f]{8}-[0-9a-f]{4}-5[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" + UUID string = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" + Alpha string = "^[a-zA-Z]+$" + Alphanumeric string = "^[a-zA-Z0-9]+$" + Numeric string = "^[0-9]+$" + Int string = "^(?:[-+]?(?:0|[1-9][0-9]*))$" + Float string = "^(?:[-+]?(?:[0-9]+))?(?:\\.[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$" + Hexadecimal string = "^[0-9a-fA-F]+$" + Hexcolor string = "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$" + RGBcolor string = "^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)$" + ASCII string = "^[\x00-\x7F]+$" + Multibyte string = "[^\x00-\x7F]" + FullWidth string = "[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + HalfWidth string = "[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]" + Base64 string = "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{4})$" + PrintableASCII string = "^[\x20-\x7E]+$" + DataURI string = "^data:.+\\/(.+);base64$" + MagnetURI string = "^magnet:\\?xt=urn:[a-zA-Z0-9]+:[a-zA-Z0-9]{32,40}&dn=.+&tr=.+$" + Latitude string = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$" + Longitude string = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$" + DNSName string = `^([a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62}){1}(\.[a-zA-Z0-9_]{1}[a-zA-Z0-9_-]{0,62})*[\._]?$` + IP string = `(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))` + URLSchema string = `((ftp|tcp|udp|wss?|https?):\/\/)` + URLUsername string = `(\S+(:\S*)?@)` + URLPath string = `((\/|\?|#)[^\s]*)` + URLPort string = `(:(\d{1,5}))` + URLIP string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` + URLSubdomain string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` + URL string = `^` + URLSchema + `?` + URLUsername + `?` + `((` + URLIP + `|(\[` + IP + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomain + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPort + `?` + URLPath + `?$` + SSN string = `^\d{3}[- ]?\d{2}[- ]?\d{4}$` + WinPath string = `^[a-zA-Z]:\\(?:[^\\/:*?"<>|\r\n]+\\)*[^\\/:*?"<>|\r\n]*$` + UnixPath string = `^(/[^/\x00]*)+/?$` + Semver string = "^v?(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$" + tagName string = "valid" + hasLowerCase string = ".*[[:lower:]]" + hasUpperCase string = ".*[[:upper:]]" + hasWhitespace string = ".*[[:space:]]" + hasWhitespaceOnly string = "^[[:space:]]+$" +) + +// Used by IsFilePath func +const ( + // Unknown is unresolved OS type + Unknown = iota + // Win is Windows type + Win + // Unix is *nix OS types + Unix +) + +var ( + userRegexp = regexp.MustCompile("^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$") + hostRegexp = regexp.MustCompile("^[^\\s]+\\.[^\\s]+$") + userDotRegexp = regexp.MustCompile("(^[.]{1})|([.]{1}$)|([.]{2,})") + rxEmail = regexp.MustCompile(Email) + rxCreditCard = regexp.MustCompile(CreditCard) + rxISBN10 = regexp.MustCompile(ISBN10) + rxISBN13 = regexp.MustCompile(ISBN13) + rxUUID3 = regexp.MustCompile(UUID3) + rxUUID4 = regexp.MustCompile(UUID4) + rxUUID5 = regexp.MustCompile(UUID5) + rxUUID = regexp.MustCompile(UUID) + rxAlpha = regexp.MustCompile(Alpha) + rxAlphanumeric = regexp.MustCompile(Alphanumeric) + rxNumeric = regexp.MustCompile(Numeric) + rxInt = regexp.MustCompile(Int) + rxFloat = regexp.MustCompile(Float) + rxHexadecimal = regexp.MustCompile(Hexadecimal) + rxHexcolor = regexp.MustCompile(Hexcolor) + rxRGBcolor = regexp.MustCompile(RGBcolor) + rxASCII = regexp.MustCompile(ASCII) + rxPrintableASCII = regexp.MustCompile(PrintableASCII) + rxMultibyte = regexp.MustCompile(Multibyte) + rxFullWidth = regexp.MustCompile(FullWidth) + rxHalfWidth = regexp.MustCompile(HalfWidth) + rxBase64 = regexp.MustCompile(Base64) + rxDataURI = regexp.MustCompile(DataURI) + rxMagnetURI = regexp.MustCompile(MagnetURI) + rxLatitude = regexp.MustCompile(Latitude) + rxLongitude = regexp.MustCompile(Longitude) + rxDNSName = regexp.MustCompile(DNSName) + rxURL = regexp.MustCompile(URL) + rxSSN = regexp.MustCompile(SSN) + rxWinPath = regexp.MustCompile(WinPath) + rxUnixPath = regexp.MustCompile(UnixPath) + rxSemver = regexp.MustCompile(Semver) + rxHasLowerCase = regexp.MustCompile(hasLowerCase) + rxHasUpperCase = regexp.MustCompile(hasUpperCase) + rxHasWhitespace = regexp.MustCompile(hasWhitespace) + rxHasWhitespaceOnly = regexp.MustCompile(hasWhitespaceOnly) +) diff --git a/vendor/github.com/asaskevich/govalidator/types.go b/vendor/github.com/asaskevich/govalidator/types.go new file mode 100644 index 00000000000..f42a346c172 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/types.go @@ -0,0 +1,652 @@ +package govalidator + +import ( + "reflect" + "regexp" + "sort" + "sync" +) + +// Validator is a wrapper for a validator function that returns bool and accepts string. +type Validator func(str string) bool + +// CustomTypeValidator is a wrapper for validator functions that returns bool and accepts any type. +// The second parameter should be the context (in the case of validating a struct: the whole object being validated). +type CustomTypeValidator func(i interface{}, o interface{}) bool + +// ParamValidator is a wrapper for validator functions that accepts additional parameters. +type ParamValidator func(str string, params ...string) bool +type InterfaceParamValidator func(in interface{}, params ...string) bool +type tagOptionsMap map[string]tagOption + +func (t tagOptionsMap) orderedKeys() []string { + var keys []string + for k := range t { + keys = append(keys, k) + } + + sort.Slice(keys, func(a, b int) bool { + return t[keys[a]].order < t[keys[b]].order + }) + + return keys +} + +type tagOption struct { + name string + customErrorMessage string + order int +} + +// UnsupportedTypeError is a wrapper for reflect.Type +type UnsupportedTypeError struct { + Type reflect.Type +} + +// stringValues is a slice of reflect.Value holding *reflect.StringValue. +// It implements the methods to sort by string. +type stringValues []reflect.Value + +// InterfaceParamTagMap is a map of functions accept variants parameters for an interface value +var InterfaceParamTagMap = map[string]InterfaceParamValidator{ + "type": IsType, +} + +// InterfaceParamTagRegexMap maps interface param tags to their respective regexes. +var InterfaceParamTagRegexMap = map[string]*regexp.Regexp{ + "type": regexp.MustCompile(`^type\((.*)\)$`), +} + +// ParamTagMap is a map of functions accept variants parameters +var ParamTagMap = map[string]ParamValidator{ + "length": ByteLength, + "range": Range, + "runelength": RuneLength, + "stringlength": StringLength, + "matches": StringMatches, + "in": IsInRaw, + "rsapub": IsRsaPub, + "minstringlength": MinStringLength, + "maxstringlength": MaxStringLength, +} + +// ParamTagRegexMap maps param tags to their respective regexes. +var ParamTagRegexMap = map[string]*regexp.Regexp{ + "range": regexp.MustCompile("^range\\((\\d+)\\|(\\d+)\\)$"), + "length": regexp.MustCompile("^length\\((\\d+)\\|(\\d+)\\)$"), + "runelength": regexp.MustCompile("^runelength\\((\\d+)\\|(\\d+)\\)$"), + "stringlength": regexp.MustCompile("^stringlength\\((\\d+)\\|(\\d+)\\)$"), + "in": regexp.MustCompile(`^in\((.*)\)`), + "matches": regexp.MustCompile(`^matches\((.+)\)$`), + "rsapub": regexp.MustCompile("^rsapub\\((\\d+)\\)$"), + "minstringlength": regexp.MustCompile("^minstringlength\\((\\d+)\\)$"), + "maxstringlength": regexp.MustCompile("^maxstringlength\\((\\d+)\\)$"), +} + +type customTypeTagMap struct { + validators map[string]CustomTypeValidator + + sync.RWMutex +} + +func (tm *customTypeTagMap) Get(name string) (CustomTypeValidator, bool) { + tm.RLock() + defer tm.RUnlock() + v, ok := tm.validators[name] + return v, ok +} + +func (tm *customTypeTagMap) Set(name string, ctv CustomTypeValidator) { + tm.Lock() + defer tm.Unlock() + tm.validators[name] = ctv +} + +// CustomTypeTagMap is a map of functions that can be used as tags for ValidateStruct function. +// Use this to validate compound or custom types that need to be handled as a whole, e.g. +// `type UUID [16]byte` (this would be handled as an array of bytes). +var CustomTypeTagMap = &customTypeTagMap{validators: make(map[string]CustomTypeValidator)} + +// TagMap is a map of functions, that can be used as tags for ValidateStruct function. +var TagMap = map[string]Validator{ + "email": IsEmail, + "url": IsURL, + "dialstring": IsDialString, + "requrl": IsRequestURL, + "requri": IsRequestURI, + "alpha": IsAlpha, + "utfletter": IsUTFLetter, + "alphanum": IsAlphanumeric, + "utfletternum": IsUTFLetterNumeric, + "numeric": IsNumeric, + "utfnumeric": IsUTFNumeric, + "utfdigit": IsUTFDigit, + "hexadecimal": IsHexadecimal, + "hexcolor": IsHexcolor, + "rgbcolor": IsRGBcolor, + "lowercase": IsLowerCase, + "uppercase": IsUpperCase, + "int": IsInt, + "float": IsFloat, + "null": IsNull, + "notnull": IsNotNull, + "uuid": IsUUID, + "uuidv3": IsUUIDv3, + "uuidv4": IsUUIDv4, + "uuidv5": IsUUIDv5, + "creditcard": IsCreditCard, + "isbn10": IsISBN10, + "isbn13": IsISBN13, + "json": IsJSON, + "multibyte": IsMultibyte, + "ascii": IsASCII, + "printableascii": IsPrintableASCII, + "fullwidth": IsFullWidth, + "halfwidth": IsHalfWidth, + "variablewidth": IsVariableWidth, + "base64": IsBase64, + "datauri": IsDataURI, + "ip": IsIP, + "port": IsPort, + "ipv4": IsIPv4, + "ipv6": IsIPv6, + "dns": IsDNSName, + "host": IsHost, + "mac": IsMAC, + "latitude": IsLatitude, + "longitude": IsLongitude, + "ssn": IsSSN, + "semver": IsSemver, + "rfc3339": IsRFC3339, + "rfc3339WithoutZone": IsRFC3339WithoutZone, + "ISO3166Alpha2": IsISO3166Alpha2, + "ISO3166Alpha3": IsISO3166Alpha3, + "ISO4217": IsISO4217, +} + +// ISO3166Entry stores country codes +type ISO3166Entry struct { + EnglishShortName string + FrenchShortName string + Alpha2Code string + Alpha3Code string + Numeric string +} + +//ISO3166List based on https://www.iso.org/obp/ui/#search/code/ Code Type "Officially Assigned Codes" +var ISO3166List = []ISO3166Entry{ + {"Afghanistan", "Afghanistan (l')", "AF", "AFG", "004"}, + {"Albania", "Albanie (l')", "AL", "ALB", "008"}, + {"Antarctica", "Antarctique (l')", "AQ", "ATA", "010"}, + {"Algeria", "Algérie (l')", "DZ", "DZA", "012"}, + {"American Samoa", "Samoa américaines (les)", "AS", "ASM", "016"}, + {"Andorra", "Andorre (l')", "AD", "AND", "020"}, + {"Angola", "Angola (l')", "AO", "AGO", "024"}, + {"Antigua and Barbuda", "Antigua-et-Barbuda", "AG", "ATG", "028"}, + {"Azerbaijan", "Azerbaïdjan (l')", "AZ", "AZE", "031"}, + {"Argentina", "Argentine (l')", "AR", "ARG", "032"}, + {"Australia", "Australie (l')", "AU", "AUS", "036"}, + {"Austria", "Autriche (l')", "AT", "AUT", "040"}, + {"Bahamas (the)", "Bahamas (les)", "BS", "BHS", "044"}, + {"Bahrain", "Bahreïn", "BH", "BHR", "048"}, + {"Bangladesh", "Bangladesh (le)", "BD", "BGD", "050"}, + {"Armenia", "Arménie (l')", "AM", "ARM", "051"}, + {"Barbados", "Barbade (la)", "BB", "BRB", "052"}, + {"Belgium", "Belgique (la)", "BE", "BEL", "056"}, + {"Bermuda", "Bermudes (les)", "BM", "BMU", "060"}, + {"Bhutan", "Bhoutan (le)", "BT", "BTN", "064"}, + {"Bolivia (Plurinational State of)", "Bolivie (État plurinational de)", "BO", "BOL", "068"}, + {"Bosnia and Herzegovina", "Bosnie-Herzégovine (la)", "BA", "BIH", "070"}, + {"Botswana", "Botswana (le)", "BW", "BWA", "072"}, + {"Bouvet Island", "Bouvet (l'Île)", "BV", "BVT", "074"}, + {"Brazil", "Brésil (le)", "BR", "BRA", "076"}, + {"Belize", "Belize (le)", "BZ", "BLZ", "084"}, + {"British Indian Ocean Territory (the)", "Indien (le Territoire britannique de l'océan)", "IO", "IOT", "086"}, + {"Solomon Islands", "Salomon (Îles)", "SB", "SLB", "090"}, + {"Virgin Islands (British)", "Vierges britanniques (les Îles)", "VG", "VGB", "092"}, + {"Brunei Darussalam", "Brunéi Darussalam (le)", "BN", "BRN", "096"}, + {"Bulgaria", "Bulgarie (la)", "BG", "BGR", "100"}, + {"Myanmar", "Myanmar (le)", "MM", "MMR", "104"}, + {"Burundi", "Burundi (le)", "BI", "BDI", "108"}, + {"Belarus", "Bélarus (le)", "BY", "BLR", "112"}, + {"Cambodia", "Cambodge (le)", "KH", "KHM", "116"}, + {"Cameroon", "Cameroun (le)", "CM", "CMR", "120"}, + {"Canada", "Canada (le)", "CA", "CAN", "124"}, + {"Cabo Verde", "Cabo Verde", "CV", "CPV", "132"}, + {"Cayman Islands (the)", "Caïmans (les Îles)", "KY", "CYM", "136"}, + {"Central African Republic (the)", "République centrafricaine (la)", "CF", "CAF", "140"}, + {"Sri Lanka", "Sri Lanka", "LK", "LKA", "144"}, + {"Chad", "Tchad (le)", "TD", "TCD", "148"}, + {"Chile", "Chili (le)", "CL", "CHL", "152"}, + {"China", "Chine (la)", "CN", "CHN", "156"}, + {"Taiwan (Province of China)", "Taïwan (Province de Chine)", "TW", "TWN", "158"}, + {"Christmas Island", "Christmas (l'Île)", "CX", "CXR", "162"}, + {"Cocos (Keeling) Islands (the)", "Cocos (les Îles)/ Keeling (les Îles)", "CC", "CCK", "166"}, + {"Colombia", "Colombie (la)", "CO", "COL", "170"}, + {"Comoros (the)", "Comores (les)", "KM", "COM", "174"}, + {"Mayotte", "Mayotte", "YT", "MYT", "175"}, + {"Congo (the)", "Congo (le)", "CG", "COG", "178"}, + {"Congo (the Democratic Republic of the)", "Congo (la République démocratique du)", "CD", "COD", "180"}, + {"Cook Islands (the)", "Cook (les Îles)", "CK", "COK", "184"}, + {"Costa Rica", "Costa Rica (le)", "CR", "CRI", "188"}, + {"Croatia", "Croatie (la)", "HR", "HRV", "191"}, + {"Cuba", "Cuba", "CU", "CUB", "192"}, + {"Cyprus", "Chypre", "CY", "CYP", "196"}, + {"Czech Republic (the)", "tchèque (la République)", "CZ", "CZE", "203"}, + {"Benin", "Bénin (le)", "BJ", "BEN", "204"}, + {"Denmark", "Danemark (le)", "DK", "DNK", "208"}, + {"Dominica", "Dominique (la)", "DM", "DMA", "212"}, + {"Dominican Republic (the)", "dominicaine (la République)", "DO", "DOM", "214"}, + {"Ecuador", "Équateur (l')", "EC", "ECU", "218"}, + {"El Salvador", "El Salvador", "SV", "SLV", "222"}, + {"Equatorial Guinea", "Guinée équatoriale (la)", "GQ", "GNQ", "226"}, + {"Ethiopia", "Éthiopie (l')", "ET", "ETH", "231"}, + {"Eritrea", "Érythrée (l')", "ER", "ERI", "232"}, + {"Estonia", "Estonie (l')", "EE", "EST", "233"}, + {"Faroe Islands (the)", "Féroé (les Îles)", "FO", "FRO", "234"}, + {"Falkland Islands (the) [Malvinas]", "Falkland (les Îles)/Malouines (les Îles)", "FK", "FLK", "238"}, + {"South Georgia and the South Sandwich Islands", "Géorgie du Sud-et-les Îles Sandwich du Sud (la)", "GS", "SGS", "239"}, + {"Fiji", "Fidji (les)", "FJ", "FJI", "242"}, + {"Finland", "Finlande (la)", "FI", "FIN", "246"}, + {"Åland Islands", "Åland(les Îles)", "AX", "ALA", "248"}, + {"France", "France (la)", "FR", "FRA", "250"}, + {"French Guiana", "Guyane française (la )", "GF", "GUF", "254"}, + {"French Polynesia", "Polynésie française (la)", "PF", "PYF", "258"}, + {"French Southern Territories (the)", "Terres australes françaises (les)", "TF", "ATF", "260"}, + {"Djibouti", "Djibouti", "DJ", "DJI", "262"}, + {"Gabon", "Gabon (le)", "GA", "GAB", "266"}, + {"Georgia", "Géorgie (la)", "GE", "GEO", "268"}, + {"Gambia (the)", "Gambie (la)", "GM", "GMB", "270"}, + {"Palestine, State of", "Palestine, État de", "PS", "PSE", "275"}, + {"Germany", "Allemagne (l')", "DE", "DEU", "276"}, + {"Ghana", "Ghana (le)", "GH", "GHA", "288"}, + {"Gibraltar", "Gibraltar", "GI", "GIB", "292"}, + {"Kiribati", "Kiribati", "KI", "KIR", "296"}, + {"Greece", "Grèce (la)", "GR", "GRC", "300"}, + {"Greenland", "Groenland (le)", "GL", "GRL", "304"}, + {"Grenada", "Grenade (la)", "GD", "GRD", "308"}, + {"Guadeloupe", "Guadeloupe (la)", "GP", "GLP", "312"}, + {"Guam", "Guam", "GU", "GUM", "316"}, + {"Guatemala", "Guatemala (le)", "GT", "GTM", "320"}, + {"Guinea", "Guinée (la)", "GN", "GIN", "324"}, + {"Guyana", "Guyana (le)", "GY", "GUY", "328"}, + {"Haiti", "Haïti", "HT", "HTI", "332"}, + {"Heard Island and McDonald Islands", "Heard-et-Îles MacDonald (l'Île)", "HM", "HMD", "334"}, + {"Holy See (the)", "Saint-Siège (le)", "VA", "VAT", "336"}, + {"Honduras", "Honduras (le)", "HN", "HND", "340"}, + {"Hong Kong", "Hong Kong", "HK", "HKG", "344"}, + {"Hungary", "Hongrie (la)", "HU", "HUN", "348"}, + {"Iceland", "Islande (l')", "IS", "ISL", "352"}, + {"India", "Inde (l')", "IN", "IND", "356"}, + {"Indonesia", "Indonésie (l')", "ID", "IDN", "360"}, + {"Iran (Islamic Republic of)", "Iran (République Islamique d')", "IR", "IRN", "364"}, + {"Iraq", "Iraq (l')", "IQ", "IRQ", "368"}, + {"Ireland", "Irlande (l')", "IE", "IRL", "372"}, + {"Israel", "Israël", "IL", "ISR", "376"}, + {"Italy", "Italie (l')", "IT", "ITA", "380"}, + {"Côte d'Ivoire", "Côte d'Ivoire (la)", "CI", "CIV", "384"}, + {"Jamaica", "Jamaïque (la)", "JM", "JAM", "388"}, + {"Japan", "Japon (le)", "JP", "JPN", "392"}, + {"Kazakhstan", "Kazakhstan (le)", "KZ", "KAZ", "398"}, + {"Jordan", "Jordanie (la)", "JO", "JOR", "400"}, + {"Kenya", "Kenya (le)", "KE", "KEN", "404"}, + {"Korea (the Democratic People's Republic of)", "Corée (la République populaire démocratique de)", "KP", "PRK", "408"}, + {"Korea (the Republic of)", "Corée (la République de)", "KR", "KOR", "410"}, + {"Kuwait", "Koweït (le)", "KW", "KWT", "414"}, + {"Kyrgyzstan", "Kirghizistan (le)", "KG", "KGZ", "417"}, + {"Lao People's Democratic Republic (the)", "Lao, République démocratique populaire", "LA", "LAO", "418"}, + {"Lebanon", "Liban (le)", "LB", "LBN", "422"}, + {"Lesotho", "Lesotho (le)", "LS", "LSO", "426"}, + {"Latvia", "Lettonie (la)", "LV", "LVA", "428"}, + {"Liberia", "Libéria (le)", "LR", "LBR", "430"}, + {"Libya", "Libye (la)", "LY", "LBY", "434"}, + {"Liechtenstein", "Liechtenstein (le)", "LI", "LIE", "438"}, + {"Lithuania", "Lituanie (la)", "LT", "LTU", "440"}, + {"Luxembourg", "Luxembourg (le)", "LU", "LUX", "442"}, + {"Macao", "Macao", "MO", "MAC", "446"}, + {"Madagascar", "Madagascar", "MG", "MDG", "450"}, + {"Malawi", "Malawi (le)", "MW", "MWI", "454"}, + {"Malaysia", "Malaisie (la)", "MY", "MYS", "458"}, + {"Maldives", "Maldives (les)", "MV", "MDV", "462"}, + {"Mali", "Mali (le)", "ML", "MLI", "466"}, + {"Malta", "Malte", "MT", "MLT", "470"}, + {"Martinique", "Martinique (la)", "MQ", "MTQ", "474"}, + {"Mauritania", "Mauritanie (la)", "MR", "MRT", "478"}, + {"Mauritius", "Maurice", "MU", "MUS", "480"}, + {"Mexico", "Mexique (le)", "MX", "MEX", "484"}, + {"Monaco", "Monaco", "MC", "MCO", "492"}, + {"Mongolia", "Mongolie (la)", "MN", "MNG", "496"}, + {"Moldova (the Republic of)", "Moldova , République de", "MD", "MDA", "498"}, + {"Montenegro", "Monténégro (le)", "ME", "MNE", "499"}, + {"Montserrat", "Montserrat", "MS", "MSR", "500"}, + {"Morocco", "Maroc (le)", "MA", "MAR", "504"}, + {"Mozambique", "Mozambique (le)", "MZ", "MOZ", "508"}, + {"Oman", "Oman", "OM", "OMN", "512"}, + {"Namibia", "Namibie (la)", "NA", "NAM", "516"}, + {"Nauru", "Nauru", "NR", "NRU", "520"}, + {"Nepal", "Népal (le)", "NP", "NPL", "524"}, + {"Netherlands (the)", "Pays-Bas (les)", "NL", "NLD", "528"}, + {"Curaçao", "Curaçao", "CW", "CUW", "531"}, + {"Aruba", "Aruba", "AW", "ABW", "533"}, + {"Sint Maarten (Dutch part)", "Saint-Martin (partie néerlandaise)", "SX", "SXM", "534"}, + {"Bonaire, Sint Eustatius and Saba", "Bonaire, Saint-Eustache et Saba", "BQ", "BES", "535"}, + {"New Caledonia", "Nouvelle-Calédonie (la)", "NC", "NCL", "540"}, + {"Vanuatu", "Vanuatu (le)", "VU", "VUT", "548"}, + {"New Zealand", "Nouvelle-Zélande (la)", "NZ", "NZL", "554"}, + {"Nicaragua", "Nicaragua (le)", "NI", "NIC", "558"}, + {"Niger (the)", "Niger (le)", "NE", "NER", "562"}, + {"Nigeria", "Nigéria (le)", "NG", "NGA", "566"}, + {"Niue", "Niue", "NU", "NIU", "570"}, + {"Norfolk Island", "Norfolk (l'Île)", "NF", "NFK", "574"}, + {"Norway", "Norvège (la)", "NO", "NOR", "578"}, + {"Northern Mariana Islands (the)", "Mariannes du Nord (les Îles)", "MP", "MNP", "580"}, + {"United States Minor Outlying Islands (the)", "Îles mineures éloignées des États-Unis (les)", "UM", "UMI", "581"}, + {"Micronesia (Federated States of)", "Micronésie (États fédérés de)", "FM", "FSM", "583"}, + {"Marshall Islands (the)", "Marshall (Îles)", "MH", "MHL", "584"}, + {"Palau", "Palaos (les)", "PW", "PLW", "585"}, + {"Pakistan", "Pakistan (le)", "PK", "PAK", "586"}, + {"Panama", "Panama (le)", "PA", "PAN", "591"}, + {"Papua New Guinea", "Papouasie-Nouvelle-Guinée (la)", "PG", "PNG", "598"}, + {"Paraguay", "Paraguay (le)", "PY", "PRY", "600"}, + {"Peru", "Pérou (le)", "PE", "PER", "604"}, + {"Philippines (the)", "Philippines (les)", "PH", "PHL", "608"}, + {"Pitcairn", "Pitcairn", "PN", "PCN", "612"}, + {"Poland", "Pologne (la)", "PL", "POL", "616"}, + {"Portugal", "Portugal (le)", "PT", "PRT", "620"}, + {"Guinea-Bissau", "Guinée-Bissau (la)", "GW", "GNB", "624"}, + {"Timor-Leste", "Timor-Leste (le)", "TL", "TLS", "626"}, + {"Puerto Rico", "Porto Rico", "PR", "PRI", "630"}, + {"Qatar", "Qatar (le)", "QA", "QAT", "634"}, + {"Réunion", "Réunion (La)", "RE", "REU", "638"}, + {"Romania", "Roumanie (la)", "RO", "ROU", "642"}, + {"Russian Federation (the)", "Russie (la Fédération de)", "RU", "RUS", "643"}, + {"Rwanda", "Rwanda (le)", "RW", "RWA", "646"}, + {"Saint Barthélemy", "Saint-Barthélemy", "BL", "BLM", "652"}, + {"Saint Helena, Ascension and Tristan da Cunha", "Sainte-Hélène, Ascension et Tristan da Cunha", "SH", "SHN", "654"}, + {"Saint Kitts and Nevis", "Saint-Kitts-et-Nevis", "KN", "KNA", "659"}, + {"Anguilla", "Anguilla", "AI", "AIA", "660"}, + {"Saint Lucia", "Sainte-Lucie", "LC", "LCA", "662"}, + {"Saint Martin (French part)", "Saint-Martin (partie française)", "MF", "MAF", "663"}, + {"Saint Pierre and Miquelon", "Saint-Pierre-et-Miquelon", "PM", "SPM", "666"}, + {"Saint Vincent and the Grenadines", "Saint-Vincent-et-les Grenadines", "VC", "VCT", "670"}, + {"San Marino", "Saint-Marin", "SM", "SMR", "674"}, + {"Sao Tome and Principe", "Sao Tomé-et-Principe", "ST", "STP", "678"}, + {"Saudi Arabia", "Arabie saoudite (l')", "SA", "SAU", "682"}, + {"Senegal", "Sénégal (le)", "SN", "SEN", "686"}, + {"Serbia", "Serbie (la)", "RS", "SRB", "688"}, + {"Seychelles", "Seychelles (les)", "SC", "SYC", "690"}, + {"Sierra Leone", "Sierra Leone (la)", "SL", "SLE", "694"}, + {"Singapore", "Singapour", "SG", "SGP", "702"}, + {"Slovakia", "Slovaquie (la)", "SK", "SVK", "703"}, + {"Viet Nam", "Viet Nam (le)", "VN", "VNM", "704"}, + {"Slovenia", "Slovénie (la)", "SI", "SVN", "705"}, + {"Somalia", "Somalie (la)", "SO", "SOM", "706"}, + {"South Africa", "Afrique du Sud (l')", "ZA", "ZAF", "710"}, + {"Zimbabwe", "Zimbabwe (le)", "ZW", "ZWE", "716"}, + {"Spain", "Espagne (l')", "ES", "ESP", "724"}, + {"South Sudan", "Soudan du Sud (le)", "SS", "SSD", "728"}, + {"Sudan (the)", "Soudan (le)", "SD", "SDN", "729"}, + {"Western Sahara*", "Sahara occidental (le)*", "EH", "ESH", "732"}, + {"Suriname", "Suriname (le)", "SR", "SUR", "740"}, + {"Svalbard and Jan Mayen", "Svalbard et l'Île Jan Mayen (le)", "SJ", "SJM", "744"}, + {"Swaziland", "Swaziland (le)", "SZ", "SWZ", "748"}, + {"Sweden", "Suède (la)", "SE", "SWE", "752"}, + {"Switzerland", "Suisse (la)", "CH", "CHE", "756"}, + {"Syrian Arab Republic", "République arabe syrienne (la)", "SY", "SYR", "760"}, + {"Tajikistan", "Tadjikistan (le)", "TJ", "TJK", "762"}, + {"Thailand", "Thaïlande (la)", "TH", "THA", "764"}, + {"Togo", "Togo (le)", "TG", "TGO", "768"}, + {"Tokelau", "Tokelau (les)", "TK", "TKL", "772"}, + {"Tonga", "Tonga (les)", "TO", "TON", "776"}, + {"Trinidad and Tobago", "Trinité-et-Tobago (la)", "TT", "TTO", "780"}, + {"United Arab Emirates (the)", "Émirats arabes unis (les)", "AE", "ARE", "784"}, + {"Tunisia", "Tunisie (la)", "TN", "TUN", "788"}, + {"Turkey", "Turquie (la)", "TR", "TUR", "792"}, + {"Turkmenistan", "Turkménistan (le)", "TM", "TKM", "795"}, + {"Turks and Caicos Islands (the)", "Turks-et-Caïcos (les Îles)", "TC", "TCA", "796"}, + {"Tuvalu", "Tuvalu (les)", "TV", "TUV", "798"}, + {"Uganda", "Ouganda (l')", "UG", "UGA", "800"}, + {"Ukraine", "Ukraine (l')", "UA", "UKR", "804"}, + {"Macedonia (the former Yugoslav Republic of)", "Macédoine (l'ex‑République yougoslave de)", "MK", "MKD", "807"}, + {"Egypt", "Égypte (l')", "EG", "EGY", "818"}, + {"United Kingdom of Great Britain and Northern Ireland (the)", "Royaume-Uni de Grande-Bretagne et d'Irlande du Nord (le)", "GB", "GBR", "826"}, + {"Guernsey", "Guernesey", "GG", "GGY", "831"}, + {"Jersey", "Jersey", "JE", "JEY", "832"}, + {"Isle of Man", "Île de Man", "IM", "IMN", "833"}, + {"Tanzania, United Republic of", "Tanzanie, République-Unie de", "TZ", "TZA", "834"}, + {"United States of America (the)", "États-Unis d'Amérique (les)", "US", "USA", "840"}, + {"Virgin Islands (U.S.)", "Vierges des États-Unis (les Îles)", "VI", "VIR", "850"}, + {"Burkina Faso", "Burkina Faso (le)", "BF", "BFA", "854"}, + {"Uruguay", "Uruguay (l')", "UY", "URY", "858"}, + {"Uzbekistan", "Ouzbékistan (l')", "UZ", "UZB", "860"}, + {"Venezuela (Bolivarian Republic of)", "Venezuela (République bolivarienne du)", "VE", "VEN", "862"}, + {"Wallis and Futuna", "Wallis-et-Futuna", "WF", "WLF", "876"}, + {"Samoa", "Samoa (le)", "WS", "WSM", "882"}, + {"Yemen", "Yémen (le)", "YE", "YEM", "887"}, + {"Zambia", "Zambie (la)", "ZM", "ZMB", "894"}, +} + +// ISO4217List is the list of ISO currency codes +var ISO4217List = []string{ + "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", + "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", + "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", + "DJF", "DKK", "DOP", "DZD", + "EGP", "ERN", "ETB", "EUR", + "FJD", "FKP", + "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", + "HKD", "HNL", "HRK", "HTG", "HUF", + "IDR", "ILS", "INR", "IQD", "IRR", "ISK", + "JMD", "JOD", "JPY", + "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", + "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", + "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", + "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", + "OMR", + "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", + "QAR", + "RON", "RSD", "RUB", "RWF", + "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STD", "SVC", "SYP", "SZL", + "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", + "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UZS", + "VEF", "VND", "VUV", + "WST", + "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", + "YER", + "ZAR", "ZMW", "ZWL", +} + +// ISO693Entry stores ISO language codes +type ISO693Entry struct { + Alpha3bCode string + Alpha2Code string + English string +} + +//ISO693List based on http://data.okfn.org/data/core/language-codes/r/language-codes-3b2.json +var ISO693List = []ISO693Entry{ + {Alpha3bCode: "aar", Alpha2Code: "aa", English: "Afar"}, + {Alpha3bCode: "abk", Alpha2Code: "ab", English: "Abkhazian"}, + {Alpha3bCode: "afr", Alpha2Code: "af", English: "Afrikaans"}, + {Alpha3bCode: "aka", Alpha2Code: "ak", English: "Akan"}, + {Alpha3bCode: "alb", Alpha2Code: "sq", English: "Albanian"}, + {Alpha3bCode: "amh", Alpha2Code: "am", English: "Amharic"}, + {Alpha3bCode: "ara", Alpha2Code: "ar", English: "Arabic"}, + {Alpha3bCode: "arg", Alpha2Code: "an", English: "Aragonese"}, + {Alpha3bCode: "arm", Alpha2Code: "hy", English: "Armenian"}, + {Alpha3bCode: "asm", Alpha2Code: "as", English: "Assamese"}, + {Alpha3bCode: "ava", Alpha2Code: "av", English: "Avaric"}, + {Alpha3bCode: "ave", Alpha2Code: "ae", English: "Avestan"}, + {Alpha3bCode: "aym", Alpha2Code: "ay", English: "Aymara"}, + {Alpha3bCode: "aze", Alpha2Code: "az", English: "Azerbaijani"}, + {Alpha3bCode: "bak", Alpha2Code: "ba", English: "Bashkir"}, + {Alpha3bCode: "bam", Alpha2Code: "bm", English: "Bambara"}, + {Alpha3bCode: "baq", Alpha2Code: "eu", English: "Basque"}, + {Alpha3bCode: "bel", Alpha2Code: "be", English: "Belarusian"}, + {Alpha3bCode: "ben", Alpha2Code: "bn", English: "Bengali"}, + {Alpha3bCode: "bih", Alpha2Code: "bh", English: "Bihari languages"}, + {Alpha3bCode: "bis", Alpha2Code: "bi", English: "Bislama"}, + {Alpha3bCode: "bos", Alpha2Code: "bs", English: "Bosnian"}, + {Alpha3bCode: "bre", Alpha2Code: "br", English: "Breton"}, + {Alpha3bCode: "bul", Alpha2Code: "bg", English: "Bulgarian"}, + {Alpha3bCode: "bur", Alpha2Code: "my", English: "Burmese"}, + {Alpha3bCode: "cat", Alpha2Code: "ca", English: "Catalan; Valencian"}, + {Alpha3bCode: "cha", Alpha2Code: "ch", English: "Chamorro"}, + {Alpha3bCode: "che", Alpha2Code: "ce", English: "Chechen"}, + {Alpha3bCode: "chi", Alpha2Code: "zh", English: "Chinese"}, + {Alpha3bCode: "chu", Alpha2Code: "cu", English: "Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"}, + {Alpha3bCode: "chv", Alpha2Code: "cv", English: "Chuvash"}, + {Alpha3bCode: "cor", Alpha2Code: "kw", English: "Cornish"}, + {Alpha3bCode: "cos", Alpha2Code: "co", English: "Corsican"}, + {Alpha3bCode: "cre", Alpha2Code: "cr", English: "Cree"}, + {Alpha3bCode: "cze", Alpha2Code: "cs", English: "Czech"}, + {Alpha3bCode: "dan", Alpha2Code: "da", English: "Danish"}, + {Alpha3bCode: "div", Alpha2Code: "dv", English: "Divehi; Dhivehi; Maldivian"}, + {Alpha3bCode: "dut", Alpha2Code: "nl", English: "Dutch; Flemish"}, + {Alpha3bCode: "dzo", Alpha2Code: "dz", English: "Dzongkha"}, + {Alpha3bCode: "eng", Alpha2Code: "en", English: "English"}, + {Alpha3bCode: "epo", Alpha2Code: "eo", English: "Esperanto"}, + {Alpha3bCode: "est", Alpha2Code: "et", English: "Estonian"}, + {Alpha3bCode: "ewe", Alpha2Code: "ee", English: "Ewe"}, + {Alpha3bCode: "fao", Alpha2Code: "fo", English: "Faroese"}, + {Alpha3bCode: "fij", Alpha2Code: "fj", English: "Fijian"}, + {Alpha3bCode: "fin", Alpha2Code: "fi", English: "Finnish"}, + {Alpha3bCode: "fre", Alpha2Code: "fr", English: "French"}, + {Alpha3bCode: "fry", Alpha2Code: "fy", English: "Western Frisian"}, + {Alpha3bCode: "ful", Alpha2Code: "ff", English: "Fulah"}, + {Alpha3bCode: "geo", Alpha2Code: "ka", English: "Georgian"}, + {Alpha3bCode: "ger", Alpha2Code: "de", English: "German"}, + {Alpha3bCode: "gla", Alpha2Code: "gd", English: "Gaelic; Scottish Gaelic"}, + {Alpha3bCode: "gle", Alpha2Code: "ga", English: "Irish"}, + {Alpha3bCode: "glg", Alpha2Code: "gl", English: "Galician"}, + {Alpha3bCode: "glv", Alpha2Code: "gv", English: "Manx"}, + {Alpha3bCode: "gre", Alpha2Code: "el", English: "Greek, Modern (1453-)"}, + {Alpha3bCode: "grn", Alpha2Code: "gn", English: "Guarani"}, + {Alpha3bCode: "guj", Alpha2Code: "gu", English: "Gujarati"}, + {Alpha3bCode: "hat", Alpha2Code: "ht", English: "Haitian; Haitian Creole"}, + {Alpha3bCode: "hau", Alpha2Code: "ha", English: "Hausa"}, + {Alpha3bCode: "heb", Alpha2Code: "he", English: "Hebrew"}, + {Alpha3bCode: "her", Alpha2Code: "hz", English: "Herero"}, + {Alpha3bCode: "hin", Alpha2Code: "hi", English: "Hindi"}, + {Alpha3bCode: "hmo", Alpha2Code: "ho", English: "Hiri Motu"}, + {Alpha3bCode: "hrv", Alpha2Code: "hr", English: "Croatian"}, + {Alpha3bCode: "hun", Alpha2Code: "hu", English: "Hungarian"}, + {Alpha3bCode: "ibo", Alpha2Code: "ig", English: "Igbo"}, + {Alpha3bCode: "ice", Alpha2Code: "is", English: "Icelandic"}, + {Alpha3bCode: "ido", Alpha2Code: "io", English: "Ido"}, + {Alpha3bCode: "iii", Alpha2Code: "ii", English: "Sichuan Yi; Nuosu"}, + {Alpha3bCode: "iku", Alpha2Code: "iu", English: "Inuktitut"}, + {Alpha3bCode: "ile", Alpha2Code: "ie", English: "Interlingue; Occidental"}, + {Alpha3bCode: "ina", Alpha2Code: "ia", English: "Interlingua (International Auxiliary Language Association)"}, + {Alpha3bCode: "ind", Alpha2Code: "id", English: "Indonesian"}, + {Alpha3bCode: "ipk", Alpha2Code: "ik", English: "Inupiaq"}, + {Alpha3bCode: "ita", Alpha2Code: "it", English: "Italian"}, + {Alpha3bCode: "jav", Alpha2Code: "jv", English: "Javanese"}, + {Alpha3bCode: "jpn", Alpha2Code: "ja", English: "Japanese"}, + {Alpha3bCode: "kal", Alpha2Code: "kl", English: "Kalaallisut; Greenlandic"}, + {Alpha3bCode: "kan", Alpha2Code: "kn", English: "Kannada"}, + {Alpha3bCode: "kas", Alpha2Code: "ks", English: "Kashmiri"}, + {Alpha3bCode: "kau", Alpha2Code: "kr", English: "Kanuri"}, + {Alpha3bCode: "kaz", Alpha2Code: "kk", English: "Kazakh"}, + {Alpha3bCode: "khm", Alpha2Code: "km", English: "Central Khmer"}, + {Alpha3bCode: "kik", Alpha2Code: "ki", English: "Kikuyu; Gikuyu"}, + {Alpha3bCode: "kin", Alpha2Code: "rw", English: "Kinyarwanda"}, + {Alpha3bCode: "kir", Alpha2Code: "ky", English: "Kirghiz; Kyrgyz"}, + {Alpha3bCode: "kom", Alpha2Code: "kv", English: "Komi"}, + {Alpha3bCode: "kon", Alpha2Code: "kg", English: "Kongo"}, + {Alpha3bCode: "kor", Alpha2Code: "ko", English: "Korean"}, + {Alpha3bCode: "kua", Alpha2Code: "kj", English: "Kuanyama; Kwanyama"}, + {Alpha3bCode: "kur", Alpha2Code: "ku", English: "Kurdish"}, + {Alpha3bCode: "lao", Alpha2Code: "lo", English: "Lao"}, + {Alpha3bCode: "lat", Alpha2Code: "la", English: "Latin"}, + {Alpha3bCode: "lav", Alpha2Code: "lv", English: "Latvian"}, + {Alpha3bCode: "lim", Alpha2Code: "li", English: "Limburgan; Limburger; Limburgish"}, + {Alpha3bCode: "lin", Alpha2Code: "ln", English: "Lingala"}, + {Alpha3bCode: "lit", Alpha2Code: "lt", English: "Lithuanian"}, + {Alpha3bCode: "ltz", Alpha2Code: "lb", English: "Luxembourgish; Letzeburgesch"}, + {Alpha3bCode: "lub", Alpha2Code: "lu", English: "Luba-Katanga"}, + {Alpha3bCode: "lug", Alpha2Code: "lg", English: "Ganda"}, + {Alpha3bCode: "mac", Alpha2Code: "mk", English: "Macedonian"}, + {Alpha3bCode: "mah", Alpha2Code: "mh", English: "Marshallese"}, + {Alpha3bCode: "mal", Alpha2Code: "ml", English: "Malayalam"}, + {Alpha3bCode: "mao", Alpha2Code: "mi", English: "Maori"}, + {Alpha3bCode: "mar", Alpha2Code: "mr", English: "Marathi"}, + {Alpha3bCode: "may", Alpha2Code: "ms", English: "Malay"}, + {Alpha3bCode: "mlg", Alpha2Code: "mg", English: "Malagasy"}, + {Alpha3bCode: "mlt", Alpha2Code: "mt", English: "Maltese"}, + {Alpha3bCode: "mon", Alpha2Code: "mn", English: "Mongolian"}, + {Alpha3bCode: "nau", Alpha2Code: "na", English: "Nauru"}, + {Alpha3bCode: "nav", Alpha2Code: "nv", English: "Navajo; Navaho"}, + {Alpha3bCode: "nbl", Alpha2Code: "nr", English: "Ndebele, South; South Ndebele"}, + {Alpha3bCode: "nde", Alpha2Code: "nd", English: "Ndebele, North; North Ndebele"}, + {Alpha3bCode: "ndo", Alpha2Code: "ng", English: "Ndonga"}, + {Alpha3bCode: "nep", Alpha2Code: "ne", English: "Nepali"}, + {Alpha3bCode: "nno", Alpha2Code: "nn", English: "Norwegian Nynorsk; Nynorsk, Norwegian"}, + {Alpha3bCode: "nob", Alpha2Code: "nb", English: "Bokmål, Norwegian; Norwegian Bokmål"}, + {Alpha3bCode: "nor", Alpha2Code: "no", English: "Norwegian"}, + {Alpha3bCode: "nya", Alpha2Code: "ny", English: "Chichewa; Chewa; Nyanja"}, + {Alpha3bCode: "oci", Alpha2Code: "oc", English: "Occitan (post 1500); Provençal"}, + {Alpha3bCode: "oji", Alpha2Code: "oj", English: "Ojibwa"}, + {Alpha3bCode: "ori", Alpha2Code: "or", English: "Oriya"}, + {Alpha3bCode: "orm", Alpha2Code: "om", English: "Oromo"}, + {Alpha3bCode: "oss", Alpha2Code: "os", English: "Ossetian; Ossetic"}, + {Alpha3bCode: "pan", Alpha2Code: "pa", English: "Panjabi; Punjabi"}, + {Alpha3bCode: "per", Alpha2Code: "fa", English: "Persian"}, + {Alpha3bCode: "pli", Alpha2Code: "pi", English: "Pali"}, + {Alpha3bCode: "pol", Alpha2Code: "pl", English: "Polish"}, + {Alpha3bCode: "por", Alpha2Code: "pt", English: "Portuguese"}, + {Alpha3bCode: "pus", Alpha2Code: "ps", English: "Pushto; Pashto"}, + {Alpha3bCode: "que", Alpha2Code: "qu", English: "Quechua"}, + {Alpha3bCode: "roh", Alpha2Code: "rm", English: "Romansh"}, + {Alpha3bCode: "rum", Alpha2Code: "ro", English: "Romanian; Moldavian; Moldovan"}, + {Alpha3bCode: "run", Alpha2Code: "rn", English: "Rundi"}, + {Alpha3bCode: "rus", Alpha2Code: "ru", English: "Russian"}, + {Alpha3bCode: "sag", Alpha2Code: "sg", English: "Sango"}, + {Alpha3bCode: "san", Alpha2Code: "sa", English: "Sanskrit"}, + {Alpha3bCode: "sin", Alpha2Code: "si", English: "Sinhala; Sinhalese"}, + {Alpha3bCode: "slo", Alpha2Code: "sk", English: "Slovak"}, + {Alpha3bCode: "slv", Alpha2Code: "sl", English: "Slovenian"}, + {Alpha3bCode: "sme", Alpha2Code: "se", English: "Northern Sami"}, + {Alpha3bCode: "smo", Alpha2Code: "sm", English: "Samoan"}, + {Alpha3bCode: "sna", Alpha2Code: "sn", English: "Shona"}, + {Alpha3bCode: "snd", Alpha2Code: "sd", English: "Sindhi"}, + {Alpha3bCode: "som", Alpha2Code: "so", English: "Somali"}, + {Alpha3bCode: "sot", Alpha2Code: "st", English: "Sotho, Southern"}, + {Alpha3bCode: "spa", Alpha2Code: "es", English: "Spanish; Castilian"}, + {Alpha3bCode: "srd", Alpha2Code: "sc", English: "Sardinian"}, + {Alpha3bCode: "srp", Alpha2Code: "sr", English: "Serbian"}, + {Alpha3bCode: "ssw", Alpha2Code: "ss", English: "Swati"}, + {Alpha3bCode: "sun", Alpha2Code: "su", English: "Sundanese"}, + {Alpha3bCode: "swa", Alpha2Code: "sw", English: "Swahili"}, + {Alpha3bCode: "swe", Alpha2Code: "sv", English: "Swedish"}, + {Alpha3bCode: "tah", Alpha2Code: "ty", English: "Tahitian"}, + {Alpha3bCode: "tam", Alpha2Code: "ta", English: "Tamil"}, + {Alpha3bCode: "tat", Alpha2Code: "tt", English: "Tatar"}, + {Alpha3bCode: "tel", Alpha2Code: "te", English: "Telugu"}, + {Alpha3bCode: "tgk", Alpha2Code: "tg", English: "Tajik"}, + {Alpha3bCode: "tgl", Alpha2Code: "tl", English: "Tagalog"}, + {Alpha3bCode: "tha", Alpha2Code: "th", English: "Thai"}, + {Alpha3bCode: "tib", Alpha2Code: "bo", English: "Tibetan"}, + {Alpha3bCode: "tir", Alpha2Code: "ti", English: "Tigrinya"}, + {Alpha3bCode: "ton", Alpha2Code: "to", English: "Tonga (Tonga Islands)"}, + {Alpha3bCode: "tsn", Alpha2Code: "tn", English: "Tswana"}, + {Alpha3bCode: "tso", Alpha2Code: "ts", English: "Tsonga"}, + {Alpha3bCode: "tuk", Alpha2Code: "tk", English: "Turkmen"}, + {Alpha3bCode: "tur", Alpha2Code: "tr", English: "Turkish"}, + {Alpha3bCode: "twi", Alpha2Code: "tw", English: "Twi"}, + {Alpha3bCode: "uig", Alpha2Code: "ug", English: "Uighur; Uyghur"}, + {Alpha3bCode: "ukr", Alpha2Code: "uk", English: "Ukrainian"}, + {Alpha3bCode: "urd", Alpha2Code: "ur", English: "Urdu"}, + {Alpha3bCode: "uzb", Alpha2Code: "uz", English: "Uzbek"}, + {Alpha3bCode: "ven", Alpha2Code: "ve", English: "Venda"}, + {Alpha3bCode: "vie", Alpha2Code: "vi", English: "Vietnamese"}, + {Alpha3bCode: "vol", Alpha2Code: "vo", English: "Volapük"}, + {Alpha3bCode: "wel", Alpha2Code: "cy", English: "Welsh"}, + {Alpha3bCode: "wln", Alpha2Code: "wa", English: "Walloon"}, + {Alpha3bCode: "wol", Alpha2Code: "wo", English: "Wolof"}, + {Alpha3bCode: "xho", Alpha2Code: "xh", English: "Xhosa"}, + {Alpha3bCode: "yid", Alpha2Code: "yi", English: "Yiddish"}, + {Alpha3bCode: "yor", Alpha2Code: "yo", English: "Yoruba"}, + {Alpha3bCode: "zha", Alpha2Code: "za", English: "Zhuang; Chuang"}, + {Alpha3bCode: "zul", Alpha2Code: "zu", English: "Zulu"}, +} diff --git a/vendor/github.com/asaskevich/govalidator/utils.go b/vendor/github.com/asaskevich/govalidator/utils.go new file mode 100644 index 00000000000..f4c30f824a2 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/utils.go @@ -0,0 +1,270 @@ +package govalidator + +import ( + "errors" + "fmt" + "html" + "math" + "path" + "regexp" + "strings" + "unicode" + "unicode/utf8" +) + +// Contains checks if the string contains the substring. +func Contains(str, substring string) bool { + return strings.Contains(str, substring) +} + +// Matches checks if string matches the pattern (pattern is regular expression) +// In case of error return false +func Matches(str, pattern string) bool { + match, _ := regexp.MatchString(pattern, str) + return match +} + +// LeftTrim trims characters from the left side of the input. +// If second argument is empty, it will remove leading spaces. +func LeftTrim(str, chars string) string { + if chars == "" { + return strings.TrimLeftFunc(str, unicode.IsSpace) + } + r, _ := regexp.Compile("^[" + chars + "]+") + return r.ReplaceAllString(str, "") +} + +// RightTrim trims characters from the right side of the input. +// If second argument is empty, it will remove trailing spaces. +func RightTrim(str, chars string) string { + if chars == "" { + return strings.TrimRightFunc(str, unicode.IsSpace) + } + r, _ := regexp.Compile("[" + chars + "]+$") + return r.ReplaceAllString(str, "") +} + +// Trim trims characters from both sides of the input. +// If second argument is empty, it will remove spaces. +func Trim(str, chars string) string { + return LeftTrim(RightTrim(str, chars), chars) +} + +// WhiteList removes characters that do not appear in the whitelist. +func WhiteList(str, chars string) string { + pattern := "[^" + chars + "]+" + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, "") +} + +// BlackList removes characters that appear in the blacklist. +func BlackList(str, chars string) string { + pattern := "[" + chars + "]+" + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, "") +} + +// StripLow removes characters with a numerical value < 32 and 127, mostly control characters. +// If keep_new_lines is true, newline characters are preserved (\n and \r, hex 0xA and 0xD). +func StripLow(str string, keepNewLines bool) string { + chars := "" + if keepNewLines { + chars = "\x00-\x09\x0B\x0C\x0E-\x1F\x7F" + } else { + chars = "\x00-\x1F\x7F" + } + return BlackList(str, chars) +} + +// ReplacePattern replaces regular expression pattern in string +func ReplacePattern(str, pattern, replace string) string { + r, _ := regexp.Compile(pattern) + return r.ReplaceAllString(str, replace) +} + +// Escape replaces <, >, & and " with HTML entities. +var Escape = html.EscapeString + +func addSegment(inrune, segment []rune) []rune { + if len(segment) == 0 { + return inrune + } + if len(inrune) != 0 { + inrune = append(inrune, '_') + } + inrune = append(inrune, segment...) + return inrune +} + +// UnderscoreToCamelCase converts from underscore separated form to camel case form. +// Ex.: my_func => MyFunc +func UnderscoreToCamelCase(s string) string { + return strings.Replace(strings.Title(strings.Replace(strings.ToLower(s), "_", " ", -1)), " ", "", -1) +} + +// CamelCaseToUnderscore converts from camel case form to underscore separated form. +// Ex.: MyFunc => my_func +func CamelCaseToUnderscore(str string) string { + var output []rune + var segment []rune + for _, r := range str { + + // not treat number as separate segment + if !unicode.IsLower(r) && string(r) != "_" && !unicode.IsNumber(r) { + output = addSegment(output, segment) + segment = nil + } + segment = append(segment, unicode.ToLower(r)) + } + output = addSegment(output, segment) + return string(output) +} + +// Reverse returns reversed string +func Reverse(s string) string { + r := []rune(s) + for i, j := 0, len(r)-1; i < j; i, j = i+1, j-1 { + r[i], r[j] = r[j], r[i] + } + return string(r) +} + +// GetLines splits string by "\n" and return array of lines +func GetLines(s string) []string { + return strings.Split(s, "\n") +} + +// GetLine returns specified line of multiline string +func GetLine(s string, index int) (string, error) { + lines := GetLines(s) + if index < 0 || index >= len(lines) { + return "", errors.New("line index out of bounds") + } + return lines[index], nil +} + +// RemoveTags removes all tags from HTML string +func RemoveTags(s string) string { + return ReplacePattern(s, "<[^>]*>", "") +} + +// SafeFileName returns safe string that can be used in file names +func SafeFileName(str string) string { + name := strings.ToLower(str) + name = path.Clean(path.Base(name)) + name = strings.Trim(name, " ") + separators, err := regexp.Compile(`[ &_=+:]`) + if err == nil { + name = separators.ReplaceAllString(name, "-") + } + legal, err := regexp.Compile(`[^[:alnum:]-.]`) + if err == nil { + name = legal.ReplaceAllString(name, "") + } + for strings.Contains(name, "--") { + name = strings.Replace(name, "--", "-", -1) + } + return name +} + +// NormalizeEmail canonicalize an email address. +// The local part of the email address is lowercased for all domains; the hostname is always lowercased and +// the local part of the email address is always lowercased for hosts that are known to be case-insensitive (currently only GMail). +// Normalization follows special rules for known providers: currently, GMail addresses have dots removed in the local part and +// are stripped of tags (e.g. some.one+tag@gmail.com becomes someone@gmail.com) and all @googlemail.com addresses are +// normalized to @gmail.com. +func NormalizeEmail(str string) (string, error) { + if !IsEmail(str) { + return "", fmt.Errorf("%s is not an email", str) + } + parts := strings.Split(str, "@") + parts[0] = strings.ToLower(parts[0]) + parts[1] = strings.ToLower(parts[1]) + if parts[1] == "gmail.com" || parts[1] == "googlemail.com" { + parts[1] = "gmail.com" + parts[0] = strings.Split(ReplacePattern(parts[0], `\.`, ""), "+")[0] + } + return strings.Join(parts, "@"), nil +} + +// Truncate a string to the closest length without breaking words. +func Truncate(str string, length int, ending string) string { + var aftstr, befstr string + if len(str) > length { + words := strings.Fields(str) + before, present := 0, 0 + for i := range words { + befstr = aftstr + before = present + aftstr = aftstr + words[i] + " " + present = len(aftstr) + if present > length && i != 0 { + if (length - before) < (present - length) { + return Trim(befstr, " /\\.,\"'#!?&@+-") + ending + } + return Trim(aftstr, " /\\.,\"'#!?&@+-") + ending + } + } + } + + return str +} + +// PadLeft pads left side of a string if size of string is less then indicated pad length +func PadLeft(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, true, false) +} + +// PadRight pads right side of a string if size of string is less then indicated pad length +func PadRight(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, false, true) +} + +// PadBoth pads both sides of a string if size of string is less then indicated pad length +func PadBoth(str string, padStr string, padLen int) string { + return buildPadStr(str, padStr, padLen, true, true) +} + +// PadString either left, right or both sides. +// Note that padding string can be unicode and more then one character +func buildPadStr(str string, padStr string, padLen int, padLeft bool, padRight bool) string { + + // When padded length is less then the current string size + if padLen < utf8.RuneCountInString(str) { + return str + } + + padLen -= utf8.RuneCountInString(str) + + targetLen := padLen + + targetLenLeft := targetLen + targetLenRight := targetLen + if padLeft && padRight { + targetLenLeft = padLen / 2 + targetLenRight = padLen - targetLenLeft + } + + strToRepeatLen := utf8.RuneCountInString(padStr) + + repeatTimes := int(math.Ceil(float64(targetLen) / float64(strToRepeatLen))) + repeatedString := strings.Repeat(padStr, repeatTimes) + + leftSide := "" + if padLeft { + leftSide = repeatedString[0:targetLenLeft] + } + + rightSide := "" + if padRight { + rightSide = repeatedString[0:targetLenRight] + } + + return leftSide + str + rightSide +} + +// TruncatingErrorf removes extra args from fmt.Errorf if not formatted in the str object +func TruncatingErrorf(str string, args ...interface{}) error { + n := strings.Count(str, "%s") + return fmt.Errorf(str, args[:n]...) +} diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go new file mode 100644 index 00000000000..14682e01e20 --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/validator.go @@ -0,0 +1,1524 @@ +// Package govalidator is package of validators and sanitizers for strings, structs and collections. +package govalidator + +import ( + "bytes" + "crypto/rsa" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "fmt" + "io/ioutil" + "net" + "net/url" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode" + "unicode/utf8" +) + +var ( + fieldsRequiredByDefault bool + nilPtrAllowedByRequired = false + notNumberRegexp = regexp.MustCompile("[^0-9]+") + whiteSpacesAndMinus = regexp.MustCompile(`[\s-]+`) + paramsRegexp = regexp.MustCompile(`\(.*\)$`) +) + +const maxURLRuneCount = 2083 +const minURLRuneCount = 3 +const RF3339WithoutZone = "2006-01-02T15:04:05" + +// SetFieldsRequiredByDefault causes validation to fail when struct fields +// do not include validations or are not explicitly marked as exempt (using `valid:"-"` or `valid:"email,optional"`). +// This struct definition will fail govalidator.ValidateStruct() (and the field values do not matter): +// type exampleStruct struct { +// Name string `` +// Email string `valid:"email"` +// This, however, will only fail when Email is empty or an invalid email address: +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email"` +// Lastly, this will only fail when Email is an invalid email address but not when it's empty: +// type exampleStruct2 struct { +// Name string `valid:"-"` +// Email string `valid:"email,optional"` +func SetFieldsRequiredByDefault(value bool) { + fieldsRequiredByDefault = value +} + +// SetNilPtrAllowedByRequired causes validation to pass for nil ptrs when a field is set to required. +// The validation will still reject ptr fields in their zero value state. Example with this enabled: +// type exampleStruct struct { +// Name *string `valid:"required"` +// With `Name` set to "", this will be considered invalid input and will cause a validation error. +// With `Name` set to nil, this will be considered valid by validation. +// By default this is disabled. +func SetNilPtrAllowedByRequired(value bool) { + nilPtrAllowedByRequired = value +} + +// IsEmail check if the string is an email. +func IsEmail(str string) bool { + // TODO uppercase letters are not supported + return rxEmail.MatchString(str) +} + +// IsExistingEmail check if the string is an email of existing domain +func IsExistingEmail(email string) bool { + + if len(email) < 6 || len(email) > 254 { + return false + } + at := strings.LastIndex(email, "@") + if at <= 0 || at > len(email)-3 { + return false + } + user := email[:at] + host := email[at+1:] + if len(user) > 64 { + return false + } + if userDotRegexp.MatchString(user) || !userRegexp.MatchString(user) || !hostRegexp.MatchString(host) { + return false + } + switch host { + case "localhost", "example.com": + return true + } + if _, err := net.LookupMX(host); err != nil { + if _, err := net.LookupIP(host); err != nil { + return false + } + } + + return true +} + +// IsURL check if the string is an URL. +func IsURL(str string) bool { + if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") { + return false + } + strTemp := str + if strings.Contains(str, ":") && !strings.Contains(str, "://") { + // support no indicated urlscheme but with colon for port number + // http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString + strTemp = "http://" + str + } + u, err := url.Parse(strTemp) + if err != nil { + return false + } + if strings.HasPrefix(u.Host, ".") { + return false + } + if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) { + return false + } + return rxURL.MatchString(str) +} + +// IsRequestURL check if the string rawurl, assuming +// it was received in an HTTP request, is a valid +// URL confirm to RFC 3986 +func IsRequestURL(rawurl string) bool { + url, err := url.ParseRequestURI(rawurl) + if err != nil { + return false //Couldn't even parse the rawurl + } + if len(url.Scheme) == 0 { + return false //No Scheme found + } + return true +} + +// IsRequestURI check if the string rawurl, assuming +// it was received in an HTTP request, is an +// absolute URI or an absolute path. +func IsRequestURI(rawurl string) bool { + _, err := url.ParseRequestURI(rawurl) + return err == nil +} + +// IsAlpha check if the string contains only letters (a-zA-Z). Empty string is valid. +func IsAlpha(str string) bool { + if IsNull(str) { + return true + } + return rxAlpha.MatchString(str) +} + +//IsUTFLetter check if the string contains only unicode letter characters. +//Similar to IsAlpha but for all languages. Empty string is valid. +func IsUTFLetter(str string) bool { + if IsNull(str) { + return true + } + + for _, c := range str { + if !unicode.IsLetter(c) { + return false + } + } + return true + +} + +// IsAlphanumeric check if the string contains only letters and numbers. Empty string is valid. +func IsAlphanumeric(str string) bool { + if IsNull(str) { + return true + } + return rxAlphanumeric.MatchString(str) +} + +// IsUTFLetterNumeric check if the string contains only unicode letters and numbers. Empty string is valid. +func IsUTFLetterNumeric(str string) bool { + if IsNull(str) { + return true + } + for _, c := range str { + if !unicode.IsLetter(c) && !unicode.IsNumber(c) { //letters && numbers are ok + return false + } + } + return true + +} + +// IsNumeric check if the string contains only numbers. Empty string is valid. +func IsNumeric(str string) bool { + if IsNull(str) { + return true + } + return rxNumeric.MatchString(str) +} + +// IsUTFNumeric check if the string contains only unicode numbers of any kind. +// Numbers can be 0-9 but also Fractions ¾,Roman Ⅸ and Hangzhou 〩. Empty string is valid. +func IsUTFNumeric(str string) bool { + if IsNull(str) { + return true + } + if strings.IndexAny(str, "+-") > 0 { + return false + } + if len(str) > 1 { + str = strings.TrimPrefix(str, "-") + str = strings.TrimPrefix(str, "+") + } + for _, c := range str { + if !unicode.IsNumber(c) { //numbers && minus sign are ok + return false + } + } + return true + +} + +// IsUTFDigit check if the string contains only unicode radix-10 decimal digits. Empty string is valid. +func IsUTFDigit(str string) bool { + if IsNull(str) { + return true + } + if strings.IndexAny(str, "+-") > 0 { + return false + } + if len(str) > 1 { + str = strings.TrimPrefix(str, "-") + str = strings.TrimPrefix(str, "+") + } + for _, c := range str { + if !unicode.IsDigit(c) { //digits && minus sign are ok + return false + } + } + return true + +} + +// IsHexadecimal check if the string is a hexadecimal number. +func IsHexadecimal(str string) bool { + return rxHexadecimal.MatchString(str) +} + +// IsHexcolor check if the string is a hexadecimal color. +func IsHexcolor(str string) bool { + return rxHexcolor.MatchString(str) +} + +// IsRGBcolor check if the string is a valid RGB color in form rgb(RRR, GGG, BBB). +func IsRGBcolor(str string) bool { + return rxRGBcolor.MatchString(str) +} + +// IsLowerCase check if the string is lowercase. Empty string is valid. +func IsLowerCase(str string) bool { + if IsNull(str) { + return true + } + return str == strings.ToLower(str) +} + +// IsUpperCase check if the string is uppercase. Empty string is valid. +func IsUpperCase(str string) bool { + if IsNull(str) { + return true + } + return str == strings.ToUpper(str) +} + +// HasLowerCase check if the string contains at least 1 lowercase. Empty string is valid. +func HasLowerCase(str string) bool { + if IsNull(str) { + return true + } + return rxHasLowerCase.MatchString(str) +} + +// HasUpperCase check if the string contians as least 1 uppercase. Empty string is valid. +func HasUpperCase(str string) bool { + if IsNull(str) { + return true + } + return rxHasUpperCase.MatchString(str) +} + +// IsInt check if the string is an integer. Empty string is valid. +func IsInt(str string) bool { + if IsNull(str) { + return true + } + return rxInt.MatchString(str) +} + +// IsFloat check if the string is a float. +func IsFloat(str string) bool { + return str != "" && rxFloat.MatchString(str) +} + +// IsDivisibleBy check if the string is a number that's divisible by another. +// If second argument is not valid integer or zero, it's return false. +// Otherwise, if first argument is not valid integer or zero, it's return true (Invalid string converts to zero). +func IsDivisibleBy(str, num string) bool { + f, _ := ToFloat(str) + p := int64(f) + q, _ := ToInt(num) + if q == 0 { + return false + } + return (p == 0) || (p%q == 0) +} + +// IsNull check if the string is null. +func IsNull(str string) bool { + return len(str) == 0 +} + +// IsNotNull check if the string is not null. +func IsNotNull(str string) bool { + return !IsNull(str) +} + +// HasWhitespaceOnly checks the string only contains whitespace +func HasWhitespaceOnly(str string) bool { + return len(str) > 0 && rxHasWhitespaceOnly.MatchString(str) +} + +// HasWhitespace checks if the string contains any whitespace +func HasWhitespace(str string) bool { + return len(str) > 0 && rxHasWhitespace.MatchString(str) +} + +// IsByteLength check if the string's length (in bytes) falls in a range. +func IsByteLength(str string, min, max int) bool { + return len(str) >= min && len(str) <= max +} + +// IsUUIDv3 check if the string is a UUID version 3. +func IsUUIDv3(str string) bool { + return rxUUID3.MatchString(str) +} + +// IsUUIDv4 check if the string is a UUID version 4. +func IsUUIDv4(str string) bool { + return rxUUID4.MatchString(str) +} + +// IsUUIDv5 check if the string is a UUID version 5. +func IsUUIDv5(str string) bool { + return rxUUID5.MatchString(str) +} + +// IsUUID check if the string is a UUID (version 3, 4 or 5). +func IsUUID(str string) bool { + return rxUUID.MatchString(str) +} + +// IsCreditCard check if the string is a credit card. +func IsCreditCard(str string) bool { + sanitized := notNumberRegexp.ReplaceAllString(str, "") + if !rxCreditCard.MatchString(sanitized) { + return false + } + var sum int64 + var digit string + var tmpNum int64 + var shouldDouble bool + for i := len(sanitized) - 1; i >= 0; i-- { + digit = sanitized[i:(i + 1)] + tmpNum, _ = ToInt(digit) + if shouldDouble { + tmpNum *= 2 + if tmpNum >= 10 { + sum += ((tmpNum % 10) + 1) + } else { + sum += tmpNum + } + } else { + sum += tmpNum + } + shouldDouble = !shouldDouble + } + + return sum%10 == 0 +} + +// IsISBN10 check if the string is an ISBN version 10. +func IsISBN10(str string) bool { + return IsISBN(str, 10) +} + +// IsISBN13 check if the string is an ISBN version 13. +func IsISBN13(str string) bool { + return IsISBN(str, 13) +} + +// IsISBN check if the string is an ISBN (version 10 or 13). +// If version value is not equal to 10 or 13, it will be check both variants. +func IsISBN(str string, version int) bool { + sanitized := whiteSpacesAndMinus.ReplaceAllString(str, "") + var checksum int32 + var i int32 + if version == 10 { + if !rxISBN10.MatchString(sanitized) { + return false + } + for i = 0; i < 9; i++ { + checksum += (i + 1) * int32(sanitized[i]-'0') + } + if sanitized[9] == 'X' { + checksum += 10 * 10 + } else { + checksum += 10 * int32(sanitized[9]-'0') + } + if checksum%11 == 0 { + return true + } + return false + } else if version == 13 { + if !rxISBN13.MatchString(sanitized) { + return false + } + factor := []int32{1, 3} + for i = 0; i < 12; i++ { + checksum += factor[i%2] * int32(sanitized[i]-'0') + } + return (int32(sanitized[12]-'0'))-((10-(checksum%10))%10) == 0 + } + return IsISBN(str, 10) || IsISBN(str, 13) +} + +// IsJSON check if the string is valid JSON (note: uses json.Unmarshal). +func IsJSON(str string) bool { + var js json.RawMessage + return json.Unmarshal([]byte(str), &js) == nil +} + +// IsMultibyte check if the string contains one or more multibyte chars. Empty string is valid. +func IsMultibyte(str string) bool { + if IsNull(str) { + return true + } + return rxMultibyte.MatchString(str) +} + +// IsASCII check if the string contains ASCII chars only. Empty string is valid. +func IsASCII(str string) bool { + if IsNull(str) { + return true + } + return rxASCII.MatchString(str) +} + +// IsPrintableASCII check if the string contains printable ASCII chars only. Empty string is valid. +func IsPrintableASCII(str string) bool { + if IsNull(str) { + return true + } + return rxPrintableASCII.MatchString(str) +} + +// IsFullWidth check if the string contains any full-width chars. Empty string is valid. +func IsFullWidth(str string) bool { + if IsNull(str) { + return true + } + return rxFullWidth.MatchString(str) +} + +// IsHalfWidth check if the string contains any half-width chars. Empty string is valid. +func IsHalfWidth(str string) bool { + if IsNull(str) { + return true + } + return rxHalfWidth.MatchString(str) +} + +// IsVariableWidth check if the string contains a mixture of full and half-width chars. Empty string is valid. +func IsVariableWidth(str string) bool { + if IsNull(str) { + return true + } + return rxHalfWidth.MatchString(str) && rxFullWidth.MatchString(str) +} + +// IsBase64 check if a string is base64 encoded. +func IsBase64(str string) bool { + return rxBase64.MatchString(str) +} + +// IsFilePath check is a string is Win or Unix file path and returns it's type. +func IsFilePath(str string) (bool, int) { + if rxWinPath.MatchString(str) { + //check windows path limit see: + // http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath + if len(str[3:]) > 32767 { + return false, Win + } + return true, Win + } else if rxUnixPath.MatchString(str) { + return true, Unix + } + return false, Unknown +} + +// IsDataURI checks if a string is base64 encoded data URI such as an image +func IsDataURI(str string) bool { + dataURI := strings.Split(str, ",") + if !rxDataURI.MatchString(dataURI[0]) { + return false + } + return IsBase64(dataURI[1]) +} + +// IsMagnetURI checks if a string is valid magnet URI +func IsMagnetURI(str string) bool { + return rxMagnetURI.MatchString(str) +} + +// IsISO3166Alpha2 checks if a string is valid two-letter country code +func IsISO3166Alpha2(str string) bool { + for _, entry := range ISO3166List { + if str == entry.Alpha2Code { + return true + } + } + return false +} + +// IsISO3166Alpha3 checks if a string is valid three-letter country code +func IsISO3166Alpha3(str string) bool { + for _, entry := range ISO3166List { + if str == entry.Alpha3Code { + return true + } + } + return false +} + +// IsISO693Alpha2 checks if a string is valid two-letter language code +func IsISO693Alpha2(str string) bool { + for _, entry := range ISO693List { + if str == entry.Alpha2Code { + return true + } + } + return false +} + +// IsISO693Alpha3b checks if a string is valid three-letter language code +func IsISO693Alpha3b(str string) bool { + for _, entry := range ISO693List { + if str == entry.Alpha3bCode { + return true + } + } + return false +} + +// IsDNSName will validate the given string as a DNS name +func IsDNSName(str string) bool { + if str == "" || len(strings.Replace(str, ".", "", -1)) > 255 { + // constraints already violated + return false + } + return !IsIP(str) && rxDNSName.MatchString(str) +} + +// IsHash checks if a string is a hash of type algorithm. +// Algorithm is one of ['md4', 'md5', 'sha1', 'sha256', 'sha384', 'sha512', 'ripemd128', 'ripemd160', 'tiger128', 'tiger160', 'tiger192', 'crc32', 'crc32b'] +func IsHash(str string, algorithm string) bool { + len := "0" + algo := strings.ToLower(algorithm) + + if algo == "crc32" || algo == "crc32b" { + len = "8" + } else if algo == "md5" || algo == "md4" || algo == "ripemd128" || algo == "tiger128" { + len = "32" + } else if algo == "sha1" || algo == "ripemd160" || algo == "tiger160" { + len = "40" + } else if algo == "tiger192" { + len = "48" + } else if algo == "sha256" { + len = "64" + } else if algo == "sha384" { + len = "96" + } else if algo == "sha512" { + len = "128" + } else { + return false + } + + return Matches(str, "^[a-f0-9]{"+len+"}$") +} + +// IsSHA512 checks is a string is a SHA512 hash. Alias for `IsHash(str, "sha512")` +func IsSHA512(str string) bool { + return IsHash(str, "sha512") +} + +// IsSHA384 checks is a string is a SHA384 hash. Alias for `IsHash(str, "sha384")` +func IsSHA384(str string) bool { + return IsHash(str, "sha384") +} + +// IsSHA256 checks is a string is a SHA256 hash. Alias for `IsHash(str, "sha256")` +func IsSHA256(str string) bool { + return IsHash(str, "sha256") +} + +// IsTiger192 checks is a string is a Tiger192 hash. Alias for `IsHash(str, "tiger192")` +func IsTiger192(str string) bool { + return IsHash(str, "tiger192") +} + +// IsTiger160 checks is a string is a Tiger160 hash. Alias for `IsHash(str, "tiger160")` +func IsTiger160(str string) bool { + return IsHash(str, "tiger160") +} + +// IsRipeMD160 checks is a string is a RipeMD160 hash. Alias for `IsHash(str, "ripemd160")` +func IsRipeMD160(str string) bool { + return IsHash(str, "ripemd160") +} + +// IsSHA1 checks is a string is a SHA-1 hash. Alias for `IsHash(str, "sha1")` +func IsSHA1(str string) bool { + return IsHash(str, "sha1") +} + +// IsTiger128 checks is a string is a Tiger128 hash. Alias for `IsHash(str, "tiger128")` +func IsTiger128(str string) bool { + return IsHash(str, "tiger128") +} + +// IsRipeMD128 checks is a string is a RipeMD128 hash. Alias for `IsHash(str, "ripemd128")` +func IsRipeMD128(str string) bool { + return IsHash(str, "ripemd128") +} + +// IsCRC32 checks is a string is a CRC32 hash. Alias for `IsHash(str, "crc32")` +func IsCRC32(str string) bool { + return IsHash(str, "crc32") +} + +// IsCRC32b checks is a string is a CRC32b hash. Alias for `IsHash(str, "crc32b")` +func IsCRC32b(str string) bool { + return IsHash(str, "crc32b") +} + +// IsMD5 checks is a string is a MD5 hash. Alias for `IsHash(str, "md5")` +func IsMD5(str string) bool { + return IsHash(str, "md5") +} + +// IsMD4 checks is a string is a MD4 hash. Alias for `IsHash(str, "md4")` +func IsMD4(str string) bool { + return IsHash(str, "md4") +} + +// IsDialString validates the given string for usage with the various Dial() functions +func IsDialString(str string) bool { + if h, p, err := net.SplitHostPort(str); err == nil && h != "" && p != "" && (IsDNSName(h) || IsIP(h)) && IsPort(p) { + return true + } + + return false +} + +// IsIP checks if a string is either IP version 4 or 6. Alias for `net.ParseIP` +func IsIP(str string) bool { + return net.ParseIP(str) != nil +} + +// IsPort checks if a string represents a valid port +func IsPort(str string) bool { + if i, err := strconv.Atoi(str); err == nil && i > 0 && i < 65536 { + return true + } + return false +} + +// IsIPv4 check if the string is an IP version 4. +func IsIPv4(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ".") +} + +// IsIPv6 check if the string is an IP version 6. +func IsIPv6(str string) bool { + ip := net.ParseIP(str) + return ip != nil && strings.Contains(str, ":") +} + +// IsCIDR check if the string is an valid CIDR notiation (IPV4 & IPV6) +func IsCIDR(str string) bool { + _, _, err := net.ParseCIDR(str) + return err == nil +} + +// IsMAC check if a string is valid MAC address. +// Possible MAC formats: +// 01:23:45:67:89:ab +// 01:23:45:67:89:ab:cd:ef +// 01-23-45-67-89-ab +// 01-23-45-67-89-ab-cd-ef +// 0123.4567.89ab +// 0123.4567.89ab.cdef +func IsMAC(str string) bool { + _, err := net.ParseMAC(str) + return err == nil +} + +// IsHost checks if the string is a valid IP (both v4 and v6) or a valid DNS name +func IsHost(str string) bool { + return IsIP(str) || IsDNSName(str) +} + +// IsMongoID check if the string is a valid hex-encoded representation of a MongoDB ObjectId. +func IsMongoID(str string) bool { + return rxHexadecimal.MatchString(str) && (len(str) == 24) +} + +// IsLatitude check if a string is valid latitude. +func IsLatitude(str string) bool { + return rxLatitude.MatchString(str) +} + +// IsLongitude check if a string is valid longitude. +func IsLongitude(str string) bool { + return rxLongitude.MatchString(str) +} + +// IsRsaPublicKey check if a string is valid public key with provided length +func IsRsaPublicKey(str string, keylen int) bool { + bb := bytes.NewBufferString(str) + pemBytes, err := ioutil.ReadAll(bb) + if err != nil { + return false + } + block, _ := pem.Decode(pemBytes) + if block != nil && block.Type != "PUBLIC KEY" { + return false + } + var der []byte + + if block != nil { + der = block.Bytes + } else { + der, err = base64.StdEncoding.DecodeString(str) + if err != nil { + return false + } + } + + key, err := x509.ParsePKIXPublicKey(der) + if err != nil { + return false + } + pubkey, ok := key.(*rsa.PublicKey) + if !ok { + return false + } + bitlen := len(pubkey.N.Bytes()) * 8 + return bitlen == int(keylen) +} + +func toJSONName(tag string) string { + if tag == "" { + return "" + } + + // JSON name always comes first. If there's no options then split[0] is + // JSON name, if JSON name is not set, then split[0] is an empty string. + split := strings.SplitN(tag, ",", 2) + + name := split[0] + + // However it is possible that the field is skipped when + // (de-)serializing from/to JSON, in which case assume that there is no + // tag name to use + if name == "-" { + return "" + } + return name +} + +func PrependPathToErrors(err error, path string) error { + switch err2 := err.(type) { + case Error: + err2.Path = append([]string{path}, err2.Path...) + return err2 + case Errors: + errors := err2.Errors() + for i, err3 := range errors { + errors[i] = PrependPathToErrors(err3, path) + } + return err2 + } + return err +} + +// ValidateMap use validation map for fields. +// result will be equal to `false` if there are any errors. +// m is the validation map in the form +// map[string]interface{}{"name":"required,alpha","address":map[string]interface{}{"line1":"required,alphanum"}} +func ValidateMap(s map[string]interface{}, m map[string]interface{}) (bool, error) { + if s == nil { + return true, nil + } + result := true + var err error + var errs Errors + var index int + val := reflect.ValueOf(s) + for key, value := range s { + presentResult := true + validator, ok := m[key] + if !ok { + presentResult = false + var err error + err = fmt.Errorf("all map keys has to be present in the validation map; got %s", key) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + valueField := reflect.ValueOf(value) + mapResult := true + typeResult := true + structResult := true + resultField := true + switch subValidator := validator.(type) { + case map[string]interface{}: + var err error + if v, ok := value.(map[string]interface{}); !ok { + mapResult = false + err = fmt.Errorf("map validator has to be for the map type only; got %s", valueField.Type().String()) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } else { + mapResult, err = ValidateMap(v, subValidator) + if err != nil { + mapResult = false + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + } + case string: + if (valueField.Kind() == reflect.Struct || + (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && + subValidator != "-" { + var err error + structResult, err = ValidateStruct(valueField.Interface()) + if err != nil { + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + } + resultField, err = typeCheck(valueField, reflect.StructField{ + Name: key, + PkgPath: "", + Type: val.Type(), + Tag: reflect.StructTag(fmt.Sprintf("%s:%q", tagName, subValidator)), + Offset: 0, + Index: []int{index}, + Anonymous: false, + }, val, nil) + if err != nil { + errs = append(errs, err) + } + case nil: + // already handlerd when checked before + default: + typeResult = false + err = fmt.Errorf("map validator has to be either map[string]interface{} or string; got %s", valueField.Type().String()) + err = PrependPathToErrors(err, key) + errs = append(errs, err) + } + result = result && presentResult && typeResult && resultField && structResult && mapResult + index++ + } + // check required keys + requiredResult := true + for key, value := range m { + if schema, ok := value.(string); ok { + tags := parseTagIntoMap(schema) + if required, ok := tags["required"]; ok { + if _, ok := s[key]; !ok { + requiredResult = false + if required.customErrorMessage != "" { + err = Error{key, fmt.Errorf(required.customErrorMessage), true, "required", []string{}} + } else { + err = Error{key, fmt.Errorf("required field missing"), false, "required", []string{}} + } + errs = append(errs, err) + } + } + } + } + + if len(errs) > 0 { + err = errs + } + return result && requiredResult, err +} + +// ValidateStruct use tags for fields. +// result will be equal to `false` if there are any errors. +// todo currently there is no guarantee that errors will be returned in predictable order (tests may to fail) +func ValidateStruct(s interface{}) (bool, error) { + if s == nil { + return true, nil + } + result := true + var err error + val := reflect.ValueOf(s) + if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { + val = val.Elem() + } + // we only accept structs + if val.Kind() != reflect.Struct { + return false, fmt.Errorf("function only accepts structs; got %s", val.Kind()) + } + var errs Errors + for i := 0; i < val.NumField(); i++ { + valueField := val.Field(i) + typeField := val.Type().Field(i) + if typeField.PkgPath != "" { + continue // Private field + } + structResult := true + if valueField.Kind() == reflect.Interface { + valueField = valueField.Elem() + } + if (valueField.Kind() == reflect.Struct || + (valueField.Kind() == reflect.Ptr && valueField.Elem().Kind() == reflect.Struct)) && + typeField.Tag.Get(tagName) != "-" { + var err error + structResult, err = ValidateStruct(valueField.Interface()) + if err != nil { + err = PrependPathToErrors(err, typeField.Name) + errs = append(errs, err) + } + } + resultField, err2 := typeCheck(valueField, typeField, val, nil) + if err2 != nil { + + // Replace structure name with JSON name if there is a tag on the variable + jsonTag := toJSONName(typeField.Tag.Get("json")) + if jsonTag != "" { + switch jsonError := err2.(type) { + case Error: + jsonError.Name = jsonTag + err2 = jsonError + case Errors: + for i2, err3 := range jsonError { + switch customErr := err3.(type) { + case Error: + customErr.Name = jsonTag + jsonError[i2] = customErr + } + } + + err2 = jsonError + } + } + + errs = append(errs, err2) + } + result = result && resultField && structResult + } + if len(errs) > 0 { + err = errs + } + return result, err +} + +// parseTagIntoMap parses a struct tag `valid:required~Some error message,length(2|3)` into map[string]string{"required": "Some error message", "length(2|3)": ""} +func parseTagIntoMap(tag string) tagOptionsMap { + optionsMap := make(tagOptionsMap) + options := strings.Split(tag, ",") + + for i, option := range options { + option = strings.TrimSpace(option) + + validationOptions := strings.Split(option, "~") + if !isValidTag(validationOptions[0]) { + continue + } + if len(validationOptions) == 2 { + optionsMap[validationOptions[0]] = tagOption{validationOptions[0], validationOptions[1], i} + } else { + optionsMap[validationOptions[0]] = tagOption{validationOptions[0], "", i} + } + } + return optionsMap +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("\\'\"!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +// IsSSN will validate the given string as a U.S. Social Security Number +func IsSSN(str string) bool { + if str == "" || len(str) != 11 { + return false + } + return rxSSN.MatchString(str) +} + +// IsSemver check if string is valid semantic version +func IsSemver(str string) bool { + return rxSemver.MatchString(str) +} + +// IsType check if interface is of some type +func IsType(v interface{}, params ...string) bool { + if len(params) == 1 { + typ := params[0] + return strings.Replace(reflect.TypeOf(v).String(), " ", "", -1) == strings.Replace(typ, " ", "", -1) + } + return false +} + +// IsTime check if string is valid according to given format +func IsTime(str string, format string) bool { + _, err := time.Parse(format, str) + return err == nil +} + +// IsUnixTime check if string is valid unix timestamp value +func IsUnixTime(str string) bool { + if _, err := strconv.Atoi(str); err == nil { + return true + } + return false +} + +// IsRFC3339 check if string is valid timestamp value according to RFC3339 +func IsRFC3339(str string) bool { + return IsTime(str, time.RFC3339) +} + +// IsRFC3339WithoutZone check if string is valid timestamp value according to RFC3339 which excludes the timezone. +func IsRFC3339WithoutZone(str string) bool { + return IsTime(str, RF3339WithoutZone) +} + +// IsISO4217 check if string is valid ISO currency code +func IsISO4217(str string) bool { + for _, currency := range ISO4217List { + if str == currency { + return true + } + } + + return false +} + +// ByteLength check string's length +func ByteLength(str string, params ...string) bool { + if len(params) == 2 { + min, _ := ToInt(params[0]) + max, _ := ToInt(params[1]) + return len(str) >= int(min) && len(str) <= int(max) + } + + return false +} + +// RuneLength check string's length +// Alias for StringLength +func RuneLength(str string, params ...string) bool { + return StringLength(str, params...) +} + +// IsRsaPub check whether string is valid RSA key +// Alias for IsRsaPublicKey +func IsRsaPub(str string, params ...string) bool { + if len(params) == 1 { + len, _ := ToInt(params[0]) + return IsRsaPublicKey(str, int(len)) + } + + return false +} + +// StringMatches checks if a string matches a given pattern. +func StringMatches(s string, params ...string) bool { + if len(params) == 1 { + pattern := params[0] + return Matches(s, pattern) + } + return false +} + +// StringLength check string's length (including multi byte strings) +func StringLength(str string, params ...string) bool { + + if len(params) == 2 { + strLength := utf8.RuneCountInString(str) + min, _ := ToInt(params[0]) + max, _ := ToInt(params[1]) + return strLength >= int(min) && strLength <= int(max) + } + + return false +} + +// MinStringLength check string's minimum length (including multi byte strings) +func MinStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + min, _ := ToInt(params[0]) + return strLength >= int(min) + } + + return false +} + +// MaxStringLength check string's maximum length (including multi byte strings) +func MaxStringLength(str string, params ...string) bool { + + if len(params) == 1 { + strLength := utf8.RuneCountInString(str) + max, _ := ToInt(params[0]) + return strLength <= int(max) + } + + return false +} + +// Range check string's length +func Range(str string, params ...string) bool { + if len(params) == 2 { + value, _ := ToFloat(str) + min, _ := ToFloat(params[0]) + max, _ := ToFloat(params[1]) + return InRange(value, min, max) + } + + return false +} + +func IsInRaw(str string, params ...string) bool { + if len(params) == 1 { + rawParams := params[0] + + parsedParams := strings.Split(rawParams, "|") + + return IsIn(str, parsedParams...) + } + + return false +} + +// IsIn check if string str is a member of the set of strings params +func IsIn(str string, params ...string) bool { + for _, param := range params { + if str == param { + return true + } + } + + return false +} + +func checkRequired(v reflect.Value, t reflect.StructField, options tagOptionsMap) (bool, error) { + if nilPtrAllowedByRequired { + k := v.Kind() + if (k == reflect.Ptr || k == reflect.Interface) && v.IsNil() { + return true, nil + } + } + + if requiredOption, isRequired := options["required"]; isRequired { + if len(requiredOption.customErrorMessage) > 0 { + return false, Error{t.Name, fmt.Errorf(requiredOption.customErrorMessage), true, "required", []string{}} + } + return false, Error{t.Name, fmt.Errorf("non zero value required"), false, "required", []string{}} + } else if _, isOptional := options["optional"]; fieldsRequiredByDefault && !isOptional { + return false, Error{t.Name, fmt.Errorf("Missing required field"), false, "required", []string{}} + } + // not required and empty is valid + return true, nil +} + +func typeCheck(v reflect.Value, t reflect.StructField, o reflect.Value, options tagOptionsMap) (isValid bool, resultErr error) { + if !v.IsValid() { + return false, nil + } + + tag := t.Tag.Get(tagName) + + // Check if the field should be ignored + switch tag { + case "": + if v.Kind() != reflect.Slice && v.Kind() != reflect.Map { + if !fieldsRequiredByDefault { + return true, nil + } + return false, Error{t.Name, fmt.Errorf("All fields are required to at least have one validation defined"), false, "required", []string{}} + } + case "-": + return true, nil + } + + isRootType := false + if options == nil { + isRootType = true + options = parseTagIntoMap(tag) + } + + if !isFieldSet(v) { + // an empty value is not validated, check only required + isValid, resultErr = checkRequired(v, t, options) + for key := range options { + delete(options, key) + } + return isValid, resultErr + } + + var customTypeErrors Errors + optionsOrder := options.orderedKeys() + for _, validatorName := range optionsOrder { + validatorStruct := options[validatorName] + if validatefunc, ok := CustomTypeTagMap.Get(validatorName); ok { + delete(options, validatorName) + + if result := validatefunc(v.Interface(), o.Interface()); !result { + if len(validatorStruct.customErrorMessage) > 0 { + customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: TruncatingErrorf(validatorStruct.customErrorMessage, fmt.Sprint(v), validatorName), CustomErrorMessageExists: true, Validator: stripParams(validatorName)}) + continue + } + customTypeErrors = append(customTypeErrors, Error{Name: t.Name, Err: fmt.Errorf("%s does not validate as %s", fmt.Sprint(v), validatorName), CustomErrorMessageExists: false, Validator: stripParams(validatorName)}) + } + } + } + + if len(customTypeErrors.Errors()) > 0 { + return false, customTypeErrors + } + + if isRootType { + // Ensure that we've checked the value by all specified validators before report that the value is valid + defer func() { + delete(options, "optional") + delete(options, "required") + + if isValid && resultErr == nil && len(options) != 0 { + optionsOrder := options.orderedKeys() + for _, validator := range optionsOrder { + isValid = false + resultErr = Error{t.Name, fmt.Errorf( + "The following validator is invalid or can't be applied to the field: %q", validator), false, stripParams(validator), []string{}} + return + } + } + }() + } + + for _, validatorSpec := range optionsOrder { + validatorStruct := options[validatorSpec] + var negate bool + validator := validatorSpec + customMsgExists := len(validatorStruct.customErrorMessage) > 0 + + // Check whether the tag looks like '!something' or 'something' + if validator[0] == '!' { + validator = validator[1:] + negate = true + } + + // Check for interface param validators + for key, value := range InterfaceParamTagRegexMap { + ps := value.FindStringSubmatch(validator) + if len(ps) == 0 { + continue + } + + validatefunc, ok := InterfaceParamTagMap[key] + if !ok { + continue + } + + delete(options, validatorSpec) + + field := fmt.Sprint(v) + if result := validatefunc(v.Interface(), ps[1:]...); (!result && !negate) || (result && negate) { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + } + } + + switch v.Kind() { + case reflect.Bool, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Float32, reflect.Float64, + reflect.String: + // for each tag option check the map of validator functions + for _, validatorSpec := range optionsOrder { + validatorStruct := options[validatorSpec] + var negate bool + validator := validatorSpec + customMsgExists := len(validatorStruct.customErrorMessage) > 0 + + // Check whether the tag looks like '!something' or 'something' + if validator[0] == '!' { + validator = validator[1:] + negate = true + } + + // Check for param validators + for key, value := range ParamTagRegexMap { + ps := value.FindStringSubmatch(validator) + if len(ps) == 0 { + continue + } + + validatefunc, ok := ParamTagMap[key] + if !ok { + continue + } + + delete(options, validatorSpec) + + switch v.Kind() { + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + + field := fmt.Sprint(v) // make value into string, then validate with regex + if result := validatefunc(field, ps[1:]...); (!result && !negate) || (result && negate) { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + default: + // type not yet supported, fail + return false, Error{t.Name, fmt.Errorf("Validator %s doesn't support kind %s", validator, v.Kind()), false, stripParams(validatorSpec), []string{}} + } + } + + if validatefunc, ok := TagMap[validator]; ok { + delete(options, validatorSpec) + + switch v.Kind() { + case reflect.String, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, + reflect.Float32, reflect.Float64: + field := fmt.Sprint(v) // make value into string, then validate with regex + if result := validatefunc(field); !result && !negate || result && negate { + if customMsgExists { + return false, Error{t.Name, TruncatingErrorf(validatorStruct.customErrorMessage, field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + if negate { + return false, Error{t.Name, fmt.Errorf("%s does validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + return false, Error{t.Name, fmt.Errorf("%s does not validate as %s", field, validator), customMsgExists, stripParams(validatorSpec), []string{}} + } + default: + //Not Yet Supported Types (Fail here!) + err := fmt.Errorf("Validator %s doesn't support kind %s for value %v", validator, v.Kind(), v) + return false, Error{t.Name, err, false, stripParams(validatorSpec), []string{}} + } + } + } + return true, nil + case reflect.Map: + if v.Type().Key().Kind() != reflect.String { + return false, &UnsupportedTypeError{v.Type()} + } + var sv stringValues + sv = v.MapKeys() + sort.Sort(sv) + result := true + for i, k := range sv { + var resultItem bool + var err error + if v.MapIndex(k).Kind() != reflect.Struct { + resultItem, err = typeCheck(v.MapIndex(k), t, o, options) + if err != nil { + return false, err + } + } else { + resultItem, err = ValidateStruct(v.MapIndex(k).Interface()) + if err != nil { + err = PrependPathToErrors(err, t.Name+"."+sv[i].Interface().(string)) + return false, err + } + } + result = result && resultItem + } + return result, nil + case reflect.Slice, reflect.Array: + result := true + for i := 0; i < v.Len(); i++ { + var resultItem bool + var err error + if v.Index(i).Kind() != reflect.Struct { + resultItem, err = typeCheck(v.Index(i), t, o, options) + if err != nil { + return false, err + } + } else { + resultItem, err = ValidateStruct(v.Index(i).Interface()) + if err != nil { + err = PrependPathToErrors(err, t.Name+"."+strconv.Itoa(i)) + return false, err + } + } + result = result && resultItem + } + return result, nil + case reflect.Interface: + // If the value is an interface then encode its element + if v.IsNil() { + return true, nil + } + return ValidateStruct(v.Interface()) + case reflect.Ptr: + // If the value is a pointer then check its element + if v.IsNil() { + return true, nil + } + return typeCheck(v.Elem(), t, o, options) + case reflect.Struct: + return true, nil + default: + return false, &UnsupportedTypeError{v.Type()} + } +} + +func stripParams(validatorString string) string { + return paramsRegexp.ReplaceAllString(validatorString, "") +} + +// isFieldSet returns false for nil pointers, interfaces, maps, and slices. For all other values, it returns true. +func isFieldSet(v reflect.Value) bool { + switch v.Kind() { + case reflect.Map, reflect.Slice, reflect.Interface, reflect.Ptr: + return !v.IsNil() + } + + return true +} + +// ErrorByField returns error for specified field of the struct +// validated by ValidateStruct or empty string if there are no errors +// or this field doesn't exists or doesn't have any errors. +func ErrorByField(e error, field string) string { + if e == nil { + return "" + } + return ErrorsByField(e)[field] +} + +// ErrorsByField returns map of errors of the struct validated +// by ValidateStruct or empty map if there are no errors. +func ErrorsByField(e error) map[string]string { + m := make(map[string]string) + if e == nil { + return m + } + // prototype for ValidateStruct + + switch e.(type) { + case Error: + m[e.(Error).Name] = e.(Error).Err.Error() + case Errors: + for _, item := range e.(Errors).Errors() { + n := ErrorsByField(item) + for k, v := range n { + m[k] = v + } + } + } + + return m +} + +// Error returns string equivalent for reflect.Type +func (e *UnsupportedTypeError) Error() string { + return "validator: unsupported type: " + e.Type.String() +} + +func (sv stringValues) Len() int { return len(sv) } +func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } +func (sv stringValues) Less(i, j int) bool { return sv.get(i) < sv.get(j) } +func (sv stringValues) get(i int) string { return sv[i].String() } diff --git a/vendor/github.com/asaskevich/govalidator/wercker.yml b/vendor/github.com/asaskevich/govalidator/wercker.yml new file mode 100644 index 00000000000..bc5f7b0864b --- /dev/null +++ b/vendor/github.com/asaskevich/govalidator/wercker.yml @@ -0,0 +1,15 @@ +box: golang +build: + steps: + - setup-go-workspace + + - script: + name: go get + code: | + go version + go get -t ./... + + - script: + name: go test + code: | + go test -race -v ./... diff --git a/vendor/github.com/cenkalti/backoff/.gitignore b/vendor/github.com/cenkalti/backoff/.gitignore new file mode 100644 index 00000000000..00268614f04 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/.gitignore @@ -0,0 +1,22 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe diff --git a/vendor/github.com/cenkalti/backoff/.travis.yml b/vendor/github.com/cenkalti/backoff/.travis.yml new file mode 100644 index 00000000000..871150c4672 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/.travis.yml @@ -0,0 +1,10 @@ +language: go +go: + - 1.12 + - 1.x + - tip +before_install: + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover +script: + - $HOME/gopath/bin/goveralls -service=travis-ci diff --git a/vendor/github.com/cenkalti/backoff/LICENSE b/vendor/github.com/cenkalti/backoff/LICENSE new file mode 100644 index 00000000000..89b81799655 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Cenk Altı + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/cenkalti/backoff/README.md b/vendor/github.com/cenkalti/backoff/README.md new file mode 100644 index 00000000000..cabfc9c7017 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/README.md @@ -0,0 +1,33 @@ +# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Build Status][travis image]][travis] [![Coverage Status][coveralls image]][coveralls] + +This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client]. + +[Exponential backoff][exponential backoff wiki] +is an algorithm that uses feedback to multiplicatively decrease the rate of some process, +in order to gradually find an acceptable rate. +The retries exponentially increase and stop increasing when a certain threshold is met. + +## Usage + +Import path is `github.com/cenkalti/backoff/v4`. Please note the version part at the end. + +godoc.org does not support modules yet, +so you can use https://godoc.org/gopkg.in/cenkalti/backoff.v4 to view the documentation. + +## Contributing + +* I would like to keep this library as small as possible. +* Please don't send a PR without opening an issue and discussing it first. +* If proposed change is not a common use case, I will probably not accept it. + +[godoc]: https://godoc.org/github.com/cenkalti/backoff +[godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png +[travis]: https://travis-ci.org/cenkalti/backoff +[travis image]: https://travis-ci.org/cenkalti/backoff.png?branch=master +[coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master +[coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master + +[google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java +[exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff + +[advanced example]: https://godoc.org/github.com/cenkalti/backoff#example_ diff --git a/vendor/github.com/cenkalti/backoff/backoff.go b/vendor/github.com/cenkalti/backoff/backoff.go new file mode 100644 index 00000000000..3676ee405d8 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/backoff.go @@ -0,0 +1,66 @@ +// Package backoff implements backoff algorithms for retrying operations. +// +// Use Retry function for retrying operations that may fail. +// If Retry does not meet your needs, +// copy/paste the function into your project and modify as you wish. +// +// There is also Ticker type similar to time.Ticker. +// You can use it if you need to work with channels. +// +// See Examples section below for usage examples. +package backoff + +import "time" + +// BackOff is a backoff policy for retrying an operation. +type BackOff interface { + // NextBackOff returns the duration to wait before retrying the operation, + // or backoff. Stop to indicate that no more retries should be made. + // + // Example usage: + // + // duration := backoff.NextBackOff(); + // if (duration == backoff.Stop) { + // // Do not retry operation. + // } else { + // // Sleep for duration and retry operation. + // } + // + NextBackOff() time.Duration + + // Reset to initial state. + Reset() +} + +// Stop indicates that no more retries should be made for use in NextBackOff(). +const Stop time.Duration = -1 + +// ZeroBackOff is a fixed backoff policy whose backoff time is always zero, +// meaning that the operation is retried immediately without waiting, indefinitely. +type ZeroBackOff struct{} + +func (b *ZeroBackOff) Reset() {} + +func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 } + +// StopBackOff is a fixed backoff policy that always returns backoff.Stop for +// NextBackOff(), meaning that the operation should never be retried. +type StopBackOff struct{} + +func (b *StopBackOff) Reset() {} + +func (b *StopBackOff) NextBackOff() time.Duration { return Stop } + +// ConstantBackOff is a backoff policy that always returns the same backoff delay. +// This is in contrast to an exponential backoff policy, +// which returns a delay that grows longer as you call NextBackOff() over and over again. +type ConstantBackOff struct { + Interval time.Duration +} + +func (b *ConstantBackOff) Reset() {} +func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval } + +func NewConstantBackOff(d time.Duration) *ConstantBackOff { + return &ConstantBackOff{Interval: d} +} diff --git a/vendor/github.com/cenkalti/backoff/context.go b/vendor/github.com/cenkalti/backoff/context.go new file mode 100644 index 00000000000..fcff86c1b3d --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/context.go @@ -0,0 +1,66 @@ +package backoff + +import ( + "context" + "time" +) + +// BackOffContext is a backoff policy that stops retrying after the context +// is canceled. +type BackOffContext interface { // nolint: golint + BackOff + Context() context.Context +} + +type backOffContext struct { + BackOff + ctx context.Context +} + +// WithContext returns a BackOffContext with context ctx +// +// ctx must not be nil +func WithContext(b BackOff, ctx context.Context) BackOffContext { // nolint: golint + if ctx == nil { + panic("nil context") + } + + if b, ok := b.(*backOffContext); ok { + return &backOffContext{ + BackOff: b.BackOff, + ctx: ctx, + } + } + + return &backOffContext{ + BackOff: b, + ctx: ctx, + } +} + +func getContext(b BackOff) context.Context { + if cb, ok := b.(BackOffContext); ok { + return cb.Context() + } + if tb, ok := b.(*backOffTries); ok { + return getContext(tb.delegate) + } + return context.Background() +} + +func (b *backOffContext) Context() context.Context { + return b.ctx +} + +func (b *backOffContext) NextBackOff() time.Duration { + select { + case <-b.ctx.Done(): + return Stop + default: + } + next := b.BackOff.NextBackOff() + if deadline, ok := b.ctx.Deadline(); ok && deadline.Sub(time.Now()) < next { // nolint: gosimple + return Stop + } + return next +} diff --git a/vendor/github.com/cenkalti/backoff/exponential.go b/vendor/github.com/cenkalti/backoff/exponential.go new file mode 100644 index 00000000000..fae5b6c3275 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/exponential.go @@ -0,0 +1,156 @@ +package backoff + +import ( + "math/rand" + "time" +) + +/* +ExponentialBackOff is a backoff implementation that increases the backoff +period for each retry attempt using a randomization function that grows exponentially. + +NextBackOff() is calculated using the following formula: + + randomized interval = + RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) + +In other words NextBackOff() will range between the randomization factor +percentage below and above the retry interval. + +For example, given the following parameters: + + RetryInterval = 2 + RandomizationFactor = 0.5 + Multiplier = 2 + +the actual backoff period used in the next retry attempt will range between 1 and 3 seconds, +multiplied by the exponential, that is, between 2 and 6 seconds. + +Note: MaxInterval caps the RetryInterval and not the randomized interval. + +If the time elapsed since an ExponentialBackOff instance is created goes past the +MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop. + +The elapsed time can be reset by calling Reset(). + +Example: Given the following default arguments, for 10 tries the sequence will be, +and assuming we go over the MaxElapsedTime on the 10th try: + + Request # RetryInterval (seconds) Randomized Interval (seconds) + + 1 0.5 [0.25, 0.75] + 2 0.75 [0.375, 1.125] + 3 1.125 [0.562, 1.687] + 4 1.687 [0.8435, 2.53] + 5 2.53 [1.265, 3.795] + 6 3.795 [1.897, 5.692] + 7 5.692 [2.846, 8.538] + 8 8.538 [4.269, 12.807] + 9 12.807 [6.403, 19.210] + 10 19.210 backoff.Stop + +Note: Implementation is not thread-safe. +*/ +type ExponentialBackOff struct { + InitialInterval time.Duration + RandomizationFactor float64 + Multiplier float64 + MaxInterval time.Duration + // After MaxElapsedTime the ExponentialBackOff returns Stop. + // It never stops if MaxElapsedTime == 0. + MaxElapsedTime time.Duration + Stop time.Duration + Clock Clock + + currentInterval time.Duration + startTime time.Time +} + +// Clock is an interface that returns current time for BackOff. +type Clock interface { + Now() time.Time +} + +// Default values for ExponentialBackOff. +const ( + DefaultInitialInterval = 500 * time.Millisecond + DefaultRandomizationFactor = 0.5 + DefaultMultiplier = 1.5 + DefaultMaxInterval = 60 * time.Second + DefaultMaxElapsedTime = 15 * time.Minute +) + +// NewExponentialBackOff creates an instance of ExponentialBackOff using default values. +func NewExponentialBackOff() *ExponentialBackOff { + b := &ExponentialBackOff{ + InitialInterval: DefaultInitialInterval, + RandomizationFactor: DefaultRandomizationFactor, + Multiplier: DefaultMultiplier, + MaxInterval: DefaultMaxInterval, + MaxElapsedTime: DefaultMaxElapsedTime, + Stop: Stop, + Clock: SystemClock, + } + b.Reset() + return b +} + +type systemClock struct{} + +func (t systemClock) Now() time.Time { + return time.Now() +} + +// SystemClock implements Clock interface that uses time.Now(). +var SystemClock = systemClock{} + +// Reset the interval back to the initial retry interval and restarts the timer. +// Reset must be called before using b. +func (b *ExponentialBackOff) Reset() { + b.currentInterval = b.InitialInterval + b.startTime = b.Clock.Now() +} + +// NextBackOff calculates the next backoff interval using the formula: +// Randomized interval = RetryInterval * (1 ± RandomizationFactor) +func (b *ExponentialBackOff) NextBackOff() time.Duration { + // Make sure we have not gone over the maximum elapsed time. + if b.MaxElapsedTime != 0 && b.GetElapsedTime() > b.MaxElapsedTime { + return b.Stop + } + defer b.incrementCurrentInterval() + return getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval) +} + +// GetElapsedTime returns the elapsed time since an ExponentialBackOff instance +// is created and is reset when Reset() is called. +// +// The elapsed time is computed using time.Now().UnixNano(). It is +// safe to call even while the backoff policy is used by a running +// ticker. +func (b *ExponentialBackOff) GetElapsedTime() time.Duration { + return b.Clock.Now().Sub(b.startTime) +} + +// Increments the current interval by multiplying it with the multiplier. +func (b *ExponentialBackOff) incrementCurrentInterval() { + // Check for overflow, if overflow is detected set the current interval to the max interval. + if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier { + b.currentInterval = b.MaxInterval + } else { + b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier) + } +} + +// Returns a random value from the following interval: +// [randomizationFactor * currentInterval, randomizationFactor * currentInterval]. +func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration { + var delta = randomizationFactor * float64(currentInterval) + var minInterval = float64(currentInterval) - delta + var maxInterval = float64(currentInterval) + delta + + // Get a random value from the range [minInterval, maxInterval]. + // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then + // we want a 33% chance for selecting either 1, 2 or 3. + return time.Duration(minInterval + (random * (maxInterval - minInterval + 1))) +} diff --git a/vendor/github.com/cenkalti/backoff/go.mod b/vendor/github.com/cenkalti/backoff/go.mod new file mode 100644 index 00000000000..cef50ea6724 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/go.mod @@ -0,0 +1,3 @@ +module github.com/cenkalti/backoff/v4 + +go 1.12 diff --git a/vendor/github.com/cenkalti/backoff/retry.go b/vendor/github.com/cenkalti/backoff/retry.go new file mode 100644 index 00000000000..6c776ccf8ed --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/retry.go @@ -0,0 +1,96 @@ +package backoff + +import "time" + +// An Operation is executing by Retry() or RetryNotify(). +// The operation will be retried using a backoff policy if it returns an error. +type Operation func() error + +// Notify is a notify-on-error function. It receives an operation error and +// backoff delay if the operation failed (with an error). +// +// NOTE that if the backoff policy stated to stop retrying, +// the notify function isn't called. +type Notify func(error, time.Duration) + +// Retry the operation o until it does not return error or BackOff stops. +// o is guaranteed to be run at least once. +// +// If o returns a *PermanentError, the operation is not retried, and the +// wrapped error is returned. +// +// Retry sleeps the goroutine for the duration returned by BackOff after a +// failed operation returns. +func Retry(o Operation, b BackOff) error { + return RetryNotify(o, b, nil) +} + +// RetryNotify calls notify function with the error and wait duration +// for each failed attempt before sleep. +func RetryNotify(operation Operation, b BackOff, notify Notify) error { + return RetryNotifyWithTimer(operation, b, notify, nil) +} + +// RetryNotifyWithTimer calls notify function with the error and wait duration using the given Timer +// for each failed attempt before sleep. +// A default timer that uses system timer is used when nil is passed. +func RetryNotifyWithTimer(operation Operation, b BackOff, notify Notify, t Timer) error { + var err error + var next time.Duration + if t == nil { + t = &defaultTimer{} + } + + defer func() { + t.Stop() + }() + + ctx := getContext(b) + + b.Reset() + for { + if err = operation(); err == nil { + return nil + } + + if permanent, ok := err.(*PermanentError); ok { + return permanent.Err + } + + if next = b.NextBackOff(); next == Stop { + return err + } + + if notify != nil { + notify(err, next) + } + + t.Start(next) + + select { + case <-ctx.Done(): + return ctx.Err() + case <-t.C(): + } + } +} + +// PermanentError signals that the operation should not be retried. +type PermanentError struct { + Err error +} + +func (e *PermanentError) Error() string { + return e.Err.Error() +} + +func (e *PermanentError) Unwrap() error { + return e.Err +} + +// Permanent wraps the given err in a *PermanentError. +func Permanent(err error) *PermanentError { + return &PermanentError{ + Err: err, + } +} diff --git a/vendor/github.com/cenkalti/backoff/ticker.go b/vendor/github.com/cenkalti/backoff/ticker.go new file mode 100644 index 00000000000..ed699e0e300 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/ticker.go @@ -0,0 +1,94 @@ +package backoff + +import ( + "context" + "sync" + "time" +) + +// Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff. +// +// Ticks will continue to arrive when the previous operation is still running, +// so operations that take a while to fail could run in quick succession. +type Ticker struct { + C <-chan time.Time + c chan time.Time + b BackOff + ctx context.Context + timer Timer + stop chan struct{} + stopOnce sync.Once +} + +// NewTicker returns a new Ticker containing a channel that will send +// the time at times specified by the BackOff argument. Ticker is +// guaranteed to tick at least once. The channel is closed when Stop +// method is called or BackOff stops. It is not safe to manipulate the +// provided backoff policy (notably calling NextBackOff or Reset) +// while the ticker is running. +func NewTicker(b BackOff) *Ticker { + return NewTickerWithTimer(b, &defaultTimer{}) +} + +// NewTickerWithTimer returns a new Ticker with a custom timer. +// A default timer that uses system timer is used when nil is passed. +func NewTickerWithTimer(b BackOff, timer Timer) *Ticker { + c := make(chan time.Time) + t := &Ticker{ + C: c, + c: c, + b: b, + ctx: getContext(b), + timer: timer, + stop: make(chan struct{}), + } + t.b.Reset() + go t.run() + return t +} + +// Stop turns off a ticker. After Stop, no more ticks will be sent. +func (t *Ticker) Stop() { + t.stopOnce.Do(func() { close(t.stop) }) +} + +func (t *Ticker) run() { + c := t.c + defer close(c) + + // Ticker is guaranteed to tick at least once. + afterC := t.send(time.Now()) + + for { + if afterC == nil { + return + } + + select { + case tick := <-afterC: + afterC = t.send(tick) + case <-t.stop: + t.c = nil // Prevent future ticks from being sent to the channel. + return + case <-t.ctx.Done(): + return + } + } +} + +func (t *Ticker) send(tick time.Time) <-chan time.Time { + select { + case t.c <- tick: + case <-t.stop: + return nil + } + + next := t.b.NextBackOff() + if next == Stop { + t.Stop() + return nil + } + + t.timer.Start(next) + return t.timer.C() +} diff --git a/vendor/github.com/cenkalti/backoff/timer.go b/vendor/github.com/cenkalti/backoff/timer.go new file mode 100644 index 00000000000..8120d0213c5 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/timer.go @@ -0,0 +1,35 @@ +package backoff + +import "time" + +type Timer interface { + Start(duration time.Duration) + Stop() + C() <-chan time.Time +} + +// defaultTimer implements Timer interface using time.Timer +type defaultTimer struct { + timer *time.Timer +} + +// C returns the timers channel which receives the current time when the timer fires. +func (t *defaultTimer) C() <-chan time.Time { + return t.timer.C +} + +// Start starts the timer to fire after the given duration +func (t *defaultTimer) Start(duration time.Duration) { + if t.timer == nil { + t.timer = time.NewTimer(duration) + } else { + t.timer.Reset(duration) + } +} + +// Stop is called when the timer is not used anymore and resources may be freed. +func (t *defaultTimer) Stop() { + if t.timer != nil { + t.timer.Stop() + } +} diff --git a/vendor/github.com/cenkalti/backoff/tries.go b/vendor/github.com/cenkalti/backoff/tries.go new file mode 100644 index 00000000000..28d58ca37c6 --- /dev/null +++ b/vendor/github.com/cenkalti/backoff/tries.go @@ -0,0 +1,38 @@ +package backoff + +import "time" + +/* +WithMaxRetries creates a wrapper around another BackOff, which will +return Stop if NextBackOff() has been called too many times since +the last time Reset() was called + +Note: Implementation is not thread-safe. +*/ +func WithMaxRetries(b BackOff, max uint64) BackOff { + return &backOffTries{delegate: b, maxTries: max} +} + +type backOffTries struct { + delegate BackOff + maxTries uint64 + numTries uint64 +} + +func (b *backOffTries) NextBackOff() time.Duration { + if b.maxTries == 0 { + return Stop + } + if b.maxTries > 0 { + if b.maxTries <= b.numTries { + return Stop + } + b.numTries++ + } + return b.delegate.NextBackOff() +} + +func (b *backOffTries) Reset() { + b.numTries = 0 + b.delegate.Reset() +} diff --git a/vendor/github.com/go-openapi/analysis/.codecov.yml b/vendor/github.com/go-openapi/analysis/.codecov.yml new file mode 100644 index 00000000000..841c4281e23 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.codecov.yml @@ -0,0 +1,5 @@ +coverage: + status: + patch: + default: + target: 80% diff --git a/vendor/github.com/go-openapi/analysis/.gitignore b/vendor/github.com/go-openapi/analysis/.gitignore new file mode 100644 index 00000000000..87c3bd3e66e --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.gitignore @@ -0,0 +1,5 @@ +secrets.yml +coverage.out +coverage.txt +*.cov +.idea diff --git a/vendor/github.com/go-openapi/analysis/.golangci.yml b/vendor/github.com/go-openapi/analysis/.golangci.yml new file mode 100644 index 00000000000..c3694fc6c0d --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.golangci.yml @@ -0,0 +1,32 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 40 + maligned: + suggest-new: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 4 + +linters: + enable-all: true + disable: + - maligned + - lll + - gochecknoglobals + - gochecknoinits + # scopelint is useful, but also reports false positives + # that unfortunately can't be disabled. So we disable the + # linter rather than changing code that works. + # see: https://github.com/kyoh86/scopelint/issues/4 + - scopelint + - godox + - gocognit + - whitespace + - wsl + - funlen diff --git a/vendor/github.com/go-openapi/analysis/.travis.yml b/vendor/github.com/go-openapi/analysis/.travis.yml new file mode 100644 index 00000000000..c0196e12a6f --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/.travis.yml @@ -0,0 +1,13 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.13.x +- 1.14.x +install: +- go get -u gotest.tools/gotestsum +language: go +notifications: + slack: + secure: Sf7kZf7ZGbnwWUMpffHwMu5A0cHkLK2MYY32LNTPj4+/3qC3Ghl7+9v4TSLOqOlCwdRNjOGblAq7s+GDJed6/xgRQl1JtCi1klzZNrYX4q01pgTPvvGcwbBkIYgeMaPeIRcK9OZnud7sRXdttozgTOpytps2U6Js32ip7uj5mHSg2ub0FwoSJwlS6dbezZ8+eDhoha0F/guY99BEwx8Bd+zROrT2TFGsSGOFGN6wFc7moCqTHO/YkWib13a2QNXqOxCCVBy/lt76Wp+JkeFppjHlzs/2lP3EAk13RIUAaesdEUHvIHrzCyNJEd3/+KO2DzsWOYfpktd+KBCvgaYOsoo7ubdT3IROeAegZdCgo/6xgCEsmFc9ZcqCfN5yNx2A+BZ2Vwmpws+bQ1E1+B5HDzzaiLcYfG4X2O210QVGVDLWsv1jqD+uPYeHY2WRfh5ZsIUFvaqgUEnwHwrK44/8REAhQavt1QAj5uJpsRd7CkRVPWRNK+yIky+wgbVUFEchRNmS55E7QWf+W4+4QZkQi7vUTMc9nbTUu2Es9NfvfudOpM2wZbn98fjpb/qq/nRv6Bk+ca+7XD5/IgNLMbWp2ouDdzbiHLCOfDUiHiDJhLfFZx9Bwo7ZwfzeOlbrQX66bx7xRKYmOe4DLrXhNcpbsMa8qbfxlZRCmYbubB/Y8h4= +script: +- gotestsum -f short-verbose -- -race -timeout=20m -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/analysis/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/analysis/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/yanniszark/go-nodetool/LICENSE b/vendor/github.com/go-openapi/analysis/LICENSE similarity index 99% rename from vendor/github.com/yanniszark/go-nodetool/LICENSE rename to vendor/github.com/go-openapi/analysis/LICENSE index ae1b19804eb..d6456956733 100644 --- a/vendor/github.com/yanniszark/go-nodetool/LICENSE +++ b/vendor/github.com/go-openapi/analysis/LICENSE @@ -1,3 +1,4 @@ + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018 Yannis Zarkadas(yannis.zarkadas@gmail.com) + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/go-openapi/analysis/README.md b/vendor/github.com/go-openapi/analysis/README.md new file mode 100644 index 00000000000..efafdf8fd32 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/README.md @@ -0,0 +1,9 @@ +# OpenAPI initiative analysis [![Build Status](https://travis-ci.org/go-openapi/analysis.svg?branch=master)](https://travis-ci.org/go-openapi/analysis) [![Build status](https://ci.appveyor.com/api/projects/status/x377t5o9ennm847o/branch/master?svg=true)](https://ci.appveyor.com/project/casualjim/go-openapi/analysis/branch/master) [![codecov](https://codecov.io/gh/go-openapi/analysis/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/analysis) +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/analysis/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/go-openapi/analysis?status.svg)](http://godoc.org/github.com/go-openapi/analysis) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/analysis.svg)](https://golangci.com) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/analysis)](https://goreportcard.com/report/github.com/go-openapi/analysis) + + +A foundational library to analyze an OAI specification document for easier reasoning about the content. diff --git a/vendor/github.com/go-openapi/analysis/analyzer.go b/vendor/github.com/go-openapi/analysis/analyzer.go new file mode 100644 index 00000000000..93410021002 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/analyzer.go @@ -0,0 +1,978 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package analysis + +import ( + "fmt" + slashpath "path" + "strconv" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +type referenceAnalysis struct { + schemas map[string]spec.Ref + responses map[string]spec.Ref + parameters map[string]spec.Ref + items map[string]spec.Ref + headerItems map[string]spec.Ref + parameterItems map[string]spec.Ref + allRefs map[string]spec.Ref + pathItems map[string]spec.Ref +} + +func (r *referenceAnalysis) addRef(key string, ref spec.Ref) { + r.allRefs["#"+key] = ref +} + +func (r *referenceAnalysis) addItemsRef(key string, items *spec.Items, location string) { + r.items["#"+key] = items.Ref + r.addRef(key, items.Ref) + if location == "header" { + // NOTE: in swagger 2.0, headers and parameters (but not body param schemas) are simple schemas + // and $ref are not supported here. However it is possible to analyze this. + r.headerItems["#"+key] = items.Ref + } else { + r.parameterItems["#"+key] = items.Ref + } +} + +func (r *referenceAnalysis) addSchemaRef(key string, ref SchemaRef) { + r.schemas["#"+key] = ref.Schema.Ref + r.addRef(key, ref.Schema.Ref) +} + +func (r *referenceAnalysis) addResponseRef(key string, resp *spec.Response) { + r.responses["#"+key] = resp.Ref + r.addRef(key, resp.Ref) +} + +func (r *referenceAnalysis) addParamRef(key string, param *spec.Parameter) { + r.parameters["#"+key] = param.Ref + r.addRef(key, param.Ref) +} + +func (r *referenceAnalysis) addPathItemRef(key string, pathItem *spec.PathItem) { + r.pathItems["#"+key] = pathItem.Ref + r.addRef(key, pathItem.Ref) +} + +type patternAnalysis struct { + parameters map[string]string + headers map[string]string + items map[string]string + schemas map[string]string + allPatterns map[string]string +} + +func (p *patternAnalysis) addPattern(key, pattern string) { + p.allPatterns["#"+key] = pattern +} + +func (p *patternAnalysis) addParameterPattern(key, pattern string) { + p.parameters["#"+key] = pattern + p.addPattern(key, pattern) +} + +func (p *patternAnalysis) addHeaderPattern(key, pattern string) { + p.headers["#"+key] = pattern + p.addPattern(key, pattern) +} + +func (p *patternAnalysis) addItemsPattern(key, pattern string) { + p.items["#"+key] = pattern + p.addPattern(key, pattern) +} + +func (p *patternAnalysis) addSchemaPattern(key, pattern string) { + p.schemas["#"+key] = pattern + p.addPattern(key, pattern) +} + +type enumAnalysis struct { + parameters map[string][]interface{} + headers map[string][]interface{} + items map[string][]interface{} + schemas map[string][]interface{} + allEnums map[string][]interface{} +} + +func (p *enumAnalysis) addEnum(key string, enum []interface{}) { + p.allEnums["#"+key] = enum +} + +func (p *enumAnalysis) addParameterEnum(key string, enum []interface{}) { + p.parameters["#"+key] = enum + p.addEnum(key, enum) +} + +func (p *enumAnalysis) addHeaderEnum(key string, enum []interface{}) { + p.headers["#"+key] = enum + p.addEnum(key, enum) +} + +func (p *enumAnalysis) addItemsEnum(key string, enum []interface{}) { + p.items["#"+key] = enum + p.addEnum(key, enum) +} + +func (p *enumAnalysis) addSchemaEnum(key string, enum []interface{}) { + p.schemas["#"+key] = enum + p.addEnum(key, enum) +} + +// New takes a swagger spec object and returns an analyzed spec document. +// The analyzed document contains a number of indices that make it easier to +// reason about semantics of a swagger specification for use in code generation +// or validation etc. +func New(doc *spec.Swagger) *Spec { + a := &Spec{ + spec: doc, + references: referenceAnalysis{}, + patterns: patternAnalysis{}, + enums: enumAnalysis{}, + } + a.reset() + a.initialize() + return a +} + +// Spec is an analyzed specification object. It takes a swagger spec object and turns it into a registry +// with a bunch of utility methods to act on the information in the spec. +type Spec struct { + spec *spec.Swagger + consumes map[string]struct{} + produces map[string]struct{} + authSchemes map[string]struct{} + operations map[string]map[string]*spec.Operation + references referenceAnalysis + patterns patternAnalysis + enums enumAnalysis + allSchemas map[string]SchemaRef + allOfs map[string]SchemaRef +} + +func (s *Spec) reset() { + s.consumes = make(map[string]struct{}, 150) + s.produces = make(map[string]struct{}, 150) + s.authSchemes = make(map[string]struct{}, 150) + s.operations = make(map[string]map[string]*spec.Operation, 150) + s.allSchemas = make(map[string]SchemaRef, 150) + s.allOfs = make(map[string]SchemaRef, 150) + s.references.schemas = make(map[string]spec.Ref, 150) + s.references.pathItems = make(map[string]spec.Ref, 150) + s.references.responses = make(map[string]spec.Ref, 150) + s.references.parameters = make(map[string]spec.Ref, 150) + s.references.items = make(map[string]spec.Ref, 150) + s.references.headerItems = make(map[string]spec.Ref, 150) + s.references.parameterItems = make(map[string]spec.Ref, 150) + s.references.allRefs = make(map[string]spec.Ref, 150) + s.patterns.parameters = make(map[string]string, 150) + s.patterns.headers = make(map[string]string, 150) + s.patterns.items = make(map[string]string, 150) + s.patterns.schemas = make(map[string]string, 150) + s.patterns.allPatterns = make(map[string]string, 150) + s.enums.parameters = make(map[string][]interface{}, 150) + s.enums.headers = make(map[string][]interface{}, 150) + s.enums.items = make(map[string][]interface{}, 150) + s.enums.schemas = make(map[string][]interface{}, 150) + s.enums.allEnums = make(map[string][]interface{}, 150) +} + +func (s *Spec) reload() { + s.reset() + s.initialize() +} + +func (s *Spec) initialize() { + for _, c := range s.spec.Consumes { + s.consumes[c] = struct{}{} + } + for _, c := range s.spec.Produces { + s.produces[c] = struct{}{} + } + for _, ss := range s.spec.Security { + for k := range ss { + s.authSchemes[k] = struct{}{} + } + } + for path, pathItem := range s.AllPaths() { + s.analyzeOperations(path, &pathItem) + } + + for name, parameter := range s.spec.Parameters { + refPref := slashpath.Join("/parameters", jsonpointer.Escape(name)) + if parameter.Items != nil { + s.analyzeItems("items", parameter.Items, refPref, "parameter") + } + if parameter.In == "body" && parameter.Schema != nil { + s.analyzeSchema("schema", parameter.Schema, refPref) + } + if parameter.Pattern != "" { + s.patterns.addParameterPattern(refPref, parameter.Pattern) + } + if len(parameter.Enum) > 0 { + s.enums.addParameterEnum(refPref, parameter.Enum) + } + } + + for name, response := range s.spec.Responses { + refPref := slashpath.Join("/responses", jsonpointer.Escape(name)) + for k, v := range response.Headers { + hRefPref := slashpath.Join(refPref, "headers", k) + if v.Items != nil { + s.analyzeItems("items", v.Items, hRefPref, "header") + } + if v.Pattern != "" { + s.patterns.addHeaderPattern(hRefPref, v.Pattern) + } + if len(v.Enum) > 0 { + s.enums.addHeaderEnum(hRefPref, v.Enum) + } + } + if response.Schema != nil { + s.analyzeSchema("schema", response.Schema, refPref) + } + } + + for name := range s.spec.Definitions { + schema := s.spec.Definitions[name] + s.analyzeSchema(name, &schema, "/definitions") + } + // TODO: after analyzing all things and flattening schemas etc + // resolve all the collected references to their final representations + // best put in a separate method because this could get expensive +} + +func (s *Spec) analyzeOperations(path string, pi *spec.PathItem) { + // TODO: resolve refs here? + // Currently, operations declared via pathItem $ref are known only after expansion + op := pi + if pi.Ref.String() != "" { + key := slashpath.Join("/paths", jsonpointer.Escape(path)) + s.references.addPathItemRef(key, pi) + } + s.analyzeOperation("GET", path, op.Get) + s.analyzeOperation("PUT", path, op.Put) + s.analyzeOperation("POST", path, op.Post) + s.analyzeOperation("PATCH", path, op.Patch) + s.analyzeOperation("DELETE", path, op.Delete) + s.analyzeOperation("HEAD", path, op.Head) + s.analyzeOperation("OPTIONS", path, op.Options) + for i, param := range op.Parameters { + refPref := slashpath.Join("/paths", jsonpointer.Escape(path), "parameters", strconv.Itoa(i)) + if param.Ref.String() != "" { + s.references.addParamRef(refPref, ¶m) + } + if param.Pattern != "" { + s.patterns.addParameterPattern(refPref, param.Pattern) + } + if len(param.Enum) > 0 { + s.enums.addParameterEnum(refPref, param.Enum) + } + if param.Items != nil { + s.analyzeItems("items", param.Items, refPref, "parameter") + } + if param.Schema != nil { + s.analyzeSchema("schema", param.Schema, refPref) + } + } +} + +func (s *Spec) analyzeItems(name string, items *spec.Items, prefix, location string) { + if items == nil { + return + } + refPref := slashpath.Join(prefix, name) + s.analyzeItems(name, items.Items, refPref, location) + if items.Ref.String() != "" { + s.references.addItemsRef(refPref, items, location) + } + if items.Pattern != "" { + s.patterns.addItemsPattern(refPref, items.Pattern) + } + if len(items.Enum) > 0 { + s.enums.addItemsEnum(refPref, items.Enum) + } +} + +func (s *Spec) analyzeOperation(method, path string, op *spec.Operation) { + if op == nil { + return + } + + for _, c := range op.Consumes { + s.consumes[c] = struct{}{} + } + for _, c := range op.Produces { + s.produces[c] = struct{}{} + } + for _, ss := range op.Security { + for k := range ss { + s.authSchemes[k] = struct{}{} + } + } + if _, ok := s.operations[method]; !ok { + s.operations[method] = make(map[string]*spec.Operation) + } + s.operations[method][path] = op + prefix := slashpath.Join("/paths", jsonpointer.Escape(path), strings.ToLower(method)) + for i, param := range op.Parameters { + refPref := slashpath.Join(prefix, "parameters", strconv.Itoa(i)) + if param.Ref.String() != "" { + s.references.addParamRef(refPref, ¶m) + } + if param.Pattern != "" { + s.patterns.addParameterPattern(refPref, param.Pattern) + } + if len(param.Enum) > 0 { + s.enums.addParameterEnum(refPref, param.Enum) + } + s.analyzeItems("items", param.Items, refPref, "parameter") + if param.In == "body" && param.Schema != nil { + s.analyzeSchema("schema", param.Schema, refPref) + } + } + if op.Responses != nil { + if op.Responses.Default != nil { + refPref := slashpath.Join(prefix, "responses", "default") + if op.Responses.Default.Ref.String() != "" { + s.references.addResponseRef(refPref, op.Responses.Default) + } + for k, v := range op.Responses.Default.Headers { + hRefPref := slashpath.Join(refPref, "headers", k) + s.analyzeItems("items", v.Items, hRefPref, "header") + if v.Pattern != "" { + s.patterns.addHeaderPattern(hRefPref, v.Pattern) + } + } + if op.Responses.Default.Schema != nil { + s.analyzeSchema("schema", op.Responses.Default.Schema, refPref) + } + } + for k, res := range op.Responses.StatusCodeResponses { + refPref := slashpath.Join(prefix, "responses", strconv.Itoa(k)) + if res.Ref.String() != "" { + s.references.addResponseRef(refPref, &res) + } + for k, v := range res.Headers { + hRefPref := slashpath.Join(refPref, "headers", k) + s.analyzeItems("items", v.Items, hRefPref, "header") + if v.Pattern != "" { + s.patterns.addHeaderPattern(hRefPref, v.Pattern) + } + if len(v.Enum) > 0 { + s.enums.addHeaderEnum(hRefPref, v.Enum) + } + } + if res.Schema != nil { + s.analyzeSchema("schema", res.Schema, refPref) + } + } + } +} + +func (s *Spec) analyzeSchema(name string, schema *spec.Schema, prefix string) { + refURI := slashpath.Join(prefix, jsonpointer.Escape(name)) + schRef := SchemaRef{ + Name: name, + Schema: schema, + Ref: spec.MustCreateRef("#" + refURI), + TopLevel: prefix == "/definitions", + } + + s.allSchemas["#"+refURI] = schRef + + if schema.Ref.String() != "" { + s.references.addSchemaRef(refURI, schRef) + } + if schema.Pattern != "" { + s.patterns.addSchemaPattern(refURI, schema.Pattern) + } + if len(schema.Enum) > 0 { + s.enums.addSchemaEnum(refURI, schema.Enum) + } + + for k, v := range schema.Definitions { + v := v + s.analyzeSchema(k, &v, slashpath.Join(refURI, "definitions")) + } + for k, v := range schema.Properties { + v := v + s.analyzeSchema(k, &v, slashpath.Join(refURI, "properties")) + } + for k, v := range schema.PatternProperties { + v := v + // NOTE: swagger 2.0 does not support PatternProperties. + // However it is possible to analyze this in a schema + s.analyzeSchema(k, &v, slashpath.Join(refURI, "patternProperties")) + } + for i := range schema.AllOf { + v := &schema.AllOf[i] + s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "allOf")) + } + if len(schema.AllOf) > 0 { + s.allOfs["#"+refURI] = schRef + } + for i := range schema.AnyOf { + v := &schema.AnyOf[i] + // NOTE: swagger 2.0 does not support anyOf constructs. + // However it is possible to analyze this in a schema + s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "anyOf")) + } + for i := range schema.OneOf { + v := &schema.OneOf[i] + // NOTE: swagger 2.0 does not support oneOf constructs. + // However it is possible to analyze this in a schema + s.analyzeSchema(strconv.Itoa(i), v, slashpath.Join(refURI, "oneOf")) + } + if schema.Not != nil { + // NOTE: swagger 2.0 does not support "not" constructs. + // However it is possible to analyze this in a schema + s.analyzeSchema("not", schema.Not, refURI) + } + if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil { + s.analyzeSchema("additionalProperties", schema.AdditionalProperties.Schema, refURI) + } + if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { + // NOTE: swagger 2.0 does not support AdditionalItems. + // However it is possible to analyze this in a schema + s.analyzeSchema("additionalItems", schema.AdditionalItems.Schema, refURI) + } + if schema.Items != nil { + if schema.Items.Schema != nil { + s.analyzeSchema("items", schema.Items.Schema, refURI) + } + for i := range schema.Items.Schemas { + sch := &schema.Items.Schemas[i] + s.analyzeSchema(strconv.Itoa(i), sch, slashpath.Join(refURI, "items")) + } + } +} + +// SecurityRequirement is a representation of a security requirement for an operation +type SecurityRequirement struct { + Name string + Scopes []string +} + +// SecurityRequirementsFor gets the security requirements for the operation +func (s *Spec) SecurityRequirementsFor(operation *spec.Operation) [][]SecurityRequirement { + if s.spec.Security == nil && operation.Security == nil { + return nil + } + + schemes := s.spec.Security + if operation.Security != nil { + schemes = operation.Security + } + + result := [][]SecurityRequirement{} + for _, scheme := range schemes { + if len(scheme) == 0 { + // append a zero object for anonymous + result = append(result, []SecurityRequirement{{}}) + continue + } + var reqs []SecurityRequirement + for k, v := range scheme { + if v == nil { + v = []string{} + } + reqs = append(reqs, SecurityRequirement{Name: k, Scopes: v}) + } + result = append(result, reqs) + } + return result +} + +// SecurityDefinitionsForRequirements gets the matching security definitions for a set of requirements +func (s *Spec) SecurityDefinitionsForRequirements(requirements []SecurityRequirement) map[string]spec.SecurityScheme { + result := make(map[string]spec.SecurityScheme) + + for _, v := range requirements { + if definition, ok := s.spec.SecurityDefinitions[v.Name]; ok { + if definition != nil { + result[v.Name] = *definition + } + } + } + return result +} + +// SecurityDefinitionsFor gets the matching security definitions for a set of requirements +func (s *Spec) SecurityDefinitionsFor(operation *spec.Operation) map[string]spec.SecurityScheme { + requirements := s.SecurityRequirementsFor(operation) + if len(requirements) == 0 { + return nil + } + + result := make(map[string]spec.SecurityScheme) + for _, reqs := range requirements { + for _, v := range reqs { + if v.Name == "" { + // optional requirement + continue + } + if _, ok := result[v.Name]; ok { + // duplicate requirement + continue + } + if definition, ok := s.spec.SecurityDefinitions[v.Name]; ok { + if definition != nil { + result[v.Name] = *definition + } + } + } + } + return result +} + +// ConsumesFor gets the mediatypes for the operation +func (s *Spec) ConsumesFor(operation *spec.Operation) []string { + + if len(operation.Consumes) == 0 { + cons := make(map[string]struct{}, len(s.spec.Consumes)) + for _, k := range s.spec.Consumes { + cons[k] = struct{}{} + } + return s.structMapKeys(cons) + } + + cons := make(map[string]struct{}, len(operation.Consumes)) + for _, c := range operation.Consumes { + cons[c] = struct{}{} + } + return s.structMapKeys(cons) +} + +// ProducesFor gets the mediatypes for the operation +func (s *Spec) ProducesFor(operation *spec.Operation) []string { + if len(operation.Produces) == 0 { + prod := make(map[string]struct{}, len(s.spec.Produces)) + for _, k := range s.spec.Produces { + prod[k] = struct{}{} + } + return s.structMapKeys(prod) + } + + prod := make(map[string]struct{}, len(operation.Produces)) + for _, c := range operation.Produces { + prod[c] = struct{}{} + } + return s.structMapKeys(prod) +} + +func mapKeyFromParam(param *spec.Parameter) string { + return fmt.Sprintf("%s#%s", param.In, fieldNameFromParam(param)) +} + +func fieldNameFromParam(param *spec.Parameter) string { + // TODO: this should be x-go-name + if nm, ok := param.Extensions.GetString("go-name"); ok { + return nm + } + return swag.ToGoName(param.Name) +} + +// ErrorOnParamFunc is a callback function to be invoked +// whenever an error is encountered while resolving references +// on parameters. +// +// This function takes as input the spec.Parameter which triggered the +// error and the error itself. +// +// If the callback function returns false, the calling function should bail. +// +// If it returns true, the calling function should continue evaluating parameters. +// A nil ErrorOnParamFunc must be evaluated as equivalent to panic(). +type ErrorOnParamFunc func(spec.Parameter, error) bool + +func (s *Spec) paramsAsMap(parameters []spec.Parameter, res map[string]spec.Parameter, callmeOnError ErrorOnParamFunc) { + for _, param := range parameters { + pr := param + if pr.Ref.String() != "" { + obj, _, err := pr.Ref.GetPointer().Get(s.spec) + if err != nil { + if callmeOnError != nil { + if callmeOnError(param, fmt.Errorf("invalid reference: %q", pr.Ref.String())) { + continue + } + break + } else { + panic(fmt.Sprintf("invalid reference: %q", pr.Ref.String())) + } + } + if objAsParam, ok := obj.(spec.Parameter); ok { + pr = objAsParam + } else { + if callmeOnError != nil { + if callmeOnError(param, fmt.Errorf("resolved reference is not a parameter: %q", pr.Ref.String())) { + continue + } + break + } else { + panic(fmt.Sprintf("resolved reference is not a parameter: %q", pr.Ref.String())) + } + } + } + res[mapKeyFromParam(&pr)] = pr + } +} + +// ParametersFor the specified operation id. +// +// Assumes parameters properly resolve references if any and that +// such references actually resolve to a parameter object. +// Otherwise, panics. +func (s *Spec) ParametersFor(operationID string) []spec.Parameter { + return s.SafeParametersFor(operationID, nil) +} + +// SafeParametersFor the specified operation id. +// +// Does not assume parameters properly resolve references or that +// such references actually resolve to a parameter object. +// +// Upon error, invoke a ErrorOnParamFunc callback with the erroneous +// parameters. If the callback is set to nil, panics upon errors. +func (s *Spec) SafeParametersFor(operationID string, callmeOnError ErrorOnParamFunc) []spec.Parameter { + gatherParams := func(pi *spec.PathItem, op *spec.Operation) []spec.Parameter { + bag := make(map[string]spec.Parameter) + s.paramsAsMap(pi.Parameters, bag, callmeOnError) + s.paramsAsMap(op.Parameters, bag, callmeOnError) + + var res []spec.Parameter + for _, v := range bag { + res = append(res, v) + } + return res + } + for _, pi := range s.spec.Paths.Paths { + if pi.Get != nil && pi.Get.ID == operationID { + return gatherParams(&pi, pi.Get) + } + if pi.Head != nil && pi.Head.ID == operationID { + return gatherParams(&pi, pi.Head) + } + if pi.Options != nil && pi.Options.ID == operationID { + return gatherParams(&pi, pi.Options) + } + if pi.Post != nil && pi.Post.ID == operationID { + return gatherParams(&pi, pi.Post) + } + if pi.Patch != nil && pi.Patch.ID == operationID { + return gatherParams(&pi, pi.Patch) + } + if pi.Put != nil && pi.Put.ID == operationID { + return gatherParams(&pi, pi.Put) + } + if pi.Delete != nil && pi.Delete.ID == operationID { + return gatherParams(&pi, pi.Delete) + } + } + return nil +} + +// ParamsFor the specified method and path. Aggregates them with the defaults etc, so it's all the params that +// apply for the method and path. +// +// Assumes parameters properly resolve references if any and that +// such references actually resolve to a parameter object. +// Otherwise, panics. +func (s *Spec) ParamsFor(method, path string) map[string]spec.Parameter { + return s.SafeParamsFor(method, path, nil) +} + +// SafeParamsFor the specified method and path. Aggregates them with the defaults etc, so it's all the params that +// apply for the method and path. +// +// Does not assume parameters properly resolve references or that +// such references actually resolve to a parameter object. +// +// Upon error, invoke a ErrorOnParamFunc callback with the erroneous +// parameters. If the callback is set to nil, panics upon errors. +func (s *Spec) SafeParamsFor(method, path string, callmeOnError ErrorOnParamFunc) map[string]spec.Parameter { + res := make(map[string]spec.Parameter) + if pi, ok := s.spec.Paths.Paths[path]; ok { + s.paramsAsMap(pi.Parameters, res, callmeOnError) + s.paramsAsMap(s.operations[strings.ToUpper(method)][path].Parameters, res, callmeOnError) + } + return res +} + +// OperationForName gets the operation for the given id +func (s *Spec) OperationForName(operationID string) (string, string, *spec.Operation, bool) { + for method, pathItem := range s.operations { + for path, op := range pathItem { + if operationID == op.ID { + return method, path, op, true + } + } + } + return "", "", nil, false +} + +// OperationFor the given method and path +func (s *Spec) OperationFor(method, path string) (*spec.Operation, bool) { + if mp, ok := s.operations[strings.ToUpper(method)]; ok { + op, fn := mp[path] + return op, fn + } + return nil, false +} + +// Operations gathers all the operations specified in the spec document +func (s *Spec) Operations() map[string]map[string]*spec.Operation { + return s.operations +} + +func (s *Spec) structMapKeys(mp map[string]struct{}) []string { + if len(mp) == 0 { + return nil + } + + result := make([]string, 0, len(mp)) + for k := range mp { + result = append(result, k) + } + return result +} + +// AllPaths returns all the paths in the swagger spec +func (s *Spec) AllPaths() map[string]spec.PathItem { + if s.spec == nil || s.spec.Paths == nil { + return nil + } + return s.spec.Paths.Paths +} + +// OperationIDs gets all the operation ids based on method an dpath +func (s *Spec) OperationIDs() []string { + if len(s.operations) == 0 { + return nil + } + result := make([]string, 0, len(s.operations)) + for method, v := range s.operations { + for p, o := range v { + if o.ID != "" { + result = append(result, o.ID) + } else { + result = append(result, fmt.Sprintf("%s %s", strings.ToUpper(method), p)) + } + } + } + return result +} + +// OperationMethodPaths gets all the operation ids based on method an dpath +func (s *Spec) OperationMethodPaths() []string { + if len(s.operations) == 0 { + return nil + } + result := make([]string, 0, len(s.operations)) + for method, v := range s.operations { + for p := range v { + result = append(result, fmt.Sprintf("%s %s", strings.ToUpper(method), p)) + } + } + return result +} + +// RequiredConsumes gets all the distinct consumes that are specified in the specification document +func (s *Spec) RequiredConsumes() []string { + return s.structMapKeys(s.consumes) +} + +// RequiredProduces gets all the distinct produces that are specified in the specification document +func (s *Spec) RequiredProduces() []string { + return s.structMapKeys(s.produces) +} + +// RequiredSecuritySchemes gets all the distinct security schemes that are specified in the swagger spec +func (s *Spec) RequiredSecuritySchemes() []string { + return s.structMapKeys(s.authSchemes) +} + +// SchemaRef is a reference to a schema +type SchemaRef struct { + Name string + Ref spec.Ref + Schema *spec.Schema + TopLevel bool +} + +// SchemasWithAllOf returns schema references to all schemas that are defined +// with an allOf key +func (s *Spec) SchemasWithAllOf() (result []SchemaRef) { + for _, v := range s.allOfs { + result = append(result, v) + } + return +} + +// AllDefinitions returns schema references for all the definitions that were discovered +func (s *Spec) AllDefinitions() (result []SchemaRef) { + for _, v := range s.allSchemas { + result = append(result, v) + } + return +} + +// AllDefinitionReferences returns json refs for all the discovered schemas +func (s *Spec) AllDefinitionReferences() (result []string) { + for _, v := range s.references.schemas { + result = append(result, v.String()) + } + return +} + +// AllParameterReferences returns json refs for all the discovered parameters +func (s *Spec) AllParameterReferences() (result []string) { + for _, v := range s.references.parameters { + result = append(result, v.String()) + } + return +} + +// AllResponseReferences returns json refs for all the discovered responses +func (s *Spec) AllResponseReferences() (result []string) { + for _, v := range s.references.responses { + result = append(result, v.String()) + } + return +} + +// AllPathItemReferences returns the references for all the items +func (s *Spec) AllPathItemReferences() (result []string) { + for _, v := range s.references.pathItems { + result = append(result, v.String()) + } + return +} + +// AllItemsReferences returns the references for all the items in simple schemas (parameters or headers). +// +// NOTE: since Swagger 2.0 forbids $ref in simple params, this should always yield an empty slice for a valid +// Swagger 2.0 spec. +func (s *Spec) AllItemsReferences() (result []string) { + for _, v := range s.references.items { + result = append(result, v.String()) + } + return +} + +// AllReferences returns all the references found in the document, with possible duplicates +func (s *Spec) AllReferences() (result []string) { + for _, v := range s.references.allRefs { + result = append(result, v.String()) + } + return +} + +// AllRefs returns all the unique references found in the document +func (s *Spec) AllRefs() (result []spec.Ref) { + set := make(map[string]struct{}) + for _, v := range s.references.allRefs { + a := v.String() + if a == "" { + continue + } + if _, ok := set[a]; !ok { + set[a] = struct{}{} + result = append(result, v) + } + } + return +} + +func cloneStringMap(source map[string]string) map[string]string { + res := make(map[string]string, len(source)) + for k, v := range source { + res[k] = v + } + return res +} + +func cloneEnumMap(source map[string][]interface{}) map[string][]interface{} { + res := make(map[string][]interface{}, len(source)) + for k, v := range source { + res[k] = v + } + return res +} + +// ParameterPatterns returns all the patterns found in parameters +// the map is cloned to avoid accidental changes +func (s *Spec) ParameterPatterns() map[string]string { + return cloneStringMap(s.patterns.parameters) +} + +// HeaderPatterns returns all the patterns found in response headers +// the map is cloned to avoid accidental changes +func (s *Spec) HeaderPatterns() map[string]string { + return cloneStringMap(s.patterns.headers) +} + +// ItemsPatterns returns all the patterns found in simple array items +// the map is cloned to avoid accidental changes +func (s *Spec) ItemsPatterns() map[string]string { + return cloneStringMap(s.patterns.items) +} + +// SchemaPatterns returns all the patterns found in schemas +// the map is cloned to avoid accidental changes +func (s *Spec) SchemaPatterns() map[string]string { + return cloneStringMap(s.patterns.schemas) +} + +// AllPatterns returns all the patterns found in the spec +// the map is cloned to avoid accidental changes +func (s *Spec) AllPatterns() map[string]string { + return cloneStringMap(s.patterns.allPatterns) +} + +// ParameterEnums returns all the enums found in parameters +// the map is cloned to avoid accidental changes +func (s *Spec) ParameterEnums() map[string][]interface{} { + return cloneEnumMap(s.enums.parameters) +} + +// HeaderEnums returns all the enums found in response headers +// the map is cloned to avoid accidental changes +func (s *Spec) HeaderEnums() map[string][]interface{} { + return cloneEnumMap(s.enums.headers) +} + +// ItemsEnums returns all the enums found in simple array items +// the map is cloned to avoid accidental changes +func (s *Spec) ItemsEnums() map[string][]interface{} { + return cloneEnumMap(s.enums.items) +} + +// SchemaEnums returns all the enums found in schemas +// the map is cloned to avoid accidental changes +func (s *Spec) SchemaEnums() map[string][]interface{} { + return cloneEnumMap(s.enums.schemas) +} + +// AllEnums returns all the enums found in the spec +// the map is cloned to avoid accidental changes +func (s *Spec) AllEnums() map[string][]interface{} { + return cloneEnumMap(s.enums.allEnums) +} diff --git a/vendor/github.com/go-openapi/analysis/appveyor.yml b/vendor/github.com/go-openapi/analysis/appveyor.yml new file mode 100644 index 00000000000..3239d74416a --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/appveyor.yml @@ -0,0 +1,33 @@ +version: "0.1.{build}" + +clone_folder: C:\go-openapi\analysis +shallow_clone: true # for startup speed +pull_requests: + do_not_increment_build_number: true + +#skip_tags: true +#skip_branch_with_pr: true + +# appveyor.yml +build: off + +environment: + GOPATH: c:\gopath + +stack: go 1.12 + +test_script: + - go test -v -timeout 20m ./... +#artifacts: +# - path: '%GOPATH%\bin\*.exe' +deploy: off + +notifications: + - provider: Slack + incoming_webhook: https://hooks.slack.com/services/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 + auth_token: + secure: Sf7kZf7ZGbnwWUMpffHwMu5A0cHkLK2MYY32LNTPj4+/3qC3Ghl7+9v4TSLOqOlCwdRNjOGblAq7s+GDJed6/xgRQl1JtCi1klzZNrYX4q01pgTPvvGcwbBkIYgeMaPeIRcK9OZnud7sRXdttozgTOpytps2U6Js32ip7uj5mHSg2ub0FwoSJwlS6dbezZ8+eDhoha0F/guY99BEwx8Bd+zROrT2TFGsSGOFGN6wFc7moCqTHO/YkWib13a2QNXqOxCCVBy/lt76Wp+JkeFppjHlzs/2lP3EAk13RIUAaesdEUHvIHrzCyNJEd3/+KO2DzsWOYfpktd+KBCvgaYOsoo7ubdT3IROeAegZdCgo/6xgCEsmFc9ZcqCfN5yNx2A+BZ2Vwmpws+bQ1E1+B5HDzzaiLcYfG4X2O210QVGVDLWsv1jqD+uPYeHY2WRfh5ZsIUFvaqgUEnwHwrK44/8REAhQavt1QAj5uJpsRd7CkRVPWRNK+yIky+wgbVUFEchRNmS55E7QWf+W4+4QZkQi7vUTMc9nbTUu2Es9NfvfudOpM2wZbn98fjpb/qq/nRv6Bk+ca+7XD5/IgNLMbWp2ouDdzbiHLCOfDUiHiDJhLfFZx9Bwo7ZwfzeOlbrQX66bx7xRKYmOe4DLrXhNcpbsMa8qbfxlZRCmYbubB/Y8h4= + channel: bots + on_build_success: false + on_build_failure: true + on_build_status_changed: true diff --git a/vendor/github.com/go-openapi/analysis/debug.go b/vendor/github.com/go-openapi/analysis/debug.go new file mode 100644 index 00000000000..84cc4e54cb7 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/debug.go @@ -0,0 +1,47 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package analysis + +import ( + "fmt" + "log" + "os" + "path/filepath" + "runtime" +) + +var ( + // Debug is true when the SWAGGER_DEBUG env var is not empty. + // It enables a more verbose logging of the spec analyzer. + Debug = os.Getenv("SWAGGER_DEBUG") != "" + // analysisLogger is a debug logger for this package + analysisLogger *log.Logger +) + +func init() { + debugOptions() +} + +func debugOptions() { + analysisLogger = log.New(os.Stdout, "analysis:", log.LstdFlags) +} + +func debugLog(msg string, args ...interface{}) { + // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog() + if Debug { + _, file1, pos1, _ := runtime.Caller(1) + analysisLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) + } +} diff --git a/vendor/github.com/go-openapi/analysis/doc.go b/vendor/github.com/go-openapi/analysis/doc.go new file mode 100644 index 00000000000..d5294c0950b --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/doc.go @@ -0,0 +1,43 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package analysis provides methods to work with a Swagger specification document from +package go-openapi/spec. + +Analyzing a specification + +An analysed specification object (type Spec) provides methods to work with swagger definition. + +Flattening or expanding a specification + +Flattening a specification bundles all remote $ref in the main spec document. +Depending on flattening options, additional preprocessing may take place: + - full flattening: replacing all inline complex constructs by a named entry in #/definitions + - expand: replace all $ref's in the document by their expanded content + +Merging several specifications + +Mixin several specifications merges all Swagger constructs, and warns about found conflicts. + +Fixing a specification + +Unmarshalling a specification with golang json unmarshalling may lead to +some unwanted result on present but empty fields. + +Analyzing a Swagger schema + +Swagger schemas are analyzed to determine their complexity and qualify their content. +*/ +package analysis diff --git a/vendor/github.com/go-openapi/analysis/fixer.go b/vendor/github.com/go-openapi/analysis/fixer.go new file mode 100644 index 00000000000..bfe014ca51a --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/fixer.go @@ -0,0 +1,76 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package analysis + +import "github.com/go-openapi/spec" + +// FixEmptyResponseDescriptions replaces empty ("") response +// descriptions in the input with "(empty)" to ensure that the +// resulting Swagger is stays valid. The problem appears to arise +// from reading in valid specs that have a explicit response +// description of "" (valid, response.description is required), but +// due to zero values being omitted upon re-serializing (omitempty) we +// lose them unless we stick some chars in there. +func FixEmptyResponseDescriptions(s *spec.Swagger) { + if s.Paths != nil { + for _, v := range s.Paths.Paths { + if v.Get != nil { + FixEmptyDescs(v.Get.Responses) + } + if v.Put != nil { + FixEmptyDescs(v.Put.Responses) + } + if v.Post != nil { + FixEmptyDescs(v.Post.Responses) + } + if v.Delete != nil { + FixEmptyDescs(v.Delete.Responses) + } + if v.Options != nil { + FixEmptyDescs(v.Options.Responses) + } + if v.Head != nil { + FixEmptyDescs(v.Head.Responses) + } + if v.Patch != nil { + FixEmptyDescs(v.Patch.Responses) + } + } + } + for k, v := range s.Responses { + FixEmptyDesc(&v) + s.Responses[k] = v + } +} + +// FixEmptyDescs adds "(empty)" as the description for any Response in +// the given Responses object that doesn't already have one. +func FixEmptyDescs(rs *spec.Responses) { + FixEmptyDesc(rs.Default) + for k, v := range rs.StatusCodeResponses { + FixEmptyDesc(&v) + rs.StatusCodeResponses[k] = v + } +} + +// FixEmptyDesc adds "(empty)" as the description to the given +// Response object if it doesn't already have one and isn't a +// ref. No-op on nil input. +func FixEmptyDesc(rs *spec.Response) { + if rs == nil || rs.Description != "" || rs.Ref.Ref.GetURL() != nil { + return + } + rs.Description = "(empty)" +} diff --git a/vendor/github.com/go-openapi/analysis/flatten.go b/vendor/github.com/go-openapi/analysis/flatten.go new file mode 100644 index 00000000000..ab3f949c302 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/flatten.go @@ -0,0 +1,1757 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package analysis + +import ( + "fmt" + "log" + "net/http" + "net/url" + "os" + slashpath "path" + "path/filepath" + "sort" + "strings" + + "strconv" + + "github.com/go-openapi/analysis/internal" + "github.com/go-openapi/jsonpointer" + swspec "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +// FlattenOpts configuration for flattening a swagger specification. +type FlattenOpts struct { + Spec *Spec // The analyzed spec to work with + flattenContext *context // Internal context to track flattening activity + + BasePath string + + // Flattening options + Expand bool // If Expand is true, we skip flattening the spec and expand it instead + Minimal bool + Verbose bool + RemoveUnused bool + ContinueOnError bool // Continues when facing some issues + + /* Extra keys */ + _ struct{} // require keys +} + +// ExpandOpts creates a spec.ExpandOptions to configure expanding a specification document. +func (f *FlattenOpts) ExpandOpts(skipSchemas bool) *swspec.ExpandOptions { + return &swspec.ExpandOptions{RelativeBase: f.BasePath, SkipSchemas: skipSchemas} +} + +// Swagger gets the swagger specification for this flatten operation +func (f *FlattenOpts) Swagger() *swspec.Swagger { + return f.Spec.spec +} + +// newRef stores information about refs created during the flattening process +type newRef struct { + key string + newName string + path string + isOAIGen bool + resolved bool + schema *swspec.Schema + parents []string +} + +// context stores intermediary results from flatten +type context struct { + newRefs map[string]*newRef + warnings []string + resolved map[string]string +} + +func newContext() *context { + return &context{ + newRefs: make(map[string]*newRef, 150), + warnings: make([]string, 0), + resolved: make(map[string]string, 50), + } +} + +// Flatten an analyzed spec and produce a self-contained spec bundle. +// +// There is a minimal and a full flattening mode. +// +// Minimally flattening a spec means: +// - Expanding parameters, responses, path items, parameter items and header items (references to schemas are left +// unscathed) +// - Importing external (http, file) references so they become internal to the document +// - Moving every JSON pointer to a $ref to a named definition (i.e. the reworked spec does not contain pointers +// like "$ref": "#/definitions/myObject/allOfs/1") +// +// A minimally flattened spec thus guarantees the following properties: +// - all $refs point to a local definition (i.e. '#/definitions/...') +// - definitions are unique +// +// NOTE: arbitrary JSON pointers (other than $refs to top level definitions) are rewritten as definitions if they +// represent a complex schema or express commonality in the spec. +// Otherwise, they are simply expanded. +// +// Minimal flattening is necessary and sufficient for codegen rendering using go-swagger. +// +// Fully flattening a spec means: +// - Moving every complex inline schema to be a definition with an auto-generated name in a depth-first fashion. +// +// By complex, we mean every JSON object with some properties. +// Arrays, when they do not define a tuple, +// or empty objects with or without additionalProperties, are not considered complex and remain inline. +// +// NOTE: rewritten schemas get a vendor extension x-go-gen-location so we know from which part of the spec definitions +// have been created. +// +// Available flattening options: +// - Minimal: stops flattening after minimal $ref processing, leaving schema constructs untouched +// - Expand: expand all $ref's in the document (inoperant if Minimal set to true) +// - Verbose: croaks about name conflicts detected +// - RemoveUnused: removes unused parameters, responses and definitions after expansion/flattening +// +// NOTE: expansion removes all $ref save circular $ref, which remain in place +// +// TODO: additional options +// - ProgagateNameExtensions: ensure that created entries properly follow naming rules when their parent have set a +// x-go-name extension +// - LiftAllOfs: +// - limit the flattening of allOf members when simple objects +// - merge allOf with validation only +// - merge allOf with extensions only +// - ... +// +func Flatten(opts FlattenOpts) error { + debugLog("FlattenOpts: %#v", opts) + // Make sure opts.BasePath is an absolute path + if !filepath.IsAbs(opts.BasePath) { + cwd, _ := os.Getwd() + opts.BasePath = filepath.Join(cwd, opts.BasePath) + } + // make sure drive letter on windows is normalized to lower case + u, _ := url.Parse(opts.BasePath) + opts.BasePath = u.String() + + opts.flattenContext = newContext() + + // recursively expand responses, parameters, path items and items in simple schemas. + // This simplifies the spec and leaves $ref only into schema objects. + expandOpts := opts.ExpandOpts(!opts.Expand) + expandOpts.ContinueOnError = opts.ContinueOnError + if err := swspec.ExpandSpec(opts.Swagger(), expandOpts); err != nil { + return err + } + + // strip current file from $ref's, so we can recognize them as proper definitions + // In particular, this works around for issue go-openapi/spec#76: leading absolute file in $ref is stripped + if err := normalizeRef(&opts); err != nil { + return err + } + + if opts.RemoveUnused { + // optionally removes shared parameters and responses already expanded (now unused) + // default parameters (i.e. under paths) remain. + opts.Swagger().Parameters = nil + opts.Swagger().Responses = nil + } + + opts.Spec.reload() // re-analyze + + // at this point there are no references left but in schemas + + for imported := false; !imported; { + // iteratively import remote references until none left. + // This inlining deals with name conflicts by introducing auto-generated names ("OAIGen") + var err error + if imported, err = importExternalReferences(&opts); err != nil { + return err + } + opts.Spec.reload() // re-analyze + } + + if !opts.Minimal && !opts.Expand { + // full flattening: rewrite inline schemas (schemas that aren't simple types or arrays or maps) + if err := nameInlinedSchemas(&opts); err != nil { + return err + } + + opts.Spec.reload() // re-analyze + } + + // rewrite JSON pointers other than $ref to named definitions + // and attempt to resolve conflicting names whenever possible. + if err := stripPointersAndOAIGen(&opts); err != nil { + return err + } + + if opts.RemoveUnused { + // remove unused definitions + expected := make(map[string]struct{}) + for k := range opts.Swagger().Definitions { + expected[slashpath.Join(definitionsPath, jsonpointer.Escape(k))] = struct{}{} + } + for _, k := range opts.Spec.AllDefinitionReferences() { + delete(expected, k) + } + for k := range expected { + debugLog("removing unused definition %s", slashpath.Base(k)) + if opts.Verbose { + log.Printf("info: removing unused definition: %s", slashpath.Base(k)) + } + delete(opts.Swagger().Definitions, slashpath.Base(k)) + } + opts.Spec.reload() // re-analyze + } + + // TODO: simplify known schema patterns to flat objects with properties + // examples: + // - lift simple allOf object, + // - empty allOf with validation only or extensions only + // - rework allOf arrays + // - rework allOf additionalProperties + + if opts.Verbose { + // issue notifications + croak(&opts) + } + return nil +} + +// isAnalyzedAsComplex determines if an analyzed schema is eligible to flattening (i.e. it is "complex"). +// +// Complex means the schema is any of: +// - a simple type (primitive) +// - an array of something (items are possibly complex ; if this is the case, items will generate a definition) +// - a map of something (additionalProperties are possibly complex ; if this is the case, additionalProperties will +// generate a definition) +func isAnalyzedAsComplex(asch *AnalyzedSchema) bool { + if !asch.IsSimpleSchema && !asch.IsArray && !asch.IsMap { + return true + } + return false +} + +// nameInlinedSchemas replaces every complex inline construct by a named definition. +func nameInlinedSchemas(opts *FlattenOpts) error { + debugLog("nameInlinedSchemas") + namer := &inlineSchemaNamer{ + Spec: opts.Swagger(), + Operations: opRefsByRef(gatherOperations(opts.Spec, nil)), + flattenContext: opts.flattenContext, + opts: opts, + } + depthFirst := sortDepthFirst(opts.Spec.allSchemas) + for _, key := range depthFirst { + sch := opts.Spec.allSchemas[key] + if sch.Schema != nil && sch.Schema.Ref.String() == "" && !sch.TopLevel { // inline schema + asch, err := Schema(SchemaOpts{Schema: sch.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if err != nil { + return fmt.Errorf("schema analysis [%s]: %v", key, err) + } + + if isAnalyzedAsComplex(asch) { // move complex schemas to definitions + if err := namer.Name(key, sch.Schema, asch); err != nil { + return err + } + } + } + } + return nil +} + +var depthGroupOrder = []string{ + "sharedParam", "sharedResponse", "sharedOpParam", "opParam", "codeResponse", "defaultResponse", "definition", +} + +func sortDepthFirst(data map[string]SchemaRef) []string { + // group by category (shared params, op param, statuscode response, default response, definitions) + // sort groups internally by number of parts in the key and lexical names + // flatten groups into a single list of keys + sorted := make([]string, 0, len(data)) + grouped := make(map[string]keys, len(data)) + for k := range data { + split := keyParts(k) + var pk string + if split.IsSharedOperationParam() { + pk = "sharedOpParam" + } + if split.IsOperationParam() { + pk = "opParam" + } + if split.IsStatusCodeResponse() { + pk = "codeResponse" + } + if split.IsDefaultResponse() { + pk = "defaultResponse" + } + if split.IsDefinition() { + pk = "definition" + } + if split.IsSharedParam() { + pk = "sharedParam" + } + if split.IsSharedResponse() { + pk = "sharedResponse" + } + grouped[pk] = append(grouped[pk], key{Segments: len(split), Key: k}) + } + + for _, pk := range depthGroupOrder { + res := grouped[pk] + sort.Sort(res) + for _, v := range res { + sorted = append(sorted, v.Key) + } + } + return sorted +} + +type key struct { + Segments int + Key string +} +type keys []key + +func (k keys) Len() int { return len(k) } +func (k keys) Swap(i, j int) { k[i], k[j] = k[j], k[i] } +func (k keys) Less(i, j int) bool { + return k[i].Segments > k[j].Segments || (k[i].Segments == k[j].Segments && k[i].Key < k[j].Key) +} + +type inlineSchemaNamer struct { + Spec *swspec.Swagger + Operations map[string]opRef + flattenContext *context + opts *FlattenOpts +} + +func opRefsByRef(oprefs map[string]opRef) map[string]opRef { + result := make(map[string]opRef, len(oprefs)) + for _, v := range oprefs { + result[v.Ref.String()] = v + } + return result +} + +func (isn *inlineSchemaNamer) Name(key string, schema *swspec.Schema, aschema *AnalyzedSchema) error { + debugLog("naming inlined schema at %s", key) + + parts := keyParts(key) + for _, name := range namesFromKey(parts, aschema, isn.Operations) { + if name != "" { + // create unique name + newName, isOAIGen := uniqifyName(isn.Spec.Definitions, swag.ToJSONName(name)) + + // clone schema + sch, err := cloneSchema(schema) + if err != nil { + return err + } + + // replace values on schema + if err := rewriteSchemaToRef(isn.Spec, key, + swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { + return fmt.Errorf("error while creating definition %q from inline schema: %v", newName, err) + } + + // rewrite any dependent $ref pointing to this place, + // when not already pointing to a top-level definition. + // + // NOTE: this is important if such referers use arbitrary JSON pointers. + an := New(isn.Spec) + for k, v := range an.references.allRefs { + r, _, erd := deepestRef(isn.opts, v) + if erd != nil { + return fmt.Errorf("at %s, %v", k, erd) + } + if r.String() == key || + r.String() == slashpath.Join(definitionsPath, newName) && + slashpath.Dir(v.String()) != definitionsPath { + debugLog("found a $ref to a rewritten schema: %s points to %s", k, v.String()) + + // rewrite $ref to the new target + if err := updateRef(isn.Spec, k, + swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { + return err + } + } + } + + // NOTE: this extension is currently not used by go-swagger (provided for information only) + sch.AddExtension("x-go-gen-location", genLocation(parts)) + + // save cloned schema to definitions + saveSchema(isn.Spec, newName, sch) + + // keep track of created refs + if isn.flattenContext != nil { + debugLog("track created ref: key=%s, newName=%s, isOAIGen=%t", key, newName, isOAIGen) + resolved := false + if _, ok := isn.flattenContext.newRefs[key]; ok { + resolved = isn.flattenContext.newRefs[key].resolved + } + isn.flattenContext.newRefs[key] = &newRef{ + key: key, + newName: newName, + path: slashpath.Join(definitionsPath, newName), + isOAIGen: isOAIGen, + resolved: resolved, + schema: sch, + } + } + } + } + return nil +} + +// genLocation indicates from which section of the specification (models or operations) a definition has been created. +// +// This is reflected in the output spec with a "x-go-gen-location" extension. At the moment, this is is provided +// for information only. +func genLocation(parts splitKey) string { + if parts.IsOperation() { + return "operations" + } + if parts.IsDefinition() { + return "models" + } + return "" +} + +// uniqifyName yields a unique name for a definition +func uniqifyName(definitions swspec.Definitions, name string) (string, bool) { + isOAIGen := false + if name == "" { + name = "oaiGen" + isOAIGen = true + } + if len(definitions) == 0 { + return name, isOAIGen + } + + unq := true + for k := range definitions { + if strings.EqualFold(k, name) { + unq = false + break + } + } + + if unq { + return name, isOAIGen + } + + name += "OAIGen" + isOAIGen = true + var idx int + unique := name + _, known := definitions[unique] + for known { + idx++ + unique = fmt.Sprintf("%s%d", name, idx) + _, known = definitions[unique] + } + return unique, isOAIGen +} + +func namesFromKey(parts splitKey, aschema *AnalyzedSchema, operations map[string]opRef) []string { + var baseNames [][]string + var startIndex int + if parts.IsOperation() { + // params + if parts.IsOperationParam() || parts.IsSharedOperationParam() { + piref := parts.PathItemRef() + if piref.String() != "" && parts.IsOperationParam() { + if op, ok := operations[piref.String()]; ok { + startIndex = 5 + baseNames = append(baseNames, []string{op.ID, "params", "body"}) + } + } else if parts.IsSharedOperationParam() { + pref := parts.PathRef() + for k, v := range operations { + if strings.HasPrefix(k, pref.String()) { + startIndex = 4 + baseNames = append(baseNames, []string{v.ID, "params", "body"}) + } + } + } + } + // responses + if parts.IsOperationResponse() { + piref := parts.PathItemRef() + if piref.String() != "" { + if op, ok := operations[piref.String()]; ok { + startIndex = 6 + baseNames = append(baseNames, []string{op.ID, parts.ResponseName(), "body"}) + } + } + } + } + + // definitions + if parts.IsDefinition() { + nm := parts.DefinitionName() + if nm != "" { + startIndex = 2 + baseNames = append(baseNames, []string{parts.DefinitionName()}) + } + } + + var result []string + for _, segments := range baseNames { + nm := parts.BuildName(segments, startIndex, aschema) + if nm != "" { + result = append(result, nm) + } + } + sort.Strings(result) + return result +} + +const ( + paths = "paths" + responses = "responses" + parameters = "parameters" + definitions = "definitions" + definitionsPath = "#/definitions" +) + +var ( + ignoredKeys map[string]struct{} + validMethods map[string]struct{} +) + +func init() { + ignoredKeys = map[string]struct{}{ + "schema": {}, + "properties": {}, + "not": {}, + "anyOf": {}, + "oneOf": {}, + } + + validMethods = map[string]struct{}{ + "GET": {}, + "HEAD": {}, + "OPTIONS": {}, + "PATCH": {}, + "POST": {}, + "PUT": {}, + "DELETE": {}, + } +} + +type splitKey []string + +func (s splitKey) IsDefinition() bool { + return len(s) > 1 && s[0] == definitions +} + +func (s splitKey) DefinitionName() string { + if !s.IsDefinition() { + return "" + } + return s[1] +} + +func (s splitKey) isKeyName(i int) bool { + if i <= 0 { + return false + } + count := 0 + for idx := i - 1; idx > 0; idx-- { + if s[idx] != "properties" { + break + } + count++ + } + + return count%2 != 0 +} + +func (s splitKey) BuildName(segments []string, startIndex int, aschema *AnalyzedSchema) string { + for i, part := range s[startIndex:] { + if _, ignored := ignoredKeys[part]; !ignored || s.isKeyName(startIndex+i) { + if part == "items" || part == "additionalItems" { + if aschema.IsTuple || aschema.IsTupleWithExtra { + segments = append(segments, "tuple") + } else { + segments = append(segments, "items") + } + if part == "additionalItems" { + segments = append(segments, part) + } + continue + } + segments = append(segments, part) + } + } + return strings.Join(segments, " ") +} + +func (s splitKey) IsOperation() bool { + return len(s) > 1 && s[0] == paths +} + +func (s splitKey) IsSharedOperationParam() bool { + return len(s) > 2 && s[0] == paths && s[2] == parameters +} + +func (s splitKey) IsSharedParam() bool { + return len(s) > 1 && s[0] == parameters +} + +func (s splitKey) IsOperationParam() bool { + return len(s) > 3 && s[0] == paths && s[3] == parameters +} + +func (s splitKey) IsOperationResponse() bool { + return len(s) > 3 && s[0] == paths && s[3] == responses +} + +func (s splitKey) IsSharedResponse() bool { + return len(s) > 1 && s[0] == responses +} + +func (s splitKey) IsDefaultResponse() bool { + return len(s) > 4 && s[0] == paths && s[3] == responses && s[4] == "default" +} + +func (s splitKey) IsStatusCodeResponse() bool { + isInt := func() bool { + _, err := strconv.Atoi(s[4]) + return err == nil + } + return len(s) > 4 && s[0] == paths && s[3] == responses && isInt() +} + +func (s splitKey) ResponseName() string { + if s.IsStatusCodeResponse() { + code, _ := strconv.Atoi(s[4]) + return http.StatusText(code) + } + if s.IsDefaultResponse() { + return "Default" + } + return "" +} + +func (s splitKey) PathItemRef() swspec.Ref { + if len(s) < 3 { + return swspec.Ref{} + } + pth, method := s[1], s[2] + if _, isValidMethod := validMethods[strings.ToUpper(method)]; !isValidMethod && !strings.HasPrefix(method, "x-") { + return swspec.Ref{} + } + return swspec.MustCreateRef("#" + slashpath.Join("/", paths, jsonpointer.Escape(pth), strings.ToUpper(method))) +} + +func (s splitKey) PathRef() swspec.Ref { + if !s.IsOperation() { + return swspec.Ref{} + } + return swspec.MustCreateRef("#" + slashpath.Join("/", paths, jsonpointer.Escape(s[1]))) +} + +func keyParts(key string) splitKey { + var res []string + for _, part := range strings.Split(key[1:], "/") { + if part != "" { + res = append(res, jsonpointer.Unescape(part)) + } + } + return res +} + +func rewriteSchemaToRef(spec *swspec.Swagger, key string, ref swspec.Ref) error { + debugLog("rewriting schema to ref for %s with %s", key, ref.String()) + _, value, err := getPointerFromKey(spec, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *swspec.Schema: + return rewriteParentRef(spec, key, ref) + + case swspec.Schema: + return rewriteParentRef(spec, key, ref) + + case *swspec.SchemaOrArray: + if refable.Schema != nil { + refable.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + } + + case *swspec.SchemaOrBool: + if refable.Schema != nil { + refable.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + } + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +func rewriteParentRef(spec *swspec.Swagger, key string, ref swspec.Ref) error { + parent, entry, pvalue, err := getParentFromKey(spec, key) + if err != nil { + return err + } + + debugLog("rewriting holder for %T", pvalue) + switch container := pvalue.(type) { + case swspec.Response: + if err := rewriteParentRef(spec, "#"+parent, ref); err != nil { + return err + } + + case *swspec.Response: + container.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case *swspec.Responses: + statusCode, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", key[1:], err) + } + resp := container.StatusCodeResponses[statusCode] + resp.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + container.StatusCodeResponses[statusCode] = resp + + case map[string]swspec.Response: + resp := container[entry] + resp.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + container[entry] = resp + + case swspec.Parameter: + if err := rewriteParentRef(spec, "#"+parent, ref); err != nil { + return err + } + + case map[string]swspec.Parameter: + param := container[entry] + param.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + container[entry] = param + + case []swspec.Parameter: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", key[1:], err) + } + param := container[idx] + param.Schema = &swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + container[idx] = param + + case swspec.Definitions: + container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case map[string]swspec.Schema: + container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case []swspec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", key[1:], err) + } + container[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case *swspec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", key[1:], err) + } + container.Schemas[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled parent schema rewrite %s (%T)", key, pvalue) + } + return nil +} + +func cloneSchema(schema *swspec.Schema) (*swspec.Schema, error) { + var sch swspec.Schema + if err := swag.FromDynamicJSON(schema, &sch); err != nil { + return nil, fmt.Errorf("cannot clone schema: %v", err) + } + return &sch, nil +} + +// importExternalReferences iteratively digs remote references and imports them into the main schema. +// +// At every iteration, new remotes may be found when digging deeper: they are rebased to the current schema before being imported. +// +// This returns true when no more remote references can be found. +func importExternalReferences(opts *FlattenOpts) (bool, error) { + debugLog("importExternalReferences") + + groupedRefs := reverseIndexForSchemaRefs(opts) + sortedRefStr := make([]string, 0, len(groupedRefs)) + if opts.flattenContext == nil { + opts.flattenContext = newContext() + } + + // sort $ref resolution to ensure deterministic name conflict resolution + for refStr := range groupedRefs { + sortedRefStr = append(sortedRefStr, refStr) + } + sort.Strings(sortedRefStr) + + complete := true + + for _, refStr := range sortedRefStr { + entry := groupedRefs[refStr] + if entry.Ref.HasFragmentOnly { + continue + } + complete = false + var isOAIGen bool + + newName := opts.flattenContext.resolved[refStr] + if newName != "" { + // rewrite ref with already resolved external ref (useful for cyclical refs): + // rewrite external refs to local ones + debugLog("resolving known ref [%s] to %s", refStr, newName) + for _, key := range entry.Keys { + if err := updateRef(opts.Swagger(), key, + swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { + return false, err + } + } + } else { + // resolve schemas + debugLog("resolving schema from remote $ref [%s]", refStr) + sch, err := swspec.ResolveRefWithBase(opts.Swagger(), &entry.Ref, opts.ExpandOpts(false)) + if err != nil { + return false, fmt.Errorf("could not resolve schema: %v", err) + } + + // at this stage only $ref analysis matters + partialAnalyzer := &Spec{ + references: referenceAnalysis{}, + patterns: patternAnalysis{}, + enums: enumAnalysis{}, + } + partialAnalyzer.reset() + partialAnalyzer.analyzeSchema("", sch, "/") + + // now rewrite those refs with rebase + for key, ref := range partialAnalyzer.references.allRefs { + if err := updateRef(sch, key, swspec.MustCreateRef(rebaseRef(entry.Ref.String(), ref.String()))); err != nil { + return false, fmt.Errorf("failed to rewrite ref for key %q at %s: %v", key, entry.Ref.String(), err) + } + } + + // generate a unique name - isOAIGen means that a naming conflict was resolved by changing the name + newName, isOAIGen = uniqifyName(opts.Swagger().Definitions, nameFromRef(entry.Ref)) + debugLog("new name for [%s]: %s - with name conflict:%t", + strings.Join(entry.Keys, ", "), newName, isOAIGen) + + opts.flattenContext.resolved[refStr] = newName + + // rewrite the external refs to local ones + for _, key := range entry.Keys { + if err := updateRef(opts.Swagger(), key, + swspec.MustCreateRef(slashpath.Join(definitionsPath, newName))); err != nil { + return false, err + } + + // keep track of created refs + resolved := false + if _, ok := opts.flattenContext.newRefs[key]; ok { + resolved = opts.flattenContext.newRefs[key].resolved + } + debugLog("keeping track of ref: %s (%s), resolved: %t", key, newName, resolved) + opts.flattenContext.newRefs[key] = &newRef{ + key: key, + newName: newName, + path: slashpath.Join(definitionsPath, newName), + isOAIGen: isOAIGen, + resolved: resolved, + schema: sch, + } + } + + // add the resolved schema to the definitions + saveSchema(opts.Swagger(), newName, sch) + } + } + // maintains ref index entries + for k := range opts.flattenContext.newRefs { + r := opts.flattenContext.newRefs[k] + + // update tracking with resolved schemas + if r.schema.Ref.String() != "" { + ref := swspec.MustCreateRef(r.path) + sch, err := swspec.ResolveRefWithBase(opts.Swagger(), &ref, opts.ExpandOpts(false)) + if err != nil { + return false, fmt.Errorf("could not resolve schema: %v", err) + } + r.schema = sch + } + // update tracking with renamed keys: got a cascade of refs + if r.path != k { + renamed := *r + renamed.key = r.path + opts.flattenContext.newRefs[renamed.path] = &renamed + + // indirect ref + r.newName = slashpath.Base(k) + r.schema = swspec.RefSchema(r.path) + r.path = k + r.isOAIGen = strings.Contains(k, "OAIGen") + } + } + + return complete, nil +} + +type refRevIdx struct { + Ref swspec.Ref + Keys []string +} + +// rebaseRef rebase a remote ref relative to a base ref. +// +// NOTE: does not support JSONschema ID for $ref (we assume we are working with swagger specs here). +// +// NOTE(windows): +// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) +// * "/ in paths may appear as escape sequences +func rebaseRef(baseRef string, ref string) string { + debugLog("rebasing ref: %s onto %s", ref, baseRef) + baseRef, _ = url.PathUnescape(baseRef) + ref, _ = url.PathUnescape(ref) + if baseRef == "" || baseRef == "." || strings.HasPrefix(baseRef, "#") { + return ref + } + + parts := strings.Split(ref, "#") + + baseParts := strings.Split(baseRef, "#") + baseURL, _ := url.Parse(baseParts[0]) + if strings.HasPrefix(ref, "#") { + if baseURL.Host == "" { + return strings.Join([]string{baseParts[0], parts[1]}, "#") + } + return strings.Join([]string{baseParts[0], parts[1]}, "#") + } + + refURL, _ := url.Parse(parts[0]) + if refURL.Host != "" || filepath.IsAbs(parts[0]) { + // not rebasing an absolute path + return ref + } + + // there is a relative path + var basePath string + if baseURL.Host != "" { + // when there is a host, standard URI rules apply (with "/") + baseURL.Path = slashpath.Dir(baseURL.Path) + baseURL.Path = slashpath.Join(baseURL.Path, "/"+parts[0]) + return baseURL.String() + } + + // this is a local relative path + // basePart[0] and parts[0] are local filesystem directories/files + basePath = filepath.Dir(baseParts[0]) + relPath := filepath.Join(basePath, string(filepath.Separator)+parts[0]) + if len(parts) > 1 { + return strings.Join([]string{relPath, parts[1]}, "#") + } + return relPath +} + +// normalizePath renders absolute path on remote file refs +// +// NOTE(windows): +// * refs are assumed to have been normalized with drive letter lower cased (from go-openapi/spec) +// * "/ in paths may appear as escape sequences +func normalizePath(ref swspec.Ref, opts *FlattenOpts) (normalizedPath string) { + uri, _ := url.PathUnescape(ref.String()) + if ref.HasFragmentOnly || filepath.IsAbs(uri) { + normalizedPath = uri + return + } + + refURL, _ := url.Parse(uri) + if refURL.Host != "" { + normalizedPath = uri + return + } + + parts := strings.Split(uri, "#") + // BasePath, parts[0] are local filesystem directories, guaranteed to be absolute at this stage + parts[0] = filepath.Join(filepath.Dir(opts.BasePath), parts[0]) + normalizedPath = strings.Join(parts, "#") + return +} + +func reverseIndexForSchemaRefs(opts *FlattenOpts) map[string]refRevIdx { + collected := make(map[string]refRevIdx) + for key, schRef := range opts.Spec.references.schemas { + // normalize paths before sorting, + // so we get together keys in same external file + normalizedPath := normalizePath(schRef, opts) + if entry, ok := collected[normalizedPath]; ok { + entry.Keys = append(entry.Keys, key) + collected[normalizedPath] = entry + } else { + collected[normalizedPath] = refRevIdx{ + Ref: schRef, + Keys: []string{key}, + } + } + } + return collected +} + +func nameFromRef(ref swspec.Ref) string { + u := ref.GetURL() + if u.Fragment != "" { + return swag.ToJSONName(slashpath.Base(u.Fragment)) + } + if u.Path != "" { + bn := slashpath.Base(u.Path) + if bn != "" && bn != "/" { + ext := slashpath.Ext(bn) + if ext != "" { + return swag.ToJSONName(bn[:len(bn)-len(ext)]) + } + return swag.ToJSONName(bn) + } + } + return swag.ToJSONName(strings.Replace(u.Host, ".", " ", -1)) +} + +func saveSchema(spec *swspec.Swagger, name string, schema *swspec.Schema) { + if schema == nil { + return + } + if spec.Definitions == nil { + spec.Definitions = make(map[string]swspec.Schema, 150) + } + spec.Definitions[name] = *schema +} + +// getPointerFromKey retrieves the content of the JSON pointer "key" +func getPointerFromKey(spec interface{}, key string) (string, interface{}, error) { + switch spec.(type) { + case *swspec.Schema: + case *swspec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + if key == "#/" { + return "", spec, nil + } + // unescape chars in key, e.g. "{}" from path params + pth, _ := internal.PathUnescape(key[1:]) + ptr, err := jsonpointer.New(pth) + if err != nil { + return "", nil, err + } + + value, _, err := ptr.Get(spec) + if err != nil { + debugLog("error when getting key: %s with path: %s", key, pth) + return "", nil, err + } + return pth, value, nil +} + +// getParentFromKey retrieves the container of the JSON pointer "key" +func getParentFromKey(spec interface{}, key string) (string, string, interface{}, error) { + switch spec.(type) { + case *swspec.Schema: + case *swspec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + // unescape chars in key, e.g. "{}" from path params + pth, _ := internal.PathUnescape(key[1:]) + + parent, entry := slashpath.Dir(pth), slashpath.Base(pth) + debugLog("getting schema holder at: %s, with entry: %s", parent, entry) + + pptr, err := jsonpointer.New(parent) + if err != nil { + return "", "", nil, err + } + pvalue, _, err := pptr.Get(spec) + if err != nil { + return "", "", nil, fmt.Errorf("can't get parent for %s: %v", parent, err) + } + return parent, entry, pvalue, nil +} + +// updateRef replaces a ref by another one +func updateRef(spec interface{}, key string, ref swspec.Ref) error { + switch spec.(type) { + case *swspec.Schema: + case *swspec.Swagger: + default: + panic("unexpected type used in getPointerFromKey") + } + debugLog("updating ref for %s with %s", key, ref.String()) + pth, value, err := getPointerFromKey(spec, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *swspec.Schema: + refable.Ref = ref + case *swspec.SchemaOrArray: + if refable.Schema != nil { + refable.Schema.Ref = ref + } + case *swspec.SchemaOrBool: + if refable.Schema != nil { + refable.Schema.Ref = ref + } + case swspec.Schema: + debugLog("rewriting holder for %T", refable) + _, entry, pvalue, erp := getParentFromKey(spec, key) + if erp != nil { + return err + } + switch container := pvalue.(type) { + case swspec.Definitions: + container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case map[string]swspec.Schema: + container[entry] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case []swspec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", pth, err) + } + container[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + case *swspec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", pth, err) + } + container.Schemas[idx] = swspec.Schema{SchemaProps: swspec.SchemaProps{Ref: ref}} + + // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled container type at %s: %T", key, value) + } + + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +// updateRefWithSchema replaces a ref with a schema (i.e. re-inline schema) +func updateRefWithSchema(spec *swspec.Swagger, key string, sch *swspec.Schema) error { + debugLog("updating ref for %s with schema", key) + pth, value, err := getPointerFromKey(spec, key) + if err != nil { + return err + } + + switch refable := value.(type) { + case *swspec.Schema: + *refable = *sch + case swspec.Schema: + _, entry, pvalue, erp := getParentFromKey(spec, key) + if erp != nil { + return err + } + switch container := pvalue.(type) { + case swspec.Definitions: + container[entry] = *sch + + case map[string]swspec.Schema: + container[entry] = *sch + + case []swspec.Schema: + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", pth, err) + } + container[idx] = *sch + + case *swspec.SchemaOrArray: + // NOTE: this is necessarily an array - otherwise, the parent would be *Schema + idx, err := strconv.Atoi(entry) + if err != nil { + return fmt.Errorf("%s not a number: %v", pth, err) + } + container.Schemas[idx] = *sch + + // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema + + default: + return fmt.Errorf("unhandled type for parent of [%s]: %T", key, value) + } + case *swspec.SchemaOrArray: + *refable.Schema = *sch + // NOTE: can't have case *swspec.SchemaOrBool = parent in this case is *Schema + case *swspec.SchemaOrBool: + *refable.Schema = *sch + default: + return fmt.Errorf("no schema with ref found at %s for %T", key, value) + } + + return nil +} + +func containsString(names []string, name string) bool { + for _, nm := range names { + if nm == name { + return true + } + } + return false +} + +type opRef struct { + Method string + Path string + Key string + ID string + Op *swspec.Operation + Ref swspec.Ref +} + +type opRefs []opRef + +func (o opRefs) Len() int { return len(o) } +func (o opRefs) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o opRefs) Less(i, j int) bool { return o[i].Key < o[j].Key } + +func gatherOperations(specDoc *Spec, operationIDs []string) map[string]opRef { + var oprefs opRefs + + for method, pathItem := range specDoc.Operations() { + for pth, operation := range pathItem { + vv := *operation + oprefs = append(oprefs, opRef{ + Key: swag.ToGoName(strings.ToLower(method) + " " + pth), + Method: method, + Path: pth, + ID: vv.ID, + Op: &vv, + Ref: swspec.MustCreateRef("#" + slashpath.Join("/paths", jsonpointer.Escape(pth), method)), + }) + } + } + + sort.Sort(oprefs) + + operations := make(map[string]opRef) + for _, opr := range oprefs { + nm := opr.ID + if nm == "" { + nm = opr.Key + } + + oo, found := operations[nm] + if found && oo.Method != opr.Method && oo.Path != opr.Path { + nm = opr.Key + } + if len(operationIDs) == 0 || containsString(operationIDs, opr.ID) || containsString(operationIDs, nm) { + opr.ID = nm + opr.Op.ID = nm + operations[nm] = opr + } + } + return operations +} + +// stripPointersAndOAIGen removes anonymous JSON pointers from spec and chain with name conflicts handler. +// This loops until the spec has no such pointer and all name conflicts have been reduced as much as possible. +func stripPointersAndOAIGen(opts *FlattenOpts) error { + // name all JSON pointers to anonymous documents + if err := namePointers(opts); err != nil { + return err + } + + // remove unnecessary OAIGen ref (created when flattening external refs creates name conflicts) + hasIntroducedPointerOrInline, ers := stripOAIGen(opts) + if ers != nil { + return ers + } + + // iterate as pointer or OAIGen resolution may introduce inline schemas or pointers + for hasIntroducedPointerOrInline { + if !opts.Minimal { + opts.Spec.reload() // re-analyze + if err := nameInlinedSchemas(opts); err != nil { + return err + } + } + + if err := namePointers(opts); err != nil { + return err + } + + // restrip and re-analyze + if hasIntroducedPointerOrInline, ers = stripOAIGen(opts); ers != nil { + return ers + } + } + return nil +} + +func updateRefParents(opts *FlattenOpts, r *newRef) { + if !r.isOAIGen || r.resolved { // bail on already resolved entries (avoid looping) + return + } + for k, v := range opts.Spec.references.allRefs { + if r.path != v.String() { + continue + } + found := false + for _, p := range r.parents { + if p == k { + found = true + break + } + } + if !found { + r.parents = append(r.parents, k) + } + } +} + +// topMostRefs is able to sort refs by hierarchical then lexicographic order, +// yielding refs ordered breadth-first. +type topmostRefs []string + +func (k topmostRefs) Len() int { return len(k) } +func (k topmostRefs) Swap(i, j int) { k[i], k[j] = k[j], k[i] } +func (k topmostRefs) Less(i, j int) bool { + li, lj := len(strings.Split(k[i], "/")), len(strings.Split(k[j], "/")) + if li == lj { + return k[i] < k[j] + } + return li < lj +} + +func topmostFirst(refs []string) []string { + res := topmostRefs(refs) + sort.Sort(res) + return res +} + +// stripOAIGen strips the spec from unnecessary OAIGen constructs, initially created to dedupe flattened definitions. +// +// A dedupe is deemed unnecessary whenever: +// - the only conflict is with its (single) parent: OAIGen is merged into its parent (reinlining) +// - there is a conflict with multiple parents: merge OAIGen in first parent, the rewrite other parents to point to +// the first parent. +// +// This function returns true whenever it re-inlined a complex schema, so the caller may chose to iterate +// pointer and name resolution again. +func stripOAIGen(opts *FlattenOpts) (bool, error) { + debugLog("stripOAIGen") + replacedWithComplex := false + + // figure out referers of OAIGen definitions (doing it before the ref start mutating) + for _, r := range opts.flattenContext.newRefs { + updateRefParents(opts, r) + } + for k := range opts.flattenContext.newRefs { + r := opts.flattenContext.newRefs[k] + debugLog("newRefs[%s]: isOAIGen: %t, resolved: %t, name: %s, path:%s, #parents: %d, parents: %v, ref: %s", + k, r.isOAIGen, r.resolved, r.newName, r.path, len(r.parents), r.parents, r.schema.Ref.String()) + if r.isOAIGen && len(r.parents) >= 1 { + pr := topmostFirst(r.parents) + + // rewrite first parent schema in hierarchical then lexicographical order + debugLog("rewrite first parent %s with schema", pr[0]) + if err := updateRefWithSchema(opts.Swagger(), pr[0], r.schema); err != nil { + return false, err + } + if pa, ok := opts.flattenContext.newRefs[pr[0]]; ok && pa.isOAIGen { + // update parent in ref index entry + debugLog("update parent entry: %s", pr[0]) + pa.schema = r.schema + pa.resolved = false + replacedWithComplex = true + } + + // rewrite other parents to point to first parent + if len(pr) > 1 { + for _, p := range pr[1:] { + replacingRef := swspec.MustCreateRef(pr[0]) + + // set complex when replacing ref is an anonymous jsonpointer: further processing may be required + replacedWithComplex = replacedWithComplex || + slashpath.Dir(replacingRef.String()) != definitionsPath + debugLog("rewrite parent with ref: %s", replacingRef.String()) + + // NOTE: it is possible at this stage to introduce json pointers (to non-definitions places). + // Those are stripped later on. + if err := updateRef(opts.Swagger(), p, replacingRef); err != nil { + return false, err + } + + if pa, ok := opts.flattenContext.newRefs[p]; ok && pa.isOAIGen { + // update parent in ref index + debugLog("update parent entry: %s", p) + pa.schema = r.schema + pa.resolved = false + replacedWithComplex = true + } + } + } + + // remove OAIGen definition + debugLog("removing definition %s", slashpath.Base(r.path)) + delete(opts.Swagger().Definitions, slashpath.Base(r.path)) + + // propagate changes in ref index for keys which have this one as a parent + for kk, value := range opts.flattenContext.newRefs { + if kk == k || !value.isOAIGen || value.resolved { + continue + } + found := false + newParents := make([]string, 0, len(value.parents)) + for _, parent := range value.parents { + switch { + case parent == r.path: + found = true + parent = pr[0] + case strings.HasPrefix(parent, r.path+"/"): + found = true + parent = slashpath.Join(pr[0], strings.TrimPrefix(parent, r.path)) + } + newParents = append(newParents, parent) + } + if found { + value.parents = newParents + } + } + + // mark naming conflict as resolved + debugLog("marking naming conflict resolved for key: %s", r.key) + opts.flattenContext.newRefs[r.key].isOAIGen = false + opts.flattenContext.newRefs[r.key].resolved = true + + // determine if the previous substitution did inline a complex schema + if r.schema != nil && r.schema.Ref.String() == "" { // inline schema + asch, err := Schema(SchemaOpts{Schema: r.schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if err != nil { + return false, err + } + debugLog("re-inlined schema: parent: %s, %t", pr[0], isAnalyzedAsComplex(asch)) + replacedWithComplex = replacedWithComplex || + !(slashpath.Dir(pr[0]) == definitionsPath) && isAnalyzedAsComplex(asch) + } + } + } + + debugLog("replacedWithComplex: %t", replacedWithComplex) + opts.Spec.reload() // re-analyze + return replacedWithComplex, nil +} + +// croak logs notifications and warnings about valid, but possibly unwanted constructs resulting +// from flattening a spec +func croak(opts *FlattenOpts) { + reported := make(map[string]bool, len(opts.flattenContext.newRefs)) + for _, v := range opts.Spec.references.allRefs { + // warns about duplicate handling + for _, r := range opts.flattenContext.newRefs { + if r.isOAIGen && r.path == v.String() { + reported[r.newName] = true + } + } + } + for k := range reported { + log.Printf("warning: duplicate flattened definition name resolved as %s", k) + } + // warns about possible type mismatches + uniqueMsg := make(map[string]bool) + for _, msg := range opts.flattenContext.warnings { + if _, ok := uniqueMsg[msg]; ok { + continue + } + log.Printf("warning: %s", msg) + uniqueMsg[msg] = true + } +} + +// namePointers replaces all JSON pointers to anonymous documents by a $ref to a new named definitions. +// +// This is carried on depth-first. Pointers to $refs which are top level definitions are replaced by the $ref itself. +// Pointers to simple types are expanded, unless they express commonality (i.e. several such $ref are used). +func namePointers(opts *FlattenOpts) error { + debugLog("name pointers") + refsToReplace := make(map[string]SchemaRef, len(opts.Spec.references.schemas)) + for k, ref := range opts.Spec.references.allRefs { + if slashpath.Dir(ref.String()) == definitionsPath { + // this a ref to a top-level definition: ok + continue + } + replacingRef, sch, erd := deepestRef(opts, ref) + if erd != nil { + return fmt.Errorf("at %s, %v", k, erd) + } + debugLog("planning pointer to replace at %s: %s, resolved to: %s", k, ref.String(), replacingRef.String()) + refsToReplace[k] = SchemaRef{ + Name: k, // caller + Ref: replacingRef, // callee + Schema: sch, + TopLevel: slashpath.Dir(replacingRef.String()) == definitionsPath, + } + } + depthFirst := sortDepthFirst(refsToReplace) + namer := &inlineSchemaNamer{ + Spec: opts.Swagger(), + Operations: opRefsByRef(gatherOperations(opts.Spec, nil)), + flattenContext: opts.flattenContext, + opts: opts, + } + + for _, key := range depthFirst { + v := refsToReplace[key] + // update current replacement, which may have been updated by previous changes of deeper elements + replacingRef, sch, erd := deepestRef(opts, v.Ref) + if erd != nil { + return fmt.Errorf("at %s, %v", key, erd) + } + v.Ref = replacingRef + v.Schema = sch + v.TopLevel = slashpath.Dir(replacingRef.String()) == definitionsPath + debugLog("replacing pointer at %s: resolved to: %s", key, v.Ref.String()) + + if v.TopLevel { + debugLog("replace pointer %s by canonical definition: %s", key, v.Ref.String()) + // if the schema is a $ref to a top level definition, just rewrite the pointer to this $ref + if err := updateRef(opts.Swagger(), key, v.Ref); err != nil { + return err + } + } else { + // this is a JSON pointer to an anonymous document (internal or external): + // create a definition for this schema when: + // - it is a complex schema + // - or it is pointed by more than one $ref (i.e. expresses commonality) + // otherwise, expand the pointer (single reference to a simple type) + // + // The named definition for this follows the target's key, not the caller's + debugLog("namePointers at %s for %s", key, v.Ref.String()) + + // qualify the expanded schema + /* + if key == "#/paths/~1some~1where~1{id}/get/parameters/1/items" { + // DEBUG + //func getPointerFromKey(spec interface{}, key string) (string, interface{}, error) { + k, res, err := getPointerFromKey(namer.Spec, key) + debugLog("k = %s, res=%#v, err=%v", k, res, err) + } + */ + asch, ers := Schema(SchemaOpts{Schema: v.Schema, Root: opts.Swagger(), BasePath: opts.BasePath}) + if ers != nil { + return fmt.Errorf("schema analysis [%s]: %v", key, ers) + } + callers := make([]string, 0, 64) + + debugLog("looking for callers") + an := New(opts.Swagger()) + for k, w := range an.references.allRefs { + r, _, erd := deepestRef(opts, w) + if erd != nil { + return fmt.Errorf("at %s, %v", key, erd) + } + if r.String() == v.Ref.String() { + callers = append(callers, k) + } + } + debugLog("callers for %s: %d", v.Ref.String(), len(callers)) + if len(callers) == 0 { + // has already been updated and resolved + continue + } + + parts := keyParts(v.Ref.String()) + debugLog("number of callers for %s: %d", v.Ref.String(), len(callers)) + // identifying edge case when the namer did nothing because we point to a non-schema object + // no definition is created and we expand the $ref for all callers + if (!asch.IsSimpleSchema || len(callers) > 1) && !parts.IsSharedParam() && !parts.IsSharedResponse() { + debugLog("replace JSON pointer at [%s] by definition: %s", key, v.Ref.String()) + if err := namer.Name(v.Ref.String(), v.Schema, asch); err != nil { + return err + } + + // regular case: we named the $ref as a definition, and we move all callers to this new $ref + for _, caller := range callers { + if caller != key { + // move $ref for next to resolve + debugLog("identified caller of %s at [%s]", v.Ref.String(), caller) + c := refsToReplace[caller] + c.Ref = v.Ref + refsToReplace[caller] = c + } + } + } else { + debugLog("expand JSON pointer for key=%s", key) + if err := updateRefWithSchema(opts.Swagger(), key, v.Schema); err != nil { + return err + } + // NOTE: there is no other caller to update + } + } + } + opts.Spec.reload() // re-analyze + return nil +} + +// deepestRef finds the first definition ref, from a cascade of nested refs which are not definitions. +// - if no definition is found, returns the deepest ref. +// - pointers to external files are expanded +// +// NOTE: all external $ref's are assumed to be already expanded at this stage. +func deepestRef(opts *FlattenOpts, ref swspec.Ref) (swspec.Ref, *swspec.Schema, error) { + if !ref.HasFragmentOnly { + // we found an external $ref, which is odd + // does nothing on external $refs + return ref, nil, nil + } + currentRef := ref + visited := make(map[string]bool, 64) +DOWNREF: + for currentRef.String() != "" { + if slashpath.Dir(currentRef.String()) == definitionsPath { + // this is a top-level definition: stop here and return this ref + return currentRef, nil, nil + } + if _, beenThere := visited[currentRef.String()]; beenThere { + return swspec.Ref{}, nil, + fmt.Errorf("cannot resolve cyclic chain of pointers under %s", currentRef.String()) + } + visited[currentRef.String()] = true + value, _, err := currentRef.GetPointer().Get(opts.Swagger()) + if err != nil { + return swspec.Ref{}, nil, err + } + switch refable := value.(type) { + case *swspec.Schema: + if refable.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Ref + + case swspec.Schema: + if refable.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Ref + + case *swspec.SchemaOrArray: + if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Schema.Ref + + case *swspec.SchemaOrBool: + if refable.Schema == nil || refable.Schema != nil && refable.Schema.Ref.String() == "" { + break DOWNREF + } + currentRef = refable.Schema.Ref + + case swspec.Response: + // a pointer points to a schema initially marshalled in responses section... + // Attempt to convert this to a schema. If this fails, the spec is invalid + asJSON, _ := refable.MarshalJSON() + var asSchema swspec.Schema + err := asSchema.UnmarshalJSON(asJSON) + if err != nil { + return swspec.Ref{}, nil, + fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", + currentRef.String(), value) + + } + opts.flattenContext.warnings = append(opts.flattenContext.warnings, + fmt.Sprintf("found $ref %q (response) interpreted as schema", currentRef.String())) + + if asSchema.Ref.String() == "" { + break DOWNREF + } + currentRef = asSchema.Ref + + case swspec.Parameter: + // a pointer points to a schema initially marshalled in parameters section... + // Attempt to convert this to a schema. If this fails, the spec is invalid + asJSON, _ := refable.MarshalJSON() + var asSchema swspec.Schema + err := asSchema.UnmarshalJSON(asJSON) + if err != nil { + return swspec.Ref{}, nil, + fmt.Errorf("invalid type for resolved JSON pointer %s. Expected a schema a, got: %T", + currentRef.String(), value) + + } + opts.flattenContext.warnings = append(opts.flattenContext.warnings, + fmt.Sprintf("found $ref %q (parameter) interpreted as schema", currentRef.String())) + + if asSchema.Ref.String() == "" { + break DOWNREF + } + currentRef = asSchema.Ref + + default: + return swspec.Ref{}, nil, + fmt.Errorf("unhandled type to resolve JSON pointer %s. Expected a Schema, got: %T", + currentRef.String(), value) + + } + } + // assess what schema we're ending with + sch, erv := swspec.ResolveRefWithBase(opts.Swagger(), ¤tRef, opts.ExpandOpts(false)) + if erv != nil { + return swspec.Ref{}, nil, erv + } + if sch == nil { + return swspec.Ref{}, nil, fmt.Errorf("no schema found at %s", currentRef.String()) + } + return currentRef, sch, nil +} + +// normalizeRef strips the current file from any $ref. This works around issue go-openapi/spec#76: +// leading absolute file in $ref is stripped +func normalizeRef(opts *FlattenOpts) error { + debugLog("normalizeRef") + opts.Spec.reload() // re-analyze + for k, w := range opts.Spec.references.allRefs { + if strings.HasPrefix(w.String(), opts.BasePath+definitionsPath) { // may be a mix of / and \, depending on OS + // strip base path from definition + debugLog("stripping absolute path for: %s", w.String()) + if err := updateRef(opts.Swagger(), k, + swspec.MustCreateRef(slashpath.Join(definitionsPath, slashpath.Base(w.String())))); err != nil { + return err + } + } + } + opts.Spec.reload() // re-analyze + return nil +} diff --git a/vendor/github.com/go-openapi/analysis/go.mod b/vendor/github.com/go-openapi/analysis/go.mod new file mode 100644 index 00000000000..8dea2d99103 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/go.mod @@ -0,0 +1,23 @@ +module github.com/go-openapi/analysis + +require ( + github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect + github.com/go-openapi/errors v0.19.3 // indirect + github.com/go-openapi/jsonpointer v0.19.3 + github.com/go-openapi/jsonreference v0.19.3 // indirect + github.com/go-openapi/loads v0.19.0 + github.com/go-openapi/spec v0.19.6 + github.com/go-openapi/strfmt v0.19.4 + github.com/go-openapi/swag v0.19.7 + github.com/kr/pty v1.1.5 // indirect + github.com/mailru/easyjson v0.7.1 // indirect + github.com/stretchr/testify v1.3.0 + go.mongodb.org/mongo-driver v1.3.0 // indirect + golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect + golang.org/x/net v0.0.0-20200226121028-0de0cce0169b // indirect + golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f // indirect + golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 // indirect + gopkg.in/yaml.v2 v2.2.8 // indirect +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/analysis/go.sum b/vendor/github.com/go-openapi/analysis/go.sum new file mode 100644 index 00000000000..82636eaebe0 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/go.sum @@ -0,0 +1,186 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +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/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3 h1:7MGZI1ibQDLasvAz8HuhvYk9eNJbJkCOXWsSjjMS+Zc= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.19.0 h1:wCOBNscACI8L93tt5tvB2zOMkJ098XCw3fP0BY2ybDA= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6 h1:rMMMj8cV38KVXK7SFc+I2MWClbEfbK705+j+dyqun5g= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.2 h1:clPGfBnJohokno0e+d7hs6Yocrzjlgz6EsQSDncCRnE= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4 h1:eRvaqAhpL0IL6Trh5fDsGnGhiXndzHFuA05w6sXH6/g= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7 h1:VRuXN2EnMSsZdauzdss6JBC29YotDqG59BZ+tdlIL1s= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/analysis/internal/post_go18.go b/vendor/github.com/go-openapi/analysis/internal/post_go18.go new file mode 100644 index 00000000000..f96f55c0873 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/post_go18.go @@ -0,0 +1,29 @@ +// +build go1.8 + +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import "net/url" + +// PathUnescape provides url.PathUnescape(), with seamless +// go version support for pre-go1.8 +// +// TODO: this function is currently defined in go-openapi/swag, +// but unexported. We might chose to export it, or simple phase +// out pre-go1.8 support. +func PathUnescape(path string) (string, error) { + return url.PathUnescape(path) +} diff --git a/vendor/github.com/go-openapi/analysis/internal/pre_go18.go b/vendor/github.com/go-openapi/analysis/internal/pre_go18.go new file mode 100644 index 00000000000..4cc64418220 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/internal/pre_go18.go @@ -0,0 +1,29 @@ +// +build !go1.8 + +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import "net/url" + +// PathUnescape provides url.PathUnescape(), with seamless +// go version support for pre-go1.8 +// +// TODO: this function is currently defined in go-openapi/swag, +// but unexported. We might chose to export it, or simple phase +// out pre-go1.8 support. +func PathUnescape(path string) (string, error) { + return url.QueryUnescape(path) +} diff --git a/vendor/github.com/go-openapi/analysis/mixin.go b/vendor/github.com/go-openapi/analysis/mixin.go new file mode 100644 index 00000000000..d5797042a73 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/mixin.go @@ -0,0 +1,431 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package analysis + +import ( + "fmt" + "reflect" + + "github.com/go-openapi/spec" +) + +// Mixin modifies the primary swagger spec by adding the paths and +// definitions from the mixin specs. Top level parameters and +// responses from the mixins are also carried over. Operation id +// collisions are avoided by appending "Mixin" but only if +// needed. +// +// The following parts of primary are subject to merge, filling empty details +// - Info +// - BasePath +// - Host +// - ExternalDocs +// +// Consider calling FixEmptyResponseDescriptions() on the modified primary +// if you read them from storage and they are valid to start with. +// +// Entries in "paths", "definitions", "parameters" and "responses" are +// added to the primary in the order of the given mixins. If the entry +// already exists in primary it is skipped with a warning message. +// +// The count of skipped entries (from collisions) is returned so any +// deviation from the number expected can flag a warning in your build +// scripts. Carefully review the collisions before accepting them; +// consider renaming things if possible. +// +// No key normalization takes place (paths, type defs, +// etc). Ensure they are canonical if your downstream tools do +// key normalization of any form. +// +// Merging schemes (http, https), and consumers/producers do not account for +// collisions. +func Mixin(primary *spec.Swagger, mixins ...*spec.Swagger) []string { + skipped := make([]string, 0, len(mixins)) + opIds := getOpIds(primary) + initPrimary(primary) + + for i, m := range mixins { + skipped = append(skipped, mergeSwaggerProps(primary, m)...) + + skipped = append(skipped, mergeConsumes(primary, m)...) + + skipped = append(skipped, mergeProduces(primary, m)...) + + skipped = append(skipped, mergeTags(primary, m)...) + + skipped = append(skipped, mergeSchemes(primary, m)...) + + skipped = append(skipped, mergeSecurityDefinitions(primary, m)...) + + skipped = append(skipped, mergeSecurityRequirements(primary, m)...) + + skipped = append(skipped, mergeDefinitions(primary, m)...) + + // merging paths requires a map of operationIDs to work with + skipped = append(skipped, mergePaths(primary, m, opIds, i)...) + + skipped = append(skipped, mergeParameters(primary, m)...) + + skipped = append(skipped, mergeResponses(primary, m)...) + } + return skipped +} + +// getOpIds extracts all the paths..operationIds from the given +// spec and returns them as the keys in a map with 'true' values. +func getOpIds(s *spec.Swagger) map[string]bool { + rv := make(map[string]bool) + if s.Paths == nil { + return rv + } + for _, v := range s.Paths.Paths { + piops := pathItemOps(v) + for _, op := range piops { + rv[op.ID] = true + } + } + return rv +} + +func pathItemOps(p spec.PathItem) []*spec.Operation { + var rv []*spec.Operation + rv = appendOp(rv, p.Get) + rv = appendOp(rv, p.Put) + rv = appendOp(rv, p.Post) + rv = appendOp(rv, p.Delete) + rv = appendOp(rv, p.Head) + rv = appendOp(rv, p.Patch) + return rv +} + +func appendOp(ops []*spec.Operation, op *spec.Operation) []*spec.Operation { + if op == nil { + return ops + } + return append(ops, op) +} + +func mergeSecurityDefinitions(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for k, v := range m.SecurityDefinitions { + if _, exists := primary.SecurityDefinitions[k]; exists { + warn := fmt.Sprintf( + "SecurityDefinitions entry '%v' already exists in primary or higher priority mixin, skipping\n", k) + skipped = append(skipped, warn) + continue + } + primary.SecurityDefinitions[k] = v + } + return +} + +func mergeSecurityRequirements(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for _, v := range m.Security { + found := false + for _, vv := range primary.Security { + if reflect.DeepEqual(v, vv) { + found = true + break + } + } + if found { + warn := fmt.Sprintf( + "Security requirement: '%v' already exists in primary or higher priority mixin, skipping\n", v) + skipped = append(skipped, warn) + continue + } + primary.Security = append(primary.Security, v) + } + return +} + +func mergeDefinitions(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for k, v := range m.Definitions { + // assume name collisions represent IDENTICAL type. careful. + if _, exists := primary.Definitions[k]; exists { + warn := fmt.Sprintf( + "definitions entry '%v' already exists in primary or higher priority mixin, skipping\n", k) + skipped = append(skipped, warn) + continue + } + primary.Definitions[k] = v + } + return +} + +func mergePaths(primary *spec.Swagger, m *spec.Swagger, opIds map[string]bool, mixIndex int) (skipped []string) { + if m.Paths != nil { + for k, v := range m.Paths.Paths { + if _, exists := primary.Paths.Paths[k]; exists { + warn := fmt.Sprintf( + "paths entry '%v' already exists in primary or higher priority mixin, skipping\n", k) + skipped = append(skipped, warn) + continue + } + + // Swagger requires that operationIds be + // unique within a spec. If we find a + // collision we append "Mixin0" to the + // operatoinId we are adding, where 0 is mixin + // index. We assume that operationIds with + // all the proivded specs are already unique. + piops := pathItemOps(v) + for _, piop := range piops { + if opIds[piop.ID] { + piop.ID = fmt.Sprintf("%v%v%v", piop.ID, "Mixin", mixIndex) + } + opIds[piop.ID] = true + } + primary.Paths.Paths[k] = v + } + } + return +} + +func mergeParameters(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for k, v := range m.Parameters { + // could try to rename on conflict but would + // have to fix $refs in the mixin. Complain + // for now + if _, exists := primary.Parameters[k]; exists { + warn := fmt.Sprintf( + "top level parameters entry '%v' already exists in primary or higher priority mixin, skipping\n", k) + skipped = append(skipped, warn) + continue + } + primary.Parameters[k] = v + } + return +} + +func mergeResponses(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for k, v := range m.Responses { + // could try to rename on conflict but would + // have to fix $refs in the mixin. Complain + // for now + if _, exists := primary.Responses[k]; exists { + warn := fmt.Sprintf( + "top level responses entry '%v' already exists in primary or higher priority mixin, skipping\n", k) + skipped = append(skipped, warn) + continue + } + primary.Responses[k] = v + } + return skipped +} + +func mergeConsumes(primary *spec.Swagger, m *spec.Swagger) []string { + for _, v := range m.Consumes { + found := false + for _, vv := range primary.Consumes { + if v == vv { + found = true + break + } + } + if found { + // no warning here: we just skip it + continue + } + primary.Consumes = append(primary.Consumes, v) + } + return []string{} +} + +func mergeProduces(primary *spec.Swagger, m *spec.Swagger) []string { + for _, v := range m.Produces { + found := false + for _, vv := range primary.Produces { + if v == vv { + found = true + break + } + } + if found { + // no warning here: we just skip it + continue + } + primary.Produces = append(primary.Produces, v) + } + return []string{} +} + +func mergeTags(primary *spec.Swagger, m *spec.Swagger) (skipped []string) { + for _, v := range m.Tags { + found := false + for _, vv := range primary.Tags { + if v.Name == vv.Name { + found = true + break + } + } + if found { + warn := fmt.Sprintf( + "top level tags entry with name '%v' already exists in primary or higher priority mixin, skipping\n", v.Name) + skipped = append(skipped, warn) + continue + } + primary.Tags = append(primary.Tags, v) + } + return +} + +func mergeSchemes(primary *spec.Swagger, m *spec.Swagger) []string { + for _, v := range m.Schemes { + found := false + for _, vv := range primary.Schemes { + if v == vv { + found = true + break + } + } + if found { + // no warning here: we just skip it + continue + } + primary.Schemes = append(primary.Schemes, v) + } + return []string{} +} + +func mergeSwaggerProps(primary *spec.Swagger, m *spec.Swagger) []string { + var skipped []string + primary.Extensions, skipped = mergeExtensions(primary.Extensions, m.Extensions) + + // merging details in swagger top properties + if primary.Host == "" { + primary.Host = m.Host + } + if primary.BasePath == "" { + primary.BasePath = m.BasePath + } + if primary.Info == nil { + primary.Info = m.Info + } else if m.Info != nil { + var sk []string + primary.Info.Extensions, sk = mergeExtensions(primary.Info.Extensions, m.Info.Extensions) + skipped = append(skipped, sk...) + if primary.Info.Description == "" { + primary.Info.Description = m.Info.Description + } + if primary.Info.Title == "" { + primary.Info.Description = m.Info.Description + } + if primary.Info.TermsOfService == "" { + primary.Info.TermsOfService = m.Info.TermsOfService + } + if primary.Info.Version == "" { + primary.Info.Version = m.Info.Version + } + + if primary.Info.Contact == nil { + primary.Info.Contact = m.Info.Contact + } else if m.Info.Contact != nil { + var csk []string + primary.Info.Contact.Extensions, csk = mergeExtensions(primary.Info.Contact.Extensions, m.Info.Contact.Extensions) + skipped = append(skipped, csk...) + if primary.Info.Contact.Name == "" { + primary.Info.Contact.Name = m.Info.Contact.Name + } + if primary.Info.Contact.URL == "" { + primary.Info.Contact.URL = m.Info.Contact.URL + } + if primary.Info.Contact.Email == "" { + primary.Info.Contact.Email = m.Info.Contact.Email + } + } + + if primary.Info.License == nil { + primary.Info.License = m.Info.License + } else if m.Info.License != nil { + var lsk []string + primary.Info.License.Extensions, lsk = mergeExtensions(primary.Info.License.Extensions, m.Info.License.Extensions) + skipped = append(skipped, lsk...) + if primary.Info.License.Name == "" { + primary.Info.License.Name = m.Info.License.Name + } + if primary.Info.License.URL == "" { + primary.Info.License.URL = m.Info.License.URL + } + } + + } + if primary.ExternalDocs == nil { + primary.ExternalDocs = m.ExternalDocs + } else if m.ExternalDocs != nil { + if primary.ExternalDocs.Description == "" { + primary.ExternalDocs.Description = m.ExternalDocs.Description + } + if primary.ExternalDocs.URL == "" { + primary.ExternalDocs.URL = m.ExternalDocs.URL + } + } + return skipped +} + +func mergeExtensions(primary spec.Extensions, m spec.Extensions) (result spec.Extensions, skipped []string) { + if primary == nil { + result = m + return + } + if m == nil { + result = primary + return + } + result = primary + for k, v := range m { + if _, found := primary[k]; found { + skipped = append(skipped, k) + continue + } + primary[k] = v + } + return +} + +func initPrimary(primary *spec.Swagger) { + if primary.SecurityDefinitions == nil { + primary.SecurityDefinitions = make(map[string]*spec.SecurityScheme) + } + if primary.Security == nil { + primary.Security = make([]map[string][]string, 0, 10) + } + if primary.Produces == nil { + primary.Produces = make([]string, 0, 10) + } + if primary.Consumes == nil { + primary.Consumes = make([]string, 0, 10) + } + if primary.Tags == nil { + primary.Tags = make([]spec.Tag, 0, 10) + } + if primary.Schemes == nil { + primary.Schemes = make([]string, 0, 10) + } + if primary.Paths == nil { + primary.Paths = &spec.Paths{Paths: make(map[string]spec.PathItem)} + } + if primary.Paths.Paths == nil { + primary.Paths.Paths = make(map[string]spec.PathItem) + } + if primary.Definitions == nil { + primary.Definitions = make(spec.Definitions) + } + if primary.Parameters == nil { + primary.Parameters = make(map[string]spec.Parameter) + } + if primary.Responses == nil { + primary.Responses = make(map[string]spec.Response) + } +} diff --git a/vendor/github.com/go-openapi/analysis/schema.go b/vendor/github.com/go-openapi/analysis/schema.go new file mode 100644 index 00000000000..398c7806394 --- /dev/null +++ b/vendor/github.com/go-openapi/analysis/schema.go @@ -0,0 +1,234 @@ +package analysis + +import ( + "fmt" + + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" +) + +// SchemaOpts configures the schema analyzer +type SchemaOpts struct { + Schema *spec.Schema + Root interface{} + BasePath string + _ struct{} +} + +// Schema analysis, will classify the schema according to known +// patterns. +func Schema(opts SchemaOpts) (*AnalyzedSchema, error) { + if opts.Schema == nil { + return nil, fmt.Errorf("no schema to analyze") + } + + a := &AnalyzedSchema{ + schema: opts.Schema, + root: opts.Root, + basePath: opts.BasePath, + } + + a.initializeFlags() + a.inferKnownType() + a.inferEnum() + a.inferBaseType() + + if err := a.inferMap(); err != nil { + return nil, err + } + if err := a.inferArray(); err != nil { + return nil, err + } + + a.inferTuple() + + if err := a.inferFromRef(); err != nil { + return nil, err + } + + a.inferSimpleSchema() + return a, nil +} + +// AnalyzedSchema indicates what the schema represents +type AnalyzedSchema struct { + schema *spec.Schema + root interface{} + basePath string + + hasProps bool + hasAllOf bool + hasItems bool + hasAdditionalProps bool + hasAdditionalItems bool + hasRef bool + + IsKnownType bool + IsSimpleSchema bool + IsArray bool + IsSimpleArray bool + IsMap bool + IsSimpleMap bool + IsExtendedObject bool + IsTuple bool + IsTupleWithExtra bool + IsBaseType bool + IsEnum bool +} + +// Inherits copies value fields from other onto this schema +func (a *AnalyzedSchema) inherits(other *AnalyzedSchema) { + if other == nil { + return + } + a.hasProps = other.hasProps + a.hasAllOf = other.hasAllOf + a.hasItems = other.hasItems + a.hasAdditionalItems = other.hasAdditionalItems + a.hasAdditionalProps = other.hasAdditionalProps + a.hasRef = other.hasRef + + a.IsKnownType = other.IsKnownType + a.IsSimpleSchema = other.IsSimpleSchema + a.IsArray = other.IsArray + a.IsSimpleArray = other.IsSimpleArray + a.IsMap = other.IsMap + a.IsSimpleMap = other.IsSimpleMap + a.IsExtendedObject = other.IsExtendedObject + a.IsTuple = other.IsTuple + a.IsTupleWithExtra = other.IsTupleWithExtra + a.IsBaseType = other.IsBaseType + a.IsEnum = other.IsEnum +} + +func (a *AnalyzedSchema) inferFromRef() error { + if a.hasRef { + sch := new(spec.Schema) + sch.Ref = a.schema.Ref + err := spec.ExpandSchema(sch, a.root, nil) + if err != nil { + return err + } + rsch, err := Schema(SchemaOpts{ + Schema: sch, + Root: a.root, + BasePath: a.basePath, + }) + if err != nil { + // NOTE(fredbi): currently the only cause for errors is + // unresolved ref. Since spec.ExpandSchema() expands the + // schema recursively, there is no chance to get there, + // until we add more causes for error in this schema analysis. + return err + } + a.inherits(rsch) + } + return nil +} + +func (a *AnalyzedSchema) inferSimpleSchema() { + a.IsSimpleSchema = a.IsKnownType || a.IsSimpleArray || a.IsSimpleMap +} + +func (a *AnalyzedSchema) inferKnownType() { + tpe := a.schema.Type + format := a.schema.Format + a.IsKnownType = tpe.Contains("boolean") || + tpe.Contains("integer") || + tpe.Contains("number") || + tpe.Contains("string") || + (format != "" && strfmt.Default.ContainsName(format)) || + (a.isObjectType() && !a.hasProps && !a.hasAllOf && !a.hasAdditionalProps && !a.hasAdditionalItems) +} + +func (a *AnalyzedSchema) inferMap() error { + if a.isObjectType() { + hasExtra := a.hasProps || a.hasAllOf + a.IsMap = a.hasAdditionalProps && !hasExtra + a.IsExtendedObject = a.hasAdditionalProps && hasExtra + if a.IsMap { + if a.schema.AdditionalProperties.Schema != nil { + msch, err := Schema(SchemaOpts{ + Schema: a.schema.AdditionalProperties.Schema, + Root: a.root, + BasePath: a.basePath, + }) + if err != nil { + return err + } + a.IsSimpleMap = msch.IsSimpleSchema + } else if a.schema.AdditionalProperties.Allows { + a.IsSimpleMap = true + } + } + } + return nil +} + +func (a *AnalyzedSchema) inferArray() error { + // an array has Items defined as an object schema, otherwise we qualify this JSON array as a tuple + // (yes, even if the Items array contains only one element). + // arrays in JSON schema may be unrestricted (i.e no Items specified). + // Note that arrays in Swagger MUST have Items. Nonetheless, we analyze unrestricted arrays. + // + // NOTE: the spec package misses the distinction between: + // items: [] and items: {}, so we consider both arrays here. + a.IsArray = a.isArrayType() && (a.schema.Items == nil || a.schema.Items.Schemas == nil) + if a.IsArray && a.hasItems { + if a.schema.Items.Schema != nil { + itsch, err := Schema(SchemaOpts{ + Schema: a.schema.Items.Schema, + Root: a.root, + BasePath: a.basePath, + }) + if err != nil { + return err + } + a.IsSimpleArray = itsch.IsSimpleSchema + } + } + if a.IsArray && !a.hasItems { + a.IsSimpleArray = true + } + return nil +} + +func (a *AnalyzedSchema) inferTuple() { + tuple := a.hasItems && a.schema.Items.Schemas != nil + a.IsTuple = tuple && !a.hasAdditionalItems + a.IsTupleWithExtra = tuple && a.hasAdditionalItems +} + +func (a *AnalyzedSchema) inferBaseType() { + if a.isObjectType() { + a.IsBaseType = a.schema.Discriminator != "" + } +} + +func (a *AnalyzedSchema) inferEnum() { + a.IsEnum = len(a.schema.Enum) > 0 +} + +func (a *AnalyzedSchema) initializeFlags() { + a.hasProps = len(a.schema.Properties) > 0 + a.hasAllOf = len(a.schema.AllOf) > 0 + a.hasRef = a.schema.Ref.String() != "" + + a.hasItems = a.schema.Items != nil && + (a.schema.Items.Schema != nil || len(a.schema.Items.Schemas) > 0) + + a.hasAdditionalProps = a.schema.AdditionalProperties != nil && + (a.schema.AdditionalProperties != nil || a.schema.AdditionalProperties.Allows) + + a.hasAdditionalItems = a.schema.AdditionalItems != nil && + (a.schema.AdditionalItems.Schema != nil || a.schema.AdditionalItems.Allows) + +} + +func (a *AnalyzedSchema) isObjectType() bool { + return !a.hasRef && (a.schema.Type == nil || a.schema.Type.Contains("") || a.schema.Type.Contains("object")) +} + +func (a *AnalyzedSchema) isArrayType() bool { + return !a.hasRef && (a.schema.Type != nil && a.schema.Type.Contains("array")) +} diff --git a/vendor/github.com/go-openapi/errors/.gitignore b/vendor/github.com/go-openapi/errors/.gitignore new file mode 100644 index 00000000000..dd91ed6a04e --- /dev/null +++ b/vendor/github.com/go-openapi/errors/.gitignore @@ -0,0 +1,2 @@ +secrets.yml +coverage.out diff --git a/vendor/github.com/go-openapi/errors/.golangci.yml b/vendor/github.com/go-openapi/errors/.golangci.yml new file mode 100644 index 00000000000..6badaf1549f --- /dev/null +++ b/vendor/github.com/go-openapi/errors/.golangci.yml @@ -0,0 +1,20 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 30 + maligned: + suggest-new: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 4 +linters: + enable-all: true + disable: + - maligned + - lll + - gochecknoglobals diff --git a/vendor/github.com/go-openapi/errors/.travis.yml b/vendor/github.com/go-openapi/errors/.travis.yml new file mode 100644 index 00000000000..119ec698185 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/.travis.yml @@ -0,0 +1,13 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.13.x +- 1.14.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +language: go +notifications: + slack: + secure: gZGp9NaHxi7zawlXJXKY92BGeDR1x0tbIcTyU5nMKLq0fhIaiEBJEeALwZ4VgqsSv3DytSSF5mLH8fevAM3ixE6hxjKQ+lQuf7V/w3btCN1CSWgoua5LOh1kTnqZQtJuRvO4pzoJcT3bJWBsVZ07VGNVzzJEy/zAKCHFqBUCXShw7QemlLBcYWFNqveTlvDIfCzvouoLnPoXwxEpkjxe9uz/ZKZgAnup/fXjC8RFctmgCnkCyvJTk0Y/fZCsufixJrJhshBWTnlrFCzRmgNkz2d+i1Ls3+MJ5EJJ2Tx/A5S63dL49J1f9Kr0AKHADmulSy8JNzIckKwbyFMYUecrsW+Lsu9DhnVMy1jj5pKsJDLRi2iIU3fXTMWbcyQbXjbbnBO2mPdP3Tzme75y4D9fc8hUPeyqVv2BU26NEbQ7EF2pKJ93OXvci7HlwRBgdJa8j6mP2LEDClcPQW00g7N/OZe0cTOMa8L5AwiBlbArwqt9wv6YLJoTG0wpDhzWsFvbCg5bJxe28Yn3fIDD0Lk1I7iSnBbp/5gzF19jmxqvcT8tHRkDL4xfjbENFTZjA5uB4Z4pj4WSyWQILLV/Jwhe3fi9uQwdviFHfj5pnVrmNUiGSOQL672K5wl2c3E9mGwejvsu2dfEz28n7Y/FUnOpY3/cBS0n27JJaerS0zMKNLE= +script: +- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/errors/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/errors/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/errors/LICENSE b/vendor/github.com/go-openapi/errors/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/errors/README.md b/vendor/github.com/go-openapi/errors/README.md new file mode 100644 index 00000000000..0ce50b23b2e --- /dev/null +++ b/vendor/github.com/go-openapi/errors/README.md @@ -0,0 +1,8 @@ +# OpenAPI errors [![Build Status](https://travis-ci.org/go-openapi/errors.svg?branch=master)](https://travis-ci.org/go-openapi/errors) [![codecov](https://codecov.io/gh/go-openapi/errors/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/errors) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/errors/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/go-openapi/errors?status.svg)](http://godoc.org/github.com/go-openapi/errors) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/errors.svg)](https://golangci.com) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/errors)](https://goreportcard.com/report/github.com/go-openapi/errors) + +Shared errors and error interface used throughout the various libraries found in the go-openapi toolkit. diff --git a/vendor/github.com/go-openapi/errors/api.go b/vendor/github.com/go-openapi/errors/api.go new file mode 100644 index 00000000000..7667cee76c9 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/api.go @@ -0,0 +1,164 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import ( + "encoding/json" + "fmt" + "net/http" + "reflect" + "strings" +) + +// DefaultHTTPCode is used when the error Code cannot be used as an HTTP code. +var DefaultHTTPCode = http.StatusUnprocessableEntity + +// Error represents a error interface all swagger framework errors implement +type Error interface { + error + Code() int32 +} + +type apiError struct { + code int32 + message string +} + +func (a *apiError) Error() string { + return a.message +} + +func (a *apiError) Code() int32 { + return a.code +} + +// New creates a new API error with a code and a message +func New(code int32, message string, args ...interface{}) Error { + if len(args) > 0 { + return &apiError{code, fmt.Sprintf(message, args...)} + } + return &apiError{code, message} +} + +// NotFound creates a new not found error +func NotFound(message string, args ...interface{}) Error { + if message == "" { + message = "Not found" + } + return New(http.StatusNotFound, fmt.Sprintf(message, args...)) +} + +// NotImplemented creates a new not implemented error +func NotImplemented(message string) Error { + return New(http.StatusNotImplemented, message) +} + +// MethodNotAllowedError represents an error for when the path matches but the method doesn't +type MethodNotAllowedError struct { + code int32 + Allowed []string + message string +} + +func (m *MethodNotAllowedError) Error() string { + return m.message +} + +// Code the error code +func (m *MethodNotAllowedError) Code() int32 { + return m.code +} + +func errorAsJSON(err Error) []byte { + b, _ := json.Marshal(struct { + Code int32 `json:"code"` + Message string `json:"message"` + }{err.Code(), err.Error()}) + return b +} + +func flattenComposite(errs *CompositeError) *CompositeError { + var res []error + for _, er := range errs.Errors { + switch e := er.(type) { + case *CompositeError: + if len(e.Errors) > 0 { + flat := flattenComposite(e) + if len(flat.Errors) > 0 { + res = append(res, flat.Errors...) + } + } + default: + if e != nil { + res = append(res, e) + } + } + } + return CompositeValidationError(res...) +} + +// MethodNotAllowed creates a new method not allowed error +func MethodNotAllowed(requested string, allow []string) Error { + msg := fmt.Sprintf("method %s is not allowed, but [%s] are", requested, strings.Join(allow, ",")) + return &MethodNotAllowedError{code: http.StatusMethodNotAllowed, Allowed: allow, message: msg} +} + +// ServeError the error handler interface implementation +func ServeError(rw http.ResponseWriter, r *http.Request, err error) { + rw.Header().Set("Content-Type", "application/json") + switch e := err.(type) { + case *CompositeError: + er := flattenComposite(e) + // strips composite errors to first element only + if len(er.Errors) > 0 { + ServeError(rw, r, er.Errors[0]) + } else { + // guard against empty CompositeError (invalid construct) + ServeError(rw, r, nil) + } + case *MethodNotAllowedError: + rw.Header().Add("Allow", strings.Join(err.(*MethodNotAllowedError).Allowed, ",")) + rw.WriteHeader(asHTTPCode(int(e.Code()))) + if r == nil || r.Method != http.MethodHead { + _, _ = rw.Write(errorAsJSON(e)) + } + case Error: + value := reflect.ValueOf(e) + if value.Kind() == reflect.Ptr && value.IsNil() { + rw.WriteHeader(http.StatusInternalServerError) + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "Unknown error"))) + return + } + rw.WriteHeader(asHTTPCode(int(e.Code()))) + if r == nil || r.Method != http.MethodHead { + _, _ = rw.Write(errorAsJSON(e)) + } + case nil: + rw.WriteHeader(http.StatusInternalServerError) + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, "Unknown error"))) + default: + rw.WriteHeader(http.StatusInternalServerError) + if r == nil || r.Method != http.MethodHead { + _, _ = rw.Write(errorAsJSON(New(http.StatusInternalServerError, err.Error()))) + } + } +} + +func asHTTPCode(input int) int { + if input >= 600 { + return DefaultHTTPCode + } + return input +} diff --git a/vendor/github.com/go-openapi/errors/auth.go b/vendor/github.com/go-openapi/errors/auth.go new file mode 100644 index 00000000000..0545b501bd7 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/auth.go @@ -0,0 +1,22 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import "net/http" + +// Unauthenticated returns an unauthenticated error +func Unauthenticated(scheme string) Error { + return New(http.StatusUnauthorized, "unauthenticated for %s", scheme) +} diff --git a/vendor/github.com/go-openapi/errors/doc.go b/vendor/github.com/go-openapi/errors/doc.go new file mode 100644 index 00000000000..963d4274078 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/doc.go @@ -0,0 +1,28 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* + +Package errors provides an Error interface and several concrete types +implementing this interface to manage API errors and JSON-schema validation +errors. + +A middleware handler ServeError() is provided to serve the errors types +it defines. + +It is used throughout the various go-openapi toolkit libraries +(https://github.com/go-openapi). + +*/ +package errors diff --git a/vendor/github.com/go-openapi/errors/go.mod b/vendor/github.com/go-openapi/errors/go.mod new file mode 100644 index 00000000000..084143001f0 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/go.mod @@ -0,0 +1,6 @@ +module github.com/go-openapi/errors + +require ( + github.com/stretchr/objx v0.2.0 // indirect + github.com/stretchr/testify v1.3.0 +) diff --git a/vendor/github.com/go-openapi/errors/go.sum b/vendor/github.com/go-openapi/errors/go.sum new file mode 100644 index 00000000000..e7314e279fb --- /dev/null +++ b/vendor/github.com/go-openapi/errors/go.sum @@ -0,0 +1,9 @@ +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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/go-openapi/errors/headers.go b/vendor/github.com/go-openapi/errors/headers.go new file mode 100644 index 00000000000..0360c094ea3 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/headers.go @@ -0,0 +1,85 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import ( + "fmt" + "net/http" +) + +// Validation represents a failure of a precondition +type Validation struct { + code int32 + Name string + In string + Value interface{} + message string + Values []interface{} +} + +func (e *Validation) Error() string { + return e.message +} + +// Code the error code +func (e *Validation) Code() int32 { + return e.code +} + +// ValidateName produces an error message name for an aliased property +func (e *Validation) ValidateName(name string) *Validation { + if e.Name == "" && name != "" { + e.Name = name + e.message = name + e.message + } + return e +} + +const ( + contentTypeFail = `unsupported media type %q, only %v are allowed` + responseFormatFail = `unsupported media type requested, only %v are available` +) + +// InvalidContentType error for an invalid content type +func InvalidContentType(value string, allowed []string) *Validation { + values := make([]interface{}, 0, len(allowed)) + for _, v := range allowed { + values = append(values, v) + } + return &Validation{ + code: http.StatusUnsupportedMediaType, + Name: "Content-Type", + In: "header", + Value: value, + Values: values, + message: fmt.Sprintf(contentTypeFail, value, allowed), + } +} + +// InvalidResponseFormat error for an unacceptable response format request +func InvalidResponseFormat(value string, allowed []string) *Validation { + values := make([]interface{}, 0, len(allowed)) + for _, v := range allowed { + values = append(values, v) + } + return &Validation{ + code: http.StatusNotAcceptable, + Name: "Accept", + In: "header", + Value: value, + Values: values, + message: fmt.Sprintf(responseFormatFail, allowed), + } +} diff --git a/vendor/github.com/go-openapi/errors/middleware.go b/vendor/github.com/go-openapi/errors/middleware.go new file mode 100644 index 00000000000..6390d4636aa --- /dev/null +++ b/vendor/github.com/go-openapi/errors/middleware.go @@ -0,0 +1,51 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import ( + "bytes" + "fmt" + "strings" +) + +// APIVerificationFailed is an error that contains all the missing info for a mismatched section +// between the api registrations and the api spec +type APIVerificationFailed struct { + Section string + MissingSpecification []string + MissingRegistration []string +} + +// +func (v *APIVerificationFailed) Error() string { + buf := bytes.NewBuffer(nil) + + hasRegMissing := len(v.MissingRegistration) > 0 + hasSpecMissing := len(v.MissingSpecification) > 0 + + if hasRegMissing { + buf.WriteString(fmt.Sprintf("missing [%s] %s registrations", strings.Join(v.MissingRegistration, ", "), v.Section)) + } + + if hasRegMissing && hasSpecMissing { + buf.WriteString("\n") + } + + if hasSpecMissing { + buf.WriteString(fmt.Sprintf("missing from spec file [%s] %s", strings.Join(v.MissingSpecification, ", "), v.Section)) + } + + return buf.String() +} diff --git a/vendor/github.com/go-openapi/errors/parsing.go b/vendor/github.com/go-openapi/errors/parsing.go new file mode 100644 index 00000000000..0f96ce2094e --- /dev/null +++ b/vendor/github.com/go-openapi/errors/parsing.go @@ -0,0 +1,59 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import "fmt" + +// ParseError represents a parsing error +type ParseError struct { + code int32 + Name string + In string + Value string + Reason error + message string +} + +func (e *ParseError) Error() string { + return e.message +} + +// Code returns the http status code for this error +func (e *ParseError) Code() int32 { + return e.code +} + +const ( + parseErrorTemplContent = `parsing %s %s from %q failed, because %s` + parseErrorTemplContentNoIn = `parsing %s from %q failed, because %s` +) + +// NewParseError creates a new parse error +func NewParseError(name, in, value string, reason error) *ParseError { + var msg string + if in == "" { + msg = fmt.Sprintf(parseErrorTemplContentNoIn, name, value, reason) + } else { + msg = fmt.Sprintf(parseErrorTemplContent, name, in, value, reason) + } + return &ParseError{ + code: 400, + Name: name, + In: in, + Value: value, + Reason: reason, + message: msg, + } +} diff --git a/vendor/github.com/go-openapi/errors/schema.go b/vendor/github.com/go-openapi/errors/schema.go new file mode 100644 index 00000000000..bbf5c6c5404 --- /dev/null +++ b/vendor/github.com/go-openapi/errors/schema.go @@ -0,0 +1,562 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package errors + +import ( + "fmt" + "strings" +) + +const ( + invalidType = "%s is an invalid type name" + typeFail = "%s in %s must be of type %s" + typeFailWithData = "%s in %s must be of type %s: %q" + typeFailWithError = "%s in %s must be of type %s, because: %s" + requiredFail = "%s in %s is required" + tooLongMessage = "%s in %s should be at most %d chars long" + tooShortMessage = "%s in %s should be at least %d chars long" + patternFail = "%s in %s should match '%s'" + enumFail = "%s in %s should be one of %v" + multipleOfFail = "%s in %s should be a multiple of %v" + maxIncFail = "%s in %s should be less than or equal to %v" + maxExcFail = "%s in %s should be less than %v" + minIncFail = "%s in %s should be greater than or equal to %v" + minExcFail = "%s in %s should be greater than %v" + uniqueFail = "%s in %s shouldn't contain duplicates" + maxItemsFail = "%s in %s should have at most %d items" + minItemsFail = "%s in %s should have at least %d items" + typeFailNoIn = "%s must be of type %s" + typeFailWithDataNoIn = "%s must be of type %s: %q" + typeFailWithErrorNoIn = "%s must be of type %s, because: %s" + requiredFailNoIn = "%s is required" + tooLongMessageNoIn = "%s should be at most %d chars long" + tooShortMessageNoIn = "%s should be at least %d chars long" + patternFailNoIn = "%s should match '%s'" + enumFailNoIn = "%s should be one of %v" + multipleOfFailNoIn = "%s should be a multiple of %v" + maxIncFailNoIn = "%s should be less than or equal to %v" + maxExcFailNoIn = "%s should be less than %v" + minIncFailNoIn = "%s should be greater than or equal to %v" + minExcFailNoIn = "%s should be greater than %v" + uniqueFailNoIn = "%s shouldn't contain duplicates" + maxItemsFailNoIn = "%s should have at most %d items" + minItemsFailNoIn = "%s should have at least %d items" + noAdditionalItems = "%s in %s can't have additional items" + noAdditionalItemsNoIn = "%s can't have additional items" + tooFewProperties = "%s in %s should have at least %d properties" + tooFewPropertiesNoIn = "%s should have at least %d properties" + tooManyProperties = "%s in %s should have at most %d properties" + tooManyPropertiesNoIn = "%s should have at most %d properties" + unallowedProperty = "%s.%s in %s is a forbidden property" + unallowedPropertyNoIn = "%s.%s is a forbidden property" + failedAllPatternProps = "%s.%s in %s failed all pattern properties" + failedAllPatternPropsNoIn = "%s.%s failed all pattern properties" + multipleOfMustBePositive = "factor MultipleOf declared for %s must be positive: %v" +) + +// All code responses can be used to differentiate errors for different handling +// by the consuming program +const ( + // CompositeErrorCode remains 422 for backwards-compatibility + // and to separate it from validation errors with cause + CompositeErrorCode = 422 + // InvalidTypeCode is used for any subclass of invalid types + InvalidTypeCode = 600 + iota + RequiredFailCode + TooLongFailCode + TooShortFailCode + PatternFailCode + EnumFailCode + MultipleOfFailCode + MaxFailCode + MinFailCode + UniqueFailCode + MaxItemsFailCode + MinItemsFailCode + NoAdditionalItemsCode + TooFewPropertiesCode + TooManyPropertiesCode + UnallowedPropertyCode + FailedAllPatternPropsCode + MultipleOfMustBePositiveCode +) + +// CompositeError is an error that groups several errors together +type CompositeError struct { + Errors []error + code int32 + message string +} + +// Code for this error +func (c *CompositeError) Code() int32 { + return c.code +} + +func (c *CompositeError) Error() string { + if len(c.Errors) > 0 { + msgs := []string{c.message + ":"} + for _, e := range c.Errors { + msgs = append(msgs, e.Error()) + } + return strings.Join(msgs, "\n") + } + return c.message +} + +// CompositeValidationError an error to wrap a bunch of other errors +func CompositeValidationError(errors ...error) *CompositeError { + return &CompositeError{ + code: CompositeErrorCode, + Errors: append([]error{}, errors...), + message: "validation failure list", + } +} + +// FailedAllPatternProperties an error for when the property doesn't match a pattern +func FailedAllPatternProperties(name, in, key string) *Validation { + msg := fmt.Sprintf(failedAllPatternProps, name, key, in) + if in == "" { + msg = fmt.Sprintf(failedAllPatternPropsNoIn, name, key) + } + return &Validation{ + code: FailedAllPatternPropsCode, + Name: name, + In: in, + Value: key, + message: msg, + } +} + +// PropertyNotAllowed an error for when the property doesn't match a pattern +func PropertyNotAllowed(name, in, key string) *Validation { + msg := fmt.Sprintf(unallowedProperty, name, key, in) + if in == "" { + msg = fmt.Sprintf(unallowedPropertyNoIn, name, key) + } + return &Validation{ + code: UnallowedPropertyCode, + Name: name, + In: in, + Value: key, + message: msg, + } +} + +// TooFewProperties an error for an object with too few properties +func TooFewProperties(name, in string, n int64) *Validation { + msg := fmt.Sprintf(tooFewProperties, name, in, n) + if in == "" { + msg = fmt.Sprintf(tooFewPropertiesNoIn, name, n) + } + return &Validation{ + code: TooFewPropertiesCode, + Name: name, + In: in, + Value: n, + message: msg, + } +} + +// TooManyProperties an error for an object with too many properties +func TooManyProperties(name, in string, n int64) *Validation { + msg := fmt.Sprintf(tooManyProperties, name, in, n) + if in == "" { + msg = fmt.Sprintf(tooManyPropertiesNoIn, name, n) + } + return &Validation{ + code: TooManyPropertiesCode, + Name: name, + In: in, + Value: n, + message: msg, + } +} + +// AdditionalItemsNotAllowed an error for invalid additional items +func AdditionalItemsNotAllowed(name, in string) *Validation { + msg := fmt.Sprintf(noAdditionalItems, name, in) + if in == "" { + msg = fmt.Sprintf(noAdditionalItemsNoIn, name) + } + return &Validation{ + code: NoAdditionalItemsCode, + Name: name, + In: in, + message: msg, + } +} + +// InvalidCollectionFormat another flavor of invalid type error +func InvalidCollectionFormat(name, in, format string) *Validation { + return &Validation{ + code: InvalidTypeCode, + Name: name, + In: in, + Value: format, + message: fmt.Sprintf("the collection format %q is not supported for the %s param %q", format, in, name), + } +} + +// InvalidTypeName an error for when the type is invalid +func InvalidTypeName(typeName string) *Validation { + return &Validation{ + code: InvalidTypeCode, + Value: typeName, + message: fmt.Sprintf(invalidType, typeName), + } +} + +// InvalidType creates an error for when the type is invalid +func InvalidType(name, in, typeName string, value interface{}) *Validation { + var message string + + if in != "" { + switch value.(type) { + case string: + message = fmt.Sprintf(typeFailWithData, name, in, typeName, value) + case error: + message = fmt.Sprintf(typeFailWithError, name, in, typeName, value) + default: + message = fmt.Sprintf(typeFail, name, in, typeName) + } + } else { + switch value.(type) { + case string: + message = fmt.Sprintf(typeFailWithDataNoIn, name, typeName, value) + case error: + message = fmt.Sprintf(typeFailWithErrorNoIn, name, typeName, value) + default: + message = fmt.Sprintf(typeFailNoIn, name, typeName) + } + } + + return &Validation{ + code: InvalidTypeCode, + Name: name, + In: in, + Value: value, + message: message, + } + +} + +// DuplicateItems error for when an array contains duplicates +func DuplicateItems(name, in string) *Validation { + msg := fmt.Sprintf(uniqueFail, name, in) + if in == "" { + msg = fmt.Sprintf(uniqueFailNoIn, name) + } + return &Validation{ + code: UniqueFailCode, + Name: name, + In: in, + message: msg, + } +} + +// TooManyItems error for when an array contains too many items +func TooManyItems(name, in string, max int64) *Validation { + msg := fmt.Sprintf(maxItemsFail, name, in, max) + if in == "" { + msg = fmt.Sprintf(maxItemsFailNoIn, name, max) + } + + return &Validation{ + code: MaxItemsFailCode, + Name: name, + In: in, + message: msg, + } +} + +// TooFewItems error for when an array contains too few items +func TooFewItems(name, in string, min int64) *Validation { + msg := fmt.Sprintf(minItemsFail, name, in, min) + if in == "" { + msg = fmt.Sprintf(minItemsFailNoIn, name, min) + } + return &Validation{ + code: MinItemsFailCode, + Name: name, + In: in, + message: msg, + } +} + +// ExceedsMaximumInt error for when maximum validation fails +func ExceedsMaximumInt(name, in string, max int64, exclusive bool) *Validation { + var message string + if in == "" { + m := maxIncFailNoIn + if exclusive { + m = maxExcFailNoIn + } + message = fmt.Sprintf(m, name, max) + } else { + m := maxIncFail + if exclusive { + m = maxExcFail + } + message = fmt.Sprintf(m, name, in, max) + } + return &Validation{ + code: MaxFailCode, + Name: name, + In: in, + Value: max, + message: message, + } +} + +// ExceedsMaximumUint error for when maximum validation fails +func ExceedsMaximumUint(name, in string, max uint64, exclusive bool) *Validation { + var message string + if in == "" { + m := maxIncFailNoIn + if exclusive { + m = maxExcFailNoIn + } + message = fmt.Sprintf(m, name, max) + } else { + m := maxIncFail + if exclusive { + m = maxExcFail + } + message = fmt.Sprintf(m, name, in, max) + } + return &Validation{ + code: MaxFailCode, + Name: name, + In: in, + Value: max, + message: message, + } +} + +// ExceedsMaximum error for when maximum validation fails +func ExceedsMaximum(name, in string, max float64, exclusive bool) *Validation { + var message string + if in == "" { + m := maxIncFailNoIn + if exclusive { + m = maxExcFailNoIn + } + message = fmt.Sprintf(m, name, max) + } else { + m := maxIncFail + if exclusive { + m = maxExcFail + } + message = fmt.Sprintf(m, name, in, max) + } + return &Validation{ + code: MaxFailCode, + Name: name, + In: in, + Value: max, + message: message, + } +} + +// ExceedsMinimumInt error for when minimum validation fails +func ExceedsMinimumInt(name, in string, min int64, exclusive bool) *Validation { + var message string + if in == "" { + m := minIncFailNoIn + if exclusive { + m = minExcFailNoIn + } + message = fmt.Sprintf(m, name, min) + } else { + m := minIncFail + if exclusive { + m = minExcFail + } + message = fmt.Sprintf(m, name, in, min) + } + return &Validation{ + code: MinFailCode, + Name: name, + In: in, + Value: min, + message: message, + } +} + +// ExceedsMinimumUint error for when minimum validation fails +func ExceedsMinimumUint(name, in string, min uint64, exclusive bool) *Validation { + var message string + if in == "" { + m := minIncFailNoIn + if exclusive { + m = minExcFailNoIn + } + message = fmt.Sprintf(m, name, min) + } else { + m := minIncFail + if exclusive { + m = minExcFail + } + message = fmt.Sprintf(m, name, in, min) + } + return &Validation{ + code: MinFailCode, + Name: name, + In: in, + Value: min, + message: message, + } +} + +// ExceedsMinimum error for when minimum validation fails +func ExceedsMinimum(name, in string, min float64, exclusive bool) *Validation { + var message string + if in == "" { + m := minIncFailNoIn + if exclusive { + m = minExcFailNoIn + } + message = fmt.Sprintf(m, name, min) + } else { + m := minIncFail + if exclusive { + m = minExcFail + } + message = fmt.Sprintf(m, name, in, min) + } + return &Validation{ + code: MinFailCode, + Name: name, + In: in, + Value: min, + message: message, + } +} + +// NotMultipleOf error for when multiple of validation fails +func NotMultipleOf(name, in string, multiple interface{}) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(multipleOfFailNoIn, name, multiple) + } else { + msg = fmt.Sprintf(multipleOfFail, name, in, multiple) + } + return &Validation{ + code: MultipleOfFailCode, + Name: name, + In: in, + Value: multiple, + message: msg, + } +} + +// EnumFail error for when an enum validation fails +func EnumFail(name, in string, value interface{}, values []interface{}) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(enumFailNoIn, name, values) + } else { + msg = fmt.Sprintf(enumFail, name, in, values) + } + + return &Validation{ + code: EnumFailCode, + Name: name, + In: in, + Value: value, + Values: values, + message: msg, + } +} + +// Required error for when a value is missing +func Required(name, in string) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(requiredFailNoIn, name) + } else { + msg = fmt.Sprintf(requiredFail, name, in) + } + return &Validation{ + code: RequiredFailCode, + Name: name, + In: in, + message: msg, + } +} + +// TooLong error for when a string is too long +func TooLong(name, in string, max int64) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(tooLongMessageNoIn, name, max) + } else { + msg = fmt.Sprintf(tooLongMessage, name, in, max) + } + return &Validation{ + code: TooLongFailCode, + Name: name, + In: in, + message: msg, + } +} + +// TooShort error for when a string is too short +func TooShort(name, in string, min int64) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(tooShortMessageNoIn, name, min) + } else { + msg = fmt.Sprintf(tooShortMessage, name, in, min) + } + + return &Validation{ + code: TooShortFailCode, + Name: name, + In: in, + message: msg, + } +} + +// FailedPattern error for when a string fails a regex pattern match +// the pattern that is returned is the ECMA syntax version of the pattern not the golang version. +func FailedPattern(name, in, pattern string) *Validation { + var msg string + if in == "" { + msg = fmt.Sprintf(patternFailNoIn, name, pattern) + } else { + msg = fmt.Sprintf(patternFail, name, in, pattern) + } + + return &Validation{ + code: PatternFailCode, + Name: name, + In: in, + message: msg, + } +} + +// MultipleOfMustBePositive error for when a +// multipleOf factor is negative +func MultipleOfMustBePositive(name, in string, factor interface{}) *Validation { + return &Validation{ + code: MultipleOfMustBePositiveCode, + Name: name, + In: in, + Value: factor, + message: fmt.Sprintf(multipleOfMustBePositive, name, factor), + } +} diff --git a/vendor/github.com/go-openapi/jsonpointer/.editorconfig b/vendor/github.com/go-openapi/jsonpointer/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/jsonpointer/.gitignore b/vendor/github.com/go-openapi/jsonpointer/.gitignore new file mode 100644 index 00000000000..769c244007b --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.gitignore @@ -0,0 +1 @@ +secrets.yml diff --git a/vendor/github.com/go-openapi/jsonpointer/.travis.yml b/vendor/github.com/go-openapi/jsonpointer/.travis.yml new file mode 100644 index 00000000000..9aef9184e86 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.travis.yml @@ -0,0 +1,15 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.11.x +- 1.12.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +env: +- GO111MODULE=on +language: go +notifications: + slack: + secure: a5VgoiwB1G/AZqzmephPZIhEB9avMlsWSlVnM1dSAtYAwdrQHGTQxAmpOxYIoSPDhWNN5bfZmjd29++UlTwLcHSR+e0kJhH6IfDlsHj/HplNCJ9tyI0zYc7XchtdKgeMxMzBKCzgwFXGSbQGydXTliDNBo0HOzmY3cou/daMFTP60K+offcjS+3LRAYb1EroSRXZqrk1nuF/xDL3792DZUdPMiFR/L/Df6y74D6/QP4sTkTDFQitz4Wy/7jbsfj8dG6qK2zivgV6/l+w4OVjFkxVpPXogDWY10vVXNVynqxfJ7to2d1I9lNCHE2ilBCkWMIPdyJF7hjF8pKW+82yP4EzRh0vu8Xn0HT5MZpQxdRY/YMxNrWaG7SxsoEaO4q5uhgdzAqLYY3TRa7MjIK+7Ur+aqOeTXn6OKwVi0CjvZ6mIU3WUKSwiwkFZMbjRAkSb5CYwMEfGFO/z964xz83qGt6WAtBXNotqCQpTIiKtDHQeLOMfksHImCg6JLhQcWBVxamVgu0G3Pdh8Y6DyPnxraXY95+QDavbjqv7TeYT9T/FNnrkXaTTK0s4iWE5H4ACU0Qvz0wUYgfQrZv0/Hp7V17+rabUwnzYySHCy9SWX/7OV9Cfh31iMp9ZIffr76xmmThtOEqs8TrTtU6BWI3rWwvA9cXQipZTVtL0oswrGw= +script: +- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/jsonpointer/LICENSE b/vendor/github.com/go-openapi/jsonpointer/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md new file mode 100644 index 00000000000..813788aff1c --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -0,0 +1,15 @@ +# gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) +An implementation of JSON Pointer - Go language + +## Status +Completed YES + +Tested YES + +## References +http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 + +### Note +The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. diff --git a/vendor/github.com/go-openapi/jsonpointer/go.mod b/vendor/github.com/go-openapi/jsonpointer/go.mod new file mode 100644 index 00000000000..3e45e225b5d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/go.mod @@ -0,0 +1,9 @@ +module github.com/go-openapi/jsonpointer + +require ( + github.com/go-openapi/swag v0.19.5 + github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect + github.com/stretchr/testify v1.3.0 +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/jsonpointer/go.sum b/vendor/github.com/go-openapi/jsonpointer/go.sum new file mode 100644 index 00000000000..953d4f354e5 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/go.sum @@ -0,0 +1,24 @@ +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-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go new file mode 100644 index 00000000000..b284eb77a62 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -0,0 +1,390 @@ +// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author sigu-399 +// author-github https://github.com/sigu-399 +// author-mail sigu.399@gmail.com +// +// repository-name jsonpointer +// repository-desc An implementation of JSON Pointer - Go language +// +// description Main and unique file. +// +// created 25-02-2013 + +package jsonpointer + +import ( + "errors" + "fmt" + "reflect" + "strconv" + "strings" + + "github.com/go-openapi/swag" +) + +const ( + emptyPointer = `` + pointerSeparator = `/` + + invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator +) + +var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() +var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() + +// JSONPointable is an interface for structs to implement when they need to customize the +// json pointer process +type JSONPointable interface { + JSONLookup(string) (interface{}, error) +} + +// JSONSetable is an interface for structs to implement when they need to customize the +// json pointer process +type JSONSetable interface { + JSONSet(string, interface{}) error +} + +// New creates a new json pointer for the given string +func New(jsonPointerString string) (Pointer, error) { + + var p Pointer + err := p.parse(jsonPointerString) + return p, err + +} + +// Pointer the json pointer reprsentation +type Pointer struct { + referenceTokens []string +} + +// "Constructor", parses the given string JSON pointer +func (p *Pointer) parse(jsonPointerString string) error { + + var err error + + if jsonPointerString != emptyPointer { + if !strings.HasPrefix(jsonPointerString, pointerSeparator) { + err = errors.New(invalidStart) + } else { + referenceTokens := strings.Split(jsonPointerString, pointerSeparator) + for _, referenceToken := range referenceTokens[1:] { + p.referenceTokens = append(p.referenceTokens, referenceToken) + } + } + } + + return err +} + +// Get uses the pointer to retrieve a value from a JSON document +func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) { + return p.get(document, swag.DefaultJSONNameProvider) +} + +// Set uses the pointer to set a value from a JSON document +func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) { + return document, p.set(document, value, swag.DefaultJSONNameProvider) +} + +// GetForToken gets a value for a json pointer token 1 level deep +func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) { + return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) +} + +// SetForToken gets a value for a json pointer token 1 level deep +func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) { + return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) +} + +func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() + + switch kind { + + case reflect.Struct: + if rValue.Type().Implements(jsonPointableType) { + r, err := node.(JSONPointable).JSONLookup(decodedToken) + if err != nil { + return nil, kind, err + } + return r, kind, nil + } + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return nil, kind, fmt.Errorf("object has no field %q", decodedToken) + } + fld := rValue.FieldByName(nm) + return fld.Interface(), kind, nil + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + mv := rValue.MapIndex(kv) + + if mv.IsValid() { + return mv.Interface(), kind, nil + } + return nil, kind, fmt.Errorf("object has no key %q", decodedToken) + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return nil, kind, err + } + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength-1, tokenIndex) + } + + elem := rValue.Index(tokenIndex) + return elem.Interface(), kind, nil + + default: + return nil, kind, fmt.Errorf("invalid token reference %q", decodedToken) + } + +} + +func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { + rValue := reflect.Indirect(reflect.ValueOf(node)) + switch rValue.Kind() { + + case reflect.Struct: + if ns, ok := node.(JSONSetable); ok { // pointer impl + return ns.JSONSet(decodedToken, data) + } + + if rValue.Type().Implements(jsonSetableType) { + return node.(JSONSetable).JSONSet(decodedToken, data) + } + + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return fmt.Errorf("object has no field %q", decodedToken) + } + fld := rValue.FieldByName(nm) + if fld.IsValid() { + fld.Set(reflect.ValueOf(data)) + } + return nil + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + rValue.SetMapIndex(kv, reflect.ValueOf(data)) + return nil + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return err + } + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex) + } + + elem := rValue.Index(tokenIndex) + if !elem.CanSet() { + return fmt.Errorf("can't set slice index %s to %v", decodedToken, data) + } + elem.Set(reflect.ValueOf(data)) + return nil + + default: + return fmt.Errorf("invalid token reference %q", decodedToken) + } + +} + +func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { + + if nameProvider == nil { + nameProvider = swag.DefaultJSONNameProvider + } + + kind := reflect.Invalid + + // Full document when empty + if len(p.referenceTokens) == 0 { + return node, kind, nil + } + + for _, token := range p.referenceTokens { + + decodedToken := Unescape(token) + + r, knd, err := getSingleImpl(node, decodedToken, nameProvider) + if err != nil { + return nil, knd, err + } + node, kind = r, knd + + } + + rValue := reflect.ValueOf(node) + kind = rValue.Kind() + + return node, kind, nil +} + +func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error { + knd := reflect.ValueOf(node).Kind() + + if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { + return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") + } + + if nameProvider == nil { + nameProvider = swag.DefaultJSONNameProvider + } + + // Full document when empty + if len(p.referenceTokens) == 0 { + return nil + } + + lastI := len(p.referenceTokens) - 1 + for i, token := range p.referenceTokens { + isLastToken := i == lastI + decodedToken := Unescape(token) + + if isLastToken { + + return setSingleImpl(node, data, decodedToken, nameProvider) + } + + rValue := reflect.Indirect(reflect.ValueOf(node)) + kind := rValue.Kind() + + switch kind { + + case reflect.Struct: + if rValue.Type().Implements(jsonPointableType) { + r, err := node.(JSONPointable).JSONLookup(decodedToken) + if err != nil { + return err + } + fld := reflect.ValueOf(r) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { + node = fld.Addr().Interface() + continue + } + node = r + continue + } + nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) + if !ok { + return fmt.Errorf("object has no field %q", decodedToken) + } + fld := rValue.FieldByName(nm) + if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr { + node = fld.Addr().Interface() + continue + } + node = fld.Interface() + + case reflect.Map: + kv := reflect.ValueOf(decodedToken) + mv := rValue.MapIndex(kv) + + if !mv.IsValid() { + return fmt.Errorf("object has no key %q", decodedToken) + } + if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Ptr { + node = mv.Addr().Interface() + continue + } + node = mv.Interface() + + case reflect.Slice: + tokenIndex, err := strconv.Atoi(decodedToken) + if err != nil { + return err + } + sLength := rValue.Len() + if tokenIndex < 0 || tokenIndex >= sLength { + return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex) + } + + elem := rValue.Index(tokenIndex) + if elem.CanAddr() && elem.Kind() != reflect.Interface && elem.Kind() != reflect.Map && elem.Kind() != reflect.Slice && elem.Kind() != reflect.Ptr { + node = elem.Addr().Interface() + continue + } + node = elem.Interface() + + default: + return fmt.Errorf("invalid token reference %q", decodedToken) + } + + } + + return nil +} + +// DecodedTokens returns the decoded tokens +func (p *Pointer) DecodedTokens() []string { + result := make([]string, 0, len(p.referenceTokens)) + for _, t := range p.referenceTokens { + result = append(result, Unescape(t)) + } + return result +} + +// IsEmpty returns true if this is an empty json pointer +// this indicates that it points to the root document +func (p *Pointer) IsEmpty() bool { + return len(p.referenceTokens) == 0 +} + +// Pointer to string representation function +func (p *Pointer) String() string { + + if len(p.referenceTokens) == 0 { + return emptyPointer + } + + pointerString := pointerSeparator + strings.Join(p.referenceTokens, pointerSeparator) + + return pointerString +} + +// Specific JSON pointer encoding here +// ~0 => ~ +// ~1 => / +// ... and vice versa + +const ( + encRefTok0 = `~0` + encRefTok1 = `~1` + decRefTok0 = `~` + decRefTok1 = `/` +) + +// Unescape unescapes a json pointer reference token string to the original representation +func Unescape(token string) string { + step1 := strings.Replace(token, encRefTok1, decRefTok1, -1) + step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1) + return step2 +} + +// Escape escapes a pointer reference token string +func Escape(token string) string { + step1 := strings.Replace(token, decRefTok0, encRefTok0, -1) + step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1) + return step2 +} diff --git a/vendor/github.com/go-openapi/jsonreference/.gitignore b/vendor/github.com/go-openapi/jsonreference/.gitignore new file mode 100644 index 00000000000..769c244007b --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/.gitignore @@ -0,0 +1 @@ +secrets.yml diff --git a/vendor/github.com/go-openapi/jsonreference/.travis.yml b/vendor/github.com/go-openapi/jsonreference/.travis.yml new file mode 100644 index 00000000000..40b90757d89 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/.travis.yml @@ -0,0 +1,15 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.11.x +- 1.12.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +env: +- GO111MODULE=on +language: go +notifications: + slack: + secure: OpQG/36F7DSF00HLm9WZMhyqFCYYyYTsVDObW226cWiR8PWYiNfLZiSEvIzT1Gx4dDjhigKTIqcLhG34CkL5iNXDjm9Yyo2RYhQPlK8NErNqUEXuBqn4RqYHW48VGhEhOyDd4Ei0E2FN5ZbgpvHgtpkdZ6XDi64r3Ac89isP9aPHXQTuv2Jog6b4/OKKiUTftLcTIst0p4Cp3gqOJWf1wnoj+IadWiECNVQT6zb47IYjtyw6+uV8iUjTzdKcRB6Zc6b4Dq7JAg1Zd7Jfxkql3hlKp4PNlRf9Cy7y5iA3G7MLyg3FcPX5z2kmcyPt2jOTRMBWUJ5zIQpOxizAcN8WsT3WWBL5KbuYK6k0PzujrIDLqdxGpNmjkkMfDBT9cKmZpm2FdW+oZgPFJP+oKmAo4u4KJz/vjiPTXgQlN5bmrLuRMCp+AwC5wkIohTqWZVPE2TK6ZSnMYcg/W39s+RP/9mJoyryAvPSpBOLTI+biCgaUCTOAZxNTWpMFc3tPYntc41WWkdKcooZ9JA5DwfcaVFyTGQ3YXz+HvX6G1z/gW0Q/A4dBi9mj2iE1xm7tRTT+4VQ2AXFvSEI1HJpfPgYnwAtwOD1v3Qm2EUHk9sCdtEDR4wVGEPIVn44GnwFMnGKx9JWppMPYwFu3SVDdHt+E+LOlhZUply11Aa+IVrT2KUQ= +script: +- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/jsonreference/LICENSE b/vendor/github.com/go-openapi/jsonreference/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md new file mode 100644 index 00000000000..66345f4c61f --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/README.md @@ -0,0 +1,15 @@ +# gojsonreference [![Build Status](https://travis-ci.org/go-openapi/jsonreference.svg?branch=master)](https://travis-ci.org/go-openapi/jsonreference) [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) +An implementation of JSON Reference - Go language + +## Status +Work in progress ( 90% done ) + +## Dependencies +https://github.com/go-openapi/jsonpointer + +## References +http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 + +http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 diff --git a/vendor/github.com/go-openapi/jsonreference/go.mod b/vendor/github.com/go-openapi/jsonreference/go.mod new file mode 100644 index 00000000000..aff1d0163ec --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/go.mod @@ -0,0 +1,12 @@ +module github.com/go-openapi/jsonreference + +require ( + github.com/PuerkitoBio/purell v1.1.1 + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect + github.com/go-openapi/jsonpointer v0.19.3 + github.com/stretchr/testify v1.3.0 + golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect + golang.org/x/text v0.3.2 // indirect +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/jsonreference/go.sum b/vendor/github.com/go-openapi/jsonreference/go.sum new file mode 100644 index 00000000000..c7ceab5802d --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/go.sum @@ -0,0 +1,44 @@ +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +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-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/jsonreference/reference.go b/vendor/github.com/go-openapi/jsonreference/reference.go new file mode 100644 index 00000000000..3bc0a6e26f8 --- /dev/null +++ b/vendor/github.com/go-openapi/jsonreference/reference.go @@ -0,0 +1,156 @@ +// Copyright 2013 sigu-399 ( https://github.com/sigu-399 ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author sigu-399 +// author-github https://github.com/sigu-399 +// author-mail sigu.399@gmail.com +// +// repository-name jsonreference +// repository-desc An implementation of JSON Reference - Go language +// +// description Main and unique file. +// +// created 26-02-2013 + +package jsonreference + +import ( + "errors" + "net/url" + "strings" + + "github.com/PuerkitoBio/purell" + "github.com/go-openapi/jsonpointer" +) + +const ( + fragmentRune = `#` +) + +// New creates a new reference for the given string +func New(jsonReferenceString string) (Ref, error) { + + var r Ref + err := r.parse(jsonReferenceString) + return r, err + +} + +// MustCreateRef parses the ref string and panics when it's invalid. +// Use the New method for a version that returns an error +func MustCreateRef(ref string) Ref { + r, err := New(ref) + if err != nil { + panic(err) + } + return r +} + +// Ref represents a json reference object +type Ref struct { + referenceURL *url.URL + referencePointer jsonpointer.Pointer + + HasFullURL bool + HasURLPathOnly bool + HasFragmentOnly bool + HasFileScheme bool + HasFullFilePath bool +} + +// GetURL gets the URL for this reference +func (r *Ref) GetURL() *url.URL { + return r.referenceURL +} + +// GetPointer gets the json pointer for this reference +func (r *Ref) GetPointer() *jsonpointer.Pointer { + return &r.referencePointer +} + +// String returns the best version of the url for this reference +func (r *Ref) String() string { + + if r.referenceURL != nil { + return r.referenceURL.String() + } + + if r.HasFragmentOnly { + return fragmentRune + r.referencePointer.String() + } + + return r.referencePointer.String() +} + +// IsRoot returns true if this reference is a root document +func (r *Ref) IsRoot() bool { + return r.referenceURL != nil && + !r.IsCanonical() && + !r.HasURLPathOnly && + r.referenceURL.Fragment == "" +} + +// IsCanonical returns true when this pointer starts with http(s):// or file:// +func (r *Ref) IsCanonical() bool { + return (r.HasFileScheme && r.HasFullFilePath) || (!r.HasFileScheme && r.HasFullURL) +} + +// "Constructor", parses the given string JSON reference +func (r *Ref) parse(jsonReferenceString string) error { + + parsed, err := url.Parse(jsonReferenceString) + if err != nil { + return err + } + + r.referenceURL, _ = url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes)) + refURL := r.referenceURL + + if refURL.Scheme != "" && refURL.Host != "" { + r.HasFullURL = true + } else { + if refURL.Path != "" { + r.HasURLPathOnly = true + } else if refURL.RawQuery == "" && refURL.Fragment != "" { + r.HasFragmentOnly = true + } + } + + r.HasFileScheme = refURL.Scheme == "file" + r.HasFullFilePath = strings.HasPrefix(refURL.Path, "/") + + // invalid json-pointer error means url has no json-pointer fragment. simply ignore error + r.referencePointer, _ = jsonpointer.New(refURL.Fragment) + + return nil +} + +// Inherits creates a new reference from a parent and a child +// If the child cannot inherit from the parent, an error is returned +func (r *Ref) Inherits(child Ref) (*Ref, error) { + childURL := child.GetURL() + parentURL := r.GetURL() + if childURL == nil { + return nil, errors.New("child url is nil") + } + if parentURL == nil { + return &child, nil + } + + ref, err := New(parentURL.ResolveReference(childURL).String()) + if err != nil { + return nil, err + } + return &ref, nil +} diff --git a/vendor/github.com/go-openapi/loads/.editorconfig b/vendor/github.com/go-openapi/loads/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/loads/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/loads/.gitignore b/vendor/github.com/go-openapi/loads/.gitignore new file mode 100644 index 00000000000..e4f15f17bfc --- /dev/null +++ b/vendor/github.com/go-openapi/loads/.gitignore @@ -0,0 +1,4 @@ +secrets.yml +coverage.out +profile.cov +profile.out diff --git a/vendor/github.com/go-openapi/loads/.golangci.yml b/vendor/github.com/go-openapi/loads/.golangci.yml new file mode 100644 index 00000000000..1932914e6d1 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/.golangci.yml @@ -0,0 +1,22 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 30 + maligned: + suggest-new: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 4 + +linters: + enable-all: true + disable: + - maligned + - lll + - gochecknoglobals + - gochecknoinits diff --git a/vendor/github.com/go-openapi/loads/.travis.yml b/vendor/github.com/go-openapi/loads/.travis.yml new file mode 100644 index 00000000000..6bf906ec094 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/.travis.yml @@ -0,0 +1,13 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.13.x +- 1.14.x +install: +- go get -u gotest.tools/gotestsum +language: go +notifications: + slack: + secure: OxkPwVp35qBTUilgWC8xykSj+sGMcj0h8IIOKD+Rflx2schZVlFfdYdyVBM+s9OqeOfvtuvnR9v1Ye2rPKAvcjWdC4LpRGUsgmItZaI6Um8Aj6+K9udCw5qrtZVfOVmRu8LieH//XznWWKdOultUuniW0MLqw5+II87Gd00RWbCGi0hk0PykHe7uK+PDA2BEbqyZ2WKKYCvfB3j+0nrFOHScXqnh0V05l2E83J4+Sgy1fsPy+1WdX58ZlNBG333ibaC1FS79XvKSmTgKRkx3+YBo97u6ZtUmJa5WZjf2OdLG3KIckGWAv6R5xgxeU31N0Ng8L332w/Edpp2O/M2bZwdnKJ8hJQikXIAQbICbr+lTDzsoNzMdEIYcHpJ5hjPbiUl3Bmd+Jnsjf5McgAZDiWIfpCKZ29tPCEkVwRsOCqkyPRMNMzHHmoja495P5jR+ODS7+J8RFg5xgcnOgpP9D4Wlhztlf5WyZMpkLxTUD+bZq2SRf50HfHFXTkfq22zPl3d1eq0yrLwh/Z/fWKkfb6SyysROL8y6s8u3dpFX1YHSg0BR6i913h4aoZw9B2BG27cafLLTwKYsp2dFo1PWl4O6u9giFJIeqwloZHLKKrwh0cBFhB7RH0I58asxkZpCH6uWjJierahmHe7iS+E6i+9oCHkOZ59hmCYNimIs3hM= +script: +- gotestsum -f short-verbose -- -race -timeout=20m -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/loads/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/loads/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/loads/LICENSE b/vendor/github.com/go-openapi/loads/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/loads/README.md b/vendor/github.com/go-openapi/loads/README.md new file mode 100644 index 00000000000..071cf69ab97 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/README.md @@ -0,0 +1,7 @@ +# Loads OAI specs [![Build Status](https://travis-ci.org/go-openapi/loads.svg?branch=master)](https://travis-ci.org/go-openapi/loads) [![codecov](https://codecov.io/gh/go-openapi/loads/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/loads) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/loads/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/loads?status.svg)](http://godoc.org/github.com/go-openapi/loads) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/loads.svg)](https://golangci.com) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/loads)](https://goreportcard.com/report/github.com/go-openapi/loads) + +Loading of OAI specification documents from local or remote locations. Supports JSON and YAML documents. diff --git a/vendor/github.com/go-openapi/loads/doc.go b/vendor/github.com/go-openapi/loads/doc.go new file mode 100644 index 00000000000..3046da4cef3 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/doc.go @@ -0,0 +1,21 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package loads provides document loading methods for swagger (OAI) specifications. + +It is used by other go-openapi packages to load and run analysis on local or remote spec documents. + +*/ +package loads diff --git a/vendor/github.com/go-openapi/loads/go.mod b/vendor/github.com/go-openapi/loads/go.mod new file mode 100644 index 00000000000..54e5d98c921 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/go.mod @@ -0,0 +1,11 @@ +module github.com/go-openapi/loads + +require ( + github.com/go-openapi/analysis v0.19.10 + github.com/go-openapi/spec v0.19.6 + github.com/go-openapi/swag v0.19.7 + github.com/stretchr/testify v1.3.0 + gopkg.in/yaml.v2 v2.2.8 +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/loads/go.sum b/vendor/github.com/go-openapi/loads/go.sum new file mode 100644 index 00000000000..ec9a4010259 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/go.sum @@ -0,0 +1,180 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 h1:zV3ejI06GQ59hwDQAvmK1qxOQGB3WuVTRoY0okPTAv0= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +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/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3 h1:7MGZI1ibQDLasvAz8HuhvYk9eNJbJkCOXWsSjjMS+Zc= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3 h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.6 h1:rMMMj8cV38KVXK7SFc+I2MWClbEfbK705+j+dyqun5g= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.4 h1:eRvaqAhpL0IL6Trh5fDsGnGhiXndzHFuA05w6sXH6/g= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7 h1:VRuXN2EnMSsZdauzdss6JBC29YotDqG59BZ+tdlIL1s= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +go.mongodb.org/mongo-driver v1.0.3 h1:GKoji1ld3tw2aC+GX1wbr/J2fX13yNacEYoJ8Nhr0yU= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0 h1:ew6uUIeJOo+qdUUv7LxFCUhtWmVv7ZV/Xuy4FAUsw2E= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/loads/spec.go b/vendor/github.com/go-openapi/loads/spec.go new file mode 100644 index 00000000000..e4b4a3cf763 --- /dev/null +++ b/vendor/github.com/go-openapi/loads/spec.go @@ -0,0 +1,298 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package loads + +import ( + "bytes" + "encoding/gob" + "encoding/json" + "fmt" + "net/url" + + "github.com/go-openapi/analysis" + "github.com/go-openapi/spec" + "github.com/go-openapi/swag" +) + +// JSONDoc loads a json document from either a file or a remote url +func JSONDoc(path string) (json.RawMessage, error) { + data, err := swag.LoadFromFileOrHTTP(path) + if err != nil { + return nil, err + } + return json.RawMessage(data), nil +} + +// DocLoader represents a doc loader type +type DocLoader func(string) (json.RawMessage, error) + +// DocMatcher represents a predicate to check if a loader matches +type DocMatcher func(string) bool + +var ( + loaders *loader + defaultLoader *loader +) + +func init() { + defaultLoader = &loader{Match: func(_ string) bool { return true }, Fn: JSONDoc} + loaders = defaultLoader + spec.PathLoader = loaders.Fn + AddLoader(swag.YAMLMatcher, swag.YAMLDoc) + + gob.Register(map[string]interface{}{}) + gob.Register([]interface{}{}) + //gob.Register(spec.Refable{}) +} + +// AddLoader for a document +func AddLoader(predicate DocMatcher, load DocLoader) { + prev := loaders + loaders = &loader{ + Match: predicate, + Fn: load, + Next: prev, + } + spec.PathLoader = loaders.Fn +} + +type loader struct { + Fn DocLoader + Match DocMatcher + Next *loader +} + +// JSONSpec loads a spec from a json document +func JSONSpec(path string) (*Document, error) { + data, err := JSONDoc(path) + if err != nil { + return nil, err + } + // convert to json + return Analyzed(data, "") +} + +// Document represents a swagger spec document +type Document struct { + // specAnalyzer + Analyzer *analysis.Spec + spec *spec.Swagger + specFilePath string + origSpec *spec.Swagger + schema *spec.Schema + raw json.RawMessage +} + +// Embedded returns a Document based on embedded specs. No analysis is required +func Embedded(orig, flat json.RawMessage) (*Document, error) { + var origSpec, flatSpec spec.Swagger + if err := json.Unmarshal(orig, &origSpec); err != nil { + return nil, err + } + if err := json.Unmarshal(flat, &flatSpec); err != nil { + return nil, err + } + return &Document{ + raw: orig, + origSpec: &origSpec, + spec: &flatSpec, + }, nil +} + +// Spec loads a new spec document +func Spec(path string) (*Document, error) { + specURL, err := url.Parse(path) + if err != nil { + return nil, err + } + var lastErr error + for l := loaders.Next; l != nil; l = l.Next { + if loaders.Match(specURL.Path) { + b, err2 := loaders.Fn(path) + if err2 != nil { + lastErr = err2 + continue + } + doc, err3 := Analyzed(b, "") + if err3 != nil { + return nil, err3 + } + if doc != nil { + doc.specFilePath = path + } + return doc, nil + } + } + if lastErr != nil { + return nil, lastErr + } + b, err := defaultLoader.Fn(path) + if err != nil { + return nil, err + } + + document, err := Analyzed(b, "") + if document != nil { + document.specFilePath = path + } + + return document, err +} + +// Analyzed creates a new analyzed spec document +func Analyzed(data json.RawMessage, version string) (*Document, error) { + if version == "" { + version = "2.0" + } + if version != "2.0" { + return nil, fmt.Errorf("spec version %q is not supported", version) + } + + raw := data + trimmed := bytes.TrimSpace(data) + if len(trimmed) > 0 { + if trimmed[0] != '{' && trimmed[0] != '[' { + yml, err := swag.BytesToYAMLDoc(trimmed) + if err != nil { + return nil, fmt.Errorf("analyzed: %v", err) + } + d, err := swag.YAMLToJSON(yml) + if err != nil { + return nil, fmt.Errorf("analyzed: %v", err) + } + raw = d + } + } + + swspec := new(spec.Swagger) + if err := json.Unmarshal(raw, swspec); err != nil { + return nil, err + } + + origsqspec, err := cloneSpec(swspec) + if err != nil { + return nil, err + } + + d := &Document{ + Analyzer: analysis.New(swspec), + schema: spec.MustLoadSwagger20Schema(), + spec: swspec, + raw: raw, + origSpec: origsqspec, + } + return d, nil +} + +// Expanded expands the ref fields in the spec document and returns a new spec document +func (d *Document) Expanded(options ...*spec.ExpandOptions) (*Document, error) { + swspec := new(spec.Swagger) + if err := json.Unmarshal(d.raw, swspec); err != nil { + return nil, err + } + + var expandOptions *spec.ExpandOptions + if len(options) > 0 { + expandOptions = options[0] + } else { + expandOptions = &spec.ExpandOptions{ + RelativeBase: d.specFilePath, + } + } + + if err := spec.ExpandSpec(swspec, expandOptions); err != nil { + return nil, err + } + + dd := &Document{ + Analyzer: analysis.New(swspec), + spec: swspec, + specFilePath: d.specFilePath, + schema: spec.MustLoadSwagger20Schema(), + raw: d.raw, + origSpec: d.origSpec, + } + return dd, nil +} + +// BasePath the base path for this spec +func (d *Document) BasePath() string { + return d.spec.BasePath +} + +// Version returns the version of this spec +func (d *Document) Version() string { + return d.spec.Swagger +} + +// Schema returns the swagger 2.0 schema +func (d *Document) Schema() *spec.Schema { + return d.schema +} + +// Spec returns the swagger spec object model +func (d *Document) Spec() *spec.Swagger { + return d.spec +} + +// Host returns the host for the API +func (d *Document) Host() string { + return d.spec.Host +} + +// Raw returns the raw swagger spec as json bytes +func (d *Document) Raw() json.RawMessage { + return d.raw +} + +// OrigSpec yields the original spec +func (d *Document) OrigSpec() *spec.Swagger { + return d.origSpec +} + +// ResetDefinitions gives a shallow copy with the models reset +func (d *Document) ResetDefinitions() *Document { + defs := make(map[string]spec.Schema, len(d.origSpec.Definitions)) + for k, v := range d.origSpec.Definitions { + defs[k] = v + } + + d.spec.Definitions = defs + return d +} + +// Pristine creates a new pristine document instance based on the input data +func (d *Document) Pristine() *Document { + dd, _ := Analyzed(d.Raw(), d.Version()) + return dd +} + +// SpecFilePath returns the file path of the spec if one is defined +func (d *Document) SpecFilePath() string { + return d.specFilePath +} + +func cloneSpec(src *spec.Swagger) (*spec.Swagger, error) { + var b bytes.Buffer + if err := gob.NewEncoder(&b).Encode(src); err != nil { + return nil, err + } + + var dst spec.Swagger + if err := gob.NewDecoder(&b).Decode(&dst); err != nil { + return nil, err + } + return &dst, nil +} diff --git a/vendor/github.com/go-openapi/runtime/.editorconfig b/vendor/github.com/go-openapi/runtime/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/runtime/.gitignore b/vendor/github.com/go-openapi/runtime/.gitignore new file mode 100644 index 00000000000..fea8b84eca9 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/.gitignore @@ -0,0 +1,5 @@ +secrets.yml +coverage.out +*.cov +*.out +playground diff --git a/vendor/github.com/go-openapi/runtime/.travis.yml b/vendor/github.com/go-openapi/runtime/.travis.yml new file mode 100644 index 00000000000..e36276ab3fa --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/.travis.yml @@ -0,0 +1,13 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.13.x +- 1.14.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +language: go +notifications: + slack: + secure: EmObnQuM9Mw8J9vpFaKKHqSMN4Wsr/A9+v7ewAD5cEhA0T1P4m7MbJMiJOhxUhj/X+BFh2DamW+P2lT8mybj5wg8wnkQ2BteKA8Tawi6f9PRw2NRheO8tAi8o/npLnlmet0kc93mn+oLuqHw36w4+j5mkOl2FghkfGiUVhwrhkCP7KXQN+3TU87e+/HzQumlJ3nsE+6terVxkH3PmaUTsS5ONaODZfuxFpfb7RsoEl3skHf6d+tr+1nViLxxly7558Nc33C+W1mr0qiEvMLZ+kJ/CpGWBJ6CUJM3jm6hNe2eMuIPwEK2hxZob8c7n22VPap4K6a0bBRoydoDXaba+2sD7Ym6ivDO/DVyL44VeBBLyIiIBylDGQdZH+6SoWm90Qe/i7tnY/T5Ao5igT8f3cfQY1c3EsTfqmlDfrhmACBmwSlgkdVBLTprHL63JMY24LWmh4jhxsmMRZhCL4dze8su1w6pLN/pD1pGHtKYCEVbdTmaM3PblNRFf12XB7qosmQsgUndH4Vq3bTbU0s1pKjeDhRyLvFzvR0TBbo0pDLEoF1A/i5GVFWa7yLZNUDudQERRh7qv/xBl2excIaQ1sV4DSVm7bAE9l6Kp+yeHQJW2uN6Y3X8wu9gB9nv9l5HBze7wh8KE6PyWAOLYYqZg9/sAtsv/2GcQqXcKFF1zcA= +script: +- gotestsum -f short-verbose -- -race -timeout=20m -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/runtime/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/runtime/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/runtime/LICENSE b/vendor/github.com/go-openapi/runtime/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/runtime/README.md b/vendor/github.com/go-openapi/runtime/README.md new file mode 100644 index 00000000000..5b1ec649454 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/README.md @@ -0,0 +1,7 @@ +# runtime [![Build Status](https://travis-ci.org/go-openapi/runtime.svg?branch=client-context)](https://travis-ci.org/go-openapi/runtime) [![codecov](https://codecov.io/gh/go-openapi/runtime/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/runtime) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/runtime/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/runtime?status.svg)](http://godoc.org/github.com/go-openapi/runtime) + +# golang Open-API toolkit - runtime + +The runtime component for use in codegeneration or as untyped usage. diff --git a/vendor/github.com/go-openapi/runtime/bytestream.go b/vendor/github.com/go-openapi/runtime/bytestream.go new file mode 100644 index 00000000000..4459025b927 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/bytestream.go @@ -0,0 +1,155 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "bytes" + "encoding" + "errors" + "fmt" + "io" + "reflect" + + "github.com/go-openapi/swag" +) + +func defaultCloser() error { return nil } + +type byteStreamOpt func(opts *byteStreamOpts) + +// ClosesStream when the bytestream consumer or producer is finished +func ClosesStream(opts *byteStreamOpts) { + opts.Close = true +} + +type byteStreamOpts struct { + Close bool +} + +// ByteStreamConsumer creates a consmer for byte streams, +// takes a Writer/BinaryUnmarshaler interface or binary slice by reference, +// and reads from the provided reader +func ByteStreamConsumer(opts ...byteStreamOpt) Consumer { + var vals byteStreamOpts + for _, opt := range opts { + opt(&vals) + } + + return ConsumerFunc(func(reader io.Reader, data interface{}) error { + if reader == nil { + return errors.New("ByteStreamConsumer requires a reader") // early exit + } + + close := defaultCloser + if vals.Close { + if cl, ok := reader.(io.Closer); ok { + close = cl.Close + } + } + defer close() + + if wrtr, ok := data.(io.Writer); ok { + _, err := io.Copy(wrtr, reader) + return err + } + + buf := new(bytes.Buffer) + _, err := buf.ReadFrom(reader) + if err != nil { + return err + } + b := buf.Bytes() + + if bu, ok := data.(encoding.BinaryUnmarshaler); ok { + return bu.UnmarshalBinary(b) + } + + if t := reflect.TypeOf(data); data != nil && t.Kind() == reflect.Ptr { + v := reflect.Indirect(reflect.ValueOf(data)) + if t = v.Type(); t.Kind() == reflect.Slice && t.Elem().Kind() == reflect.Uint8 { + v.SetBytes(b) + return nil + } + } + + return fmt.Errorf("%v (%T) is not supported by the ByteStreamConsumer, %s", + data, data, "can be resolved by supporting Writer/BinaryUnmarshaler interface") + }) +} + +// ByteStreamProducer creates a producer for byte streams, +// takes a Reader/BinaryMarshaler interface or binary slice, +// and writes to a writer (essentially a pipe) +func ByteStreamProducer(opts ...byteStreamOpt) Producer { + var vals byteStreamOpts + for _, opt := range opts { + opt(&vals) + } + return ProducerFunc(func(writer io.Writer, data interface{}) error { + if writer == nil { + return errors.New("ByteStreamProducer requires a writer") // early exit + } + close := defaultCloser + if vals.Close { + if cl, ok := writer.(io.Closer); ok { + close = cl.Close + } + } + defer close() + + if rc, ok := data.(io.ReadCloser); ok { + defer rc.Close() + } + + if rdr, ok := data.(io.Reader); ok { + _, err := io.Copy(writer, rdr) + return err + } + + if bm, ok := data.(encoding.BinaryMarshaler); ok { + bytes, err := bm.MarshalBinary() + if err != nil { + return err + } + + _, err = writer.Write(bytes) + return err + } + + if data != nil { + if e, ok := data.(error); ok { + _, err := writer.Write([]byte(e.Error())) + return err + } + + v := reflect.Indirect(reflect.ValueOf(data)) + if t := v.Type(); t.Kind() == reflect.Slice && t.Elem().Kind() == reflect.Uint8 { + _, err := writer.Write(v.Bytes()) + return err + } + if t := v.Type(); t.Kind() == reflect.Struct || t.Kind() == reflect.Slice { + b, err := swag.WriteJSON(data) + if err != nil { + return err + } + _, err = writer.Write(b) + return err + } + } + + return fmt.Errorf("%v (%T) is not supported by the ByteStreamProducer, %s", + data, data, "can be resolved by supporting Reader/BinaryMarshaler interface") + }) +} diff --git a/vendor/github.com/go-openapi/runtime/client/auth_info.go b/vendor/github.com/go-openapi/runtime/client/auth_info.go new file mode 100644 index 00000000000..bbe1479c35d --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/auth_info.go @@ -0,0 +1,61 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "encoding/base64" + + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" +) + +// PassThroughAuth never manipulates the request +var PassThroughAuth runtime.ClientAuthInfoWriter + +func init() { + PassThroughAuth = runtime.ClientAuthInfoWriterFunc(func(_ runtime.ClientRequest, _ strfmt.Registry) error { return nil }) +} + +// BasicAuth provides a basic auth info writer +func BasicAuth(username, password string) runtime.ClientAuthInfoWriter { + return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { + encoded := base64.StdEncoding.EncodeToString([]byte(username + ":" + password)) + return r.SetHeaderParam("Authorization", "Basic "+encoded) + }) +} + +// APIKeyAuth provides an API key auth info writer +func APIKeyAuth(name, in, value string) runtime.ClientAuthInfoWriter { + if in == "query" { + return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { + return r.SetQueryParam(name, value) + }) + } + + if in == "header" { + return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { + return r.SetHeaderParam(name, value) + }) + } + return nil +} + +// BearerToken provides a header based oauth2 bearer access token auth info writer +func BearerToken(token string) runtime.ClientAuthInfoWriter { + return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error { + return r.SetHeaderParam("Authorization", "Bearer "+token) + }) +} diff --git a/vendor/github.com/go-openapi/runtime/client/keepalive.go b/vendor/github.com/go-openapi/runtime/client/keepalive.go new file mode 100644 index 00000000000..f83254515ba --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/keepalive.go @@ -0,0 +1,53 @@ +package client + +import ( + "io" + "io/ioutil" + "net/http" + "sync/atomic" +) + +// KeepAliveTransport drains the remaining body from a response +// so that go will reuse the TCP connections. +// This is not enabled by default because there are servers where +// the response never gets closed and that would make the code hang forever. +// So instead it's provided as a http client middleware that can be used to override +// any request. +func KeepAliveTransport(rt http.RoundTripper) http.RoundTripper { + return &keepAliveTransport{wrapped: rt} +} + +type keepAliveTransport struct { + wrapped http.RoundTripper +} + +func (k *keepAliveTransport) RoundTrip(r *http.Request) (*http.Response, error) { + resp, err := k.wrapped.RoundTrip(r) + if err != nil { + return resp, err + } + resp.Body = &drainingReadCloser{rdr: resp.Body} + return resp, nil +} + +type drainingReadCloser struct { + rdr io.ReadCloser + seenEOF uint32 +} + +func (d *drainingReadCloser) Read(p []byte) (n int, err error) { + n, err = d.rdr.Read(p) + if err == io.EOF || n == 0 { + atomic.StoreUint32(&d.seenEOF, 1) + } + return +} + +func (d *drainingReadCloser) Close() error { + // drain buffer + if atomic.LoadUint32(&d.seenEOF) != 1 { + //#nosec + io.Copy(ioutil.Discard, d.rdr) + } + return d.rdr.Close() +} diff --git a/vendor/github.com/go-openapi/runtime/client/request.go b/vendor/github.com/go-openapi/runtime/client/request.go new file mode 100644 index 00000000000..b7ea8b811b5 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/request.go @@ -0,0 +1,431 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "bytes" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/textproto" + "net/url" + "os" + "path" + "path/filepath" + "strings" + "time" + + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" +) + +// NewRequest creates a new swagger http client request +func newRequest(method, pathPattern string, writer runtime.ClientRequestWriter) (*request, error) { + return &request{ + pathPattern: pathPattern, + method: method, + writer: writer, + header: make(http.Header), + query: make(url.Values), + timeout: DefaultTimeout, + getBody: getRequestBuffer, + }, nil +} + +// Request represents a swagger client request. +// +// This Request struct converts to a HTTP request. +// There might be others that convert to other transports. +// There is no error checking here, it is assumed to be used after a spec has been validated. +// so impossible combinations should not arise (hopefully). +// +// The main purpose of this struct is to hide the machinery of adding params to a transport request. +// The generated code only implements what is necessary to turn a param into a valid value for these methods. +type request struct { + pathPattern string + method string + writer runtime.ClientRequestWriter + + pathParams map[string]string + header http.Header + query url.Values + formFields url.Values + fileFields map[string][]runtime.NamedReadCloser + payload interface{} + timeout time.Duration + buf *bytes.Buffer + + getBody func(r *request) []byte +} + +var ( + // ensure interface compliance + _ runtime.ClientRequest = new(request) +) + +func (r *request) isMultipart(mediaType string) bool { + if len(r.fileFields) > 0 { + return true + } + + return runtime.MultipartFormMime == mediaType +} + +// BuildHTTP creates a new http request based on the data from the params +func (r *request) BuildHTTP(mediaType, basePath string, producers map[string]runtime.Producer, registry strfmt.Registry) (*http.Request, error) { + return r.buildHTTP(mediaType, basePath, producers, registry, nil) +} +func escapeQuotes(s string) string { + return strings.NewReplacer("\\", "\\\\", `"`, "\\\"").Replace(s) +} +func (r *request) buildHTTP(mediaType, basePath string, producers map[string]runtime.Producer, registry strfmt.Registry, auth runtime.ClientAuthInfoWriter) (*http.Request, error) { + // build the data + if err := r.writer.WriteToRequest(r, registry); err != nil { + return nil, err + } + + // Our body must be an io.Reader. + // When we create the http.Request, if we pass it a + // bytes.Buffer then it will wrap it in an io.ReadCloser + // and set the content length automatically. + var body io.Reader + var pr *io.PipeReader + var pw *io.PipeWriter + + r.buf = bytes.NewBuffer(nil) + if r.payload != nil || len(r.formFields) > 0 || len(r.fileFields) > 0 { + body = r.buf + if r.isMultipart(mediaType) { + pr, pw = io.Pipe() + body = pr + } + } + + // check if this is a form type request + if len(r.formFields) > 0 || len(r.fileFields) > 0 { + if !r.isMultipart(mediaType) { + r.header.Set(runtime.HeaderContentType, mediaType) + formString := r.formFields.Encode() + r.buf.WriteString(formString) + goto DoneChoosingBodySource + } + + mp := multipart.NewWriter(pw) + r.header.Set(runtime.HeaderContentType, mangleContentType(mediaType, mp.Boundary())) + + go func() { + defer func() { + mp.Close() + pw.Close() + }() + + for fn, v := range r.formFields { + for _, vi := range v { + if err := mp.WriteField(fn, vi); err != nil { + pw.CloseWithError(err) + log.Println(err) + } + } + } + + defer func() { + for _, ff := range r.fileFields { + for _, ffi := range ff { + ffi.Close() + } + } + }() + for fn, f := range r.fileFields { + for _, fi := range f { + buf := bytes.NewBuffer([]byte{}) + + // Need to read the data so that we can detect the content type + _, err := io.Copy(buf, fi) + if err != nil { + _ = pw.CloseWithError(err) + log.Println(err) + } + fileBytes := buf.Bytes() + fileContentType := http.DetectContentType(fileBytes) + + newFi := runtime.NamedReader(fi.Name(), buf) + + // Create the MIME headers for the new part + h := make(textproto.MIMEHeader) + h.Set("Content-Disposition", + fmt.Sprintf(`form-data; name="%s"; filename="%s"`, + escapeQuotes(fn), escapeQuotes(filepath.Base(fi.Name())))) + h.Set("Content-Type", fileContentType) + + wrtr, err := mp.CreatePart(h) + if err != nil { + pw.CloseWithError(err) + log.Println(err) + } else if _, err := io.Copy(wrtr, newFi); err != nil { + pw.CloseWithError(err) + log.Println(err) + } + } + } + }() + + goto DoneChoosingBodySource + } + + // if there is payload, use the producer to write the payload, and then + // set the header to the content-type appropriate for the payload produced + if r.payload != nil { + // TODO: infer most appropriate content type based on the producer used, + // and the `consumers` section of the spec/operation + r.header.Set(runtime.HeaderContentType, mediaType) + if rdr, ok := r.payload.(io.ReadCloser); ok { + body = rdr + goto DoneChoosingBodySource + } + + if rdr, ok := r.payload.(io.Reader); ok { + body = rdr + goto DoneChoosingBodySource + } + + producer := producers[mediaType] + if err := producer.Produce(r.buf, r.payload); err != nil { + return nil, err + } + } + +DoneChoosingBodySource: + + if runtime.CanHaveBody(r.method) && body == nil && r.header.Get(runtime.HeaderContentType) == "" { + r.header.Set(runtime.HeaderContentType, mediaType) + } + + if auth != nil { + // If we're not using r.buf as our http.Request's body, + // either the payload is an io.Reader or io.ReadCloser, + // or we're doing a multipart form/file. + // + // In those cases, if the AuthenticateRequest call asks for the body, + // we must read it into a buffer and provide that, then use that buffer + // as the body of our http.Request. + // + // This is done in-line with the GetBody() request rather than ahead + // of time, because there's no way to know if the AuthenticateRequest + // will even ask for the body of the request. + // + // If for some reason the copy fails, there's no way to return that + // error to the GetBody() call, so return it afterwards. + // + // An error from the copy action is prioritized over any error + // from the AuthenticateRequest call, because the mis-read + // body may have interfered with the auth. + // + var copyErr error + if buf, ok := body.(*bytes.Buffer); body != nil && (!ok || buf != r.buf) { + var copied bool + r.getBody = func(r *request) []byte { + if copied { + return getRequestBuffer(r) + } + + defer func() { + copied = true + }() + + if _, copyErr = io.Copy(r.buf, body); copyErr != nil { + return nil + } + + if closer, ok := body.(io.ReadCloser); ok { + if copyErr = closer.Close(); copyErr != nil { + return nil + } + } + + body = r.buf + return getRequestBuffer(r) + } + } + + authErr := auth.AuthenticateRequest(r, registry) + + if copyErr != nil { + return nil, fmt.Errorf("error retrieving the response body: %v", copyErr) + } + + if authErr != nil { + return nil, authErr + } + } + + // create http request + var reinstateSlash bool + if r.pathPattern != "" && r.pathPattern != "/" && r.pathPattern[len(r.pathPattern)-1] == '/' { + reinstateSlash = true + } + urlPath := path.Join(basePath, r.pathPattern) + for k, v := range r.pathParams { + urlPath = strings.Replace(urlPath, "{"+k+"}", url.PathEscape(v), -1) + } + if reinstateSlash { + urlPath = urlPath + "/" + } + + req, err := http.NewRequest(r.method, urlPath, body) + if err != nil { + return nil, err + } + + req.URL.RawQuery = r.query.Encode() + req.Header = r.header + + return req, nil +} + +func mangleContentType(mediaType, boundary string) string { + if strings.ToLower(mediaType) == runtime.URLencodedFormMime { + return fmt.Sprintf("%s; boundary=%s", mediaType, boundary) + } + return "multipart/form-data; boundary=" + boundary +} + +func (r *request) GetMethod() string { + return r.method +} + +func (r *request) GetPath() string { + path := r.pathPattern + for k, v := range r.pathParams { + path = strings.Replace(path, "{"+k+"}", v, -1) + } + return path +} + +func (r *request) GetBody() []byte { + return r.getBody(r) +} + +func getRequestBuffer(r *request) []byte { + if r.buf == nil { + return nil + } + return r.buf.Bytes() +} + +// SetHeaderParam adds a header param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetHeaderParam(name string, values ...string) error { + if r.header == nil { + r.header = make(http.Header) + } + r.header[http.CanonicalHeaderKey(name)] = values + return nil +} + +// GetHeaderParams returns the all headers currently set for the request +func (r *request) GetHeaderParams() http.Header { + return r.header +} + +// SetQueryParam adds a query param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetQueryParam(name string, values ...string) error { + if r.query == nil { + r.query = make(url.Values) + } + r.query[name] = values + return nil +} + +// GetQueryParams returns a copy of all query params currently set for the request +func (r *request) GetQueryParams() url.Values { + var result = make(url.Values) + for key, value := range r.query { + result[key] = append([]string{}, value...) + } + return result +} + +// SetFormParam adds a forn param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetFormParam(name string, values ...string) error { + if r.formFields == nil { + r.formFields = make(url.Values) + } + r.formFields[name] = values + return nil +} + +// SetPathParam adds a path param to the request +func (r *request) SetPathParam(name string, value string) error { + if r.pathParams == nil { + r.pathParams = make(map[string]string) + } + + r.pathParams[name] = value + return nil +} + +// SetFileParam adds a file param to the request +func (r *request) SetFileParam(name string, files ...runtime.NamedReadCloser) error { + for _, file := range files { + if actualFile, ok := file.(*os.File); ok { + fi, err := os.Stat(actualFile.Name()) + if err != nil { + return err + } + if fi.IsDir() { + return fmt.Errorf("%q is a directory, only files are supported", file.Name()) + } + } + } + + if r.fileFields == nil { + r.fileFields = make(map[string][]runtime.NamedReadCloser) + } + if r.formFields == nil { + r.formFields = make(url.Values) + } + + r.fileFields[name] = files + return nil +} + +func (r *request) GetFileParam() map[string][]runtime.NamedReadCloser { + return r.fileFields +} + +// SetBodyParam sets a body parameter on the request. +// This does not yet serialze the object, this happens as late as possible. +func (r *request) SetBodyParam(payload interface{}) error { + r.payload = payload + return nil +} + +func (r *request) GetBodyParam() interface{} { + return r.payload +} + +// SetTimeout sets the timeout for a request +func (r *request) SetTimeout(timeout time.Duration) error { + r.timeout = timeout + return nil +} diff --git a/vendor/github.com/go-openapi/runtime/client/response.go b/vendor/github.com/go-openapi/runtime/client/response.go new file mode 100644 index 00000000000..bd238588b7d --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/response.go @@ -0,0 +1,44 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "io" + "net/http" + + "github.com/go-openapi/runtime" +) + +var _ runtime.ClientResponse = response{} + +type response struct { + resp *http.Response +} + +func (r response) Code() int { + return r.resp.StatusCode +} + +func (r response) Message() string { + return r.resp.Status +} + +func (r response) GetHeader(name string) string { + return r.resp.Header.Get(name) +} + +func (r response) Body() io.ReadCloser { + return r.resp.Body +} diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go new file mode 100644 index 00000000000..00ce53d675e --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client/runtime.go @@ -0,0 +1,481 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "context" + "crypto" + "crypto/ecdsa" + "crypto/rsa" + "crypto/tls" + "crypto/x509" + "encoding/pem" + "fmt" + "io/ioutil" + "mime" + "net/http" + "net/http/httputil" + "strings" + "sync" + "time" + + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/logger" + "github.com/go-openapi/runtime/middleware" +) + +// TLSClientOptions to configure client authentication with mutual TLS +type TLSClientOptions struct { + // Certificate is the path to a PEM-encoded certificate to be used for + // client authentication. If set then Key must also be set. + Certificate string + + // LoadedCertificate is the certificate to be used for client authentication. + // This field is ignored if Certificate is set. If this field is set, LoadedKey + // is also required. + LoadedCertificate *x509.Certificate + + // Key is the path to an unencrypted PEM-encoded private key for client + // authentication. This field is required if Certificate is set. + Key string + + // LoadedKey is the key for client authentication. This field is required if + // LoadedCertificate is set. + LoadedKey crypto.PrivateKey + + // CA is a path to a PEM-encoded certificate that specifies the root certificate + // to use when validating the TLS certificate presented by the server. If this field + // (and LoadedCA) is not set, the system certificate pool is used. This field is ignored if LoadedCA + // is set. + CA string + + // LoadedCA specifies the root certificate to use when validating the server's TLS certificate. + // If this field (and CA) is not set, the system certificate pool is used. + LoadedCA *x509.Certificate + + // LoadedCAPool specifies a pool of RootCAs to use when validating the server's TLS certificate. + // If set, it will be combined with the the other loaded certificates (see LoadedCA and CA). + // If neither LoadedCA or CA is set, the provided pool with override the system + // certificate pool. + // The caller must not use the supplied pool after calling TLSClientAuth. + LoadedCAPool *x509.CertPool + + // ServerName specifies the hostname to use when verifying the server certificate. + // If this field is set then InsecureSkipVerify will be ignored and treated as + // false. + ServerName string + + // InsecureSkipVerify controls whether the certificate chain and hostname presented + // by the server are validated. If false, any certificate is accepted. + InsecureSkipVerify bool + + // VerifyPeerCertificate, if not nil, is called after normal + // certificate verification. It receives the raw ASN.1 certificates + // provided by the peer and also any verified chains that normal processing found. + // If it returns a non-nil error, the handshake is aborted and that error results. + // + // If normal verification fails then the handshake will abort before + // considering this callback. If normal verification is disabled by + // setting InsecureSkipVerify then this callback will be considered but + // the verifiedChains argument will always be nil. + VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error + + // SessionTicketsDisabled may be set to true to disable session ticket and + // PSK (resumption) support. Note that on clients, session ticket support is + // also disabled if ClientSessionCache is nil. + SessionTicketsDisabled bool + + // ClientSessionCache is a cache of ClientSessionState entries for TLS + // session resumption. It is only used by clients. + ClientSessionCache tls.ClientSessionCache + + // Prevents callers using unkeyed fields. + _ struct{} +} + +// TLSClientAuth creates a tls.Config for mutual auth +func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { + // create client tls config + cfg := &tls.Config{} + + // load client cert if specified + if opts.Certificate != "" { + cert, err := tls.LoadX509KeyPair(opts.Certificate, opts.Key) + if err != nil { + return nil, fmt.Errorf("tls client cert: %v", err) + } + cfg.Certificates = []tls.Certificate{cert} + } else if opts.LoadedCertificate != nil { + block := pem.Block{Type: "CERTIFICATE", Bytes: opts.LoadedCertificate.Raw} + certPem := pem.EncodeToMemory(&block) + + var keyBytes []byte + switch k := opts.LoadedKey.(type) { + case *rsa.PrivateKey: + keyBytes = x509.MarshalPKCS1PrivateKey(k) + case *ecdsa.PrivateKey: + var err error + keyBytes, err = x509.MarshalECPrivateKey(k) + if err != nil { + return nil, fmt.Errorf("tls client priv key: %v", err) + } + default: + return nil, fmt.Errorf("tls client priv key: unsupported key type") + } + + block = pem.Block{Type: "PRIVATE KEY", Bytes: keyBytes} + keyPem := pem.EncodeToMemory(&block) + + cert, err := tls.X509KeyPair(certPem, keyPem) + if err != nil { + return nil, fmt.Errorf("tls client cert: %v", err) + } + cfg.Certificates = []tls.Certificate{cert} + } + + cfg.InsecureSkipVerify = opts.InsecureSkipVerify + + cfg.VerifyPeerCertificate = opts.VerifyPeerCertificate + cfg.SessionTicketsDisabled = opts.SessionTicketsDisabled + cfg.ClientSessionCache = opts.ClientSessionCache + + // When no CA certificate is provided, default to the system cert pool + // that way when a request is made to a server known by the system trust store, + // the name is still verified + if opts.LoadedCA != nil { + caCertPool := basePool(opts.LoadedCAPool) + caCertPool.AddCert(opts.LoadedCA) + cfg.RootCAs = caCertPool + } else if opts.CA != "" { + // load ca cert + caCert, err := ioutil.ReadFile(opts.CA) + if err != nil { + return nil, fmt.Errorf("tls client ca: %v", err) + } + caCertPool := basePool(opts.LoadedCAPool) + caCertPool.AppendCertsFromPEM(caCert) + cfg.RootCAs = caCertPool + } else if opts.LoadedCAPool != nil { + cfg.RootCAs = opts.LoadedCAPool + } + + // apply servername overrride + if opts.ServerName != "" { + cfg.InsecureSkipVerify = false + cfg.ServerName = opts.ServerName + } + + cfg.BuildNameToCertificate() + + return cfg, nil +} + +func basePool(pool *x509.CertPool) *x509.CertPool { + if pool == nil { + return x509.NewCertPool() + } + return pool +} + +// TLSTransport creates a http client transport suitable for mutual tls auth +func TLSTransport(opts TLSClientOptions) (http.RoundTripper, error) { + cfg, err := TLSClientAuth(opts) + if err != nil { + return nil, err + } + + return &http.Transport{TLSClientConfig: cfg}, nil +} + +// TLSClient creates a http.Client for mutual auth +func TLSClient(opts TLSClientOptions) (*http.Client, error) { + transport, err := TLSTransport(opts) + if err != nil { + return nil, err + } + return &http.Client{Transport: transport}, nil +} + +// DefaultTimeout the default request timeout +var DefaultTimeout = 30 * time.Second + +// Runtime represents an API client that uses the transport +// to make http requests based on a swagger specification. +type Runtime struct { + DefaultMediaType string + DefaultAuthentication runtime.ClientAuthInfoWriter + Consumers map[string]runtime.Consumer + Producers map[string]runtime.Producer + + Transport http.RoundTripper + Jar http.CookieJar + //Spec *spec.Document + Host string + BasePath string + Formats strfmt.Registry + Context context.Context + + Debug bool + logger logger.Logger + + clientOnce *sync.Once + client *http.Client + schemes []string +} + +// New creates a new default runtime for a swagger api runtime.Client +func New(host, basePath string, schemes []string) *Runtime { + var rt Runtime + rt.DefaultMediaType = runtime.JSONMime + + // TODO: actually infer this stuff from the spec + rt.Consumers = map[string]runtime.Consumer{ + runtime.JSONMime: runtime.JSONConsumer(), + runtime.XMLMime: runtime.XMLConsumer(), + runtime.TextMime: runtime.TextConsumer(), + runtime.HTMLMime: runtime.TextConsumer(), + runtime.CSVMime: runtime.CSVConsumer(), + runtime.DefaultMime: runtime.ByteStreamConsumer(), + } + rt.Producers = map[string]runtime.Producer{ + runtime.JSONMime: runtime.JSONProducer(), + runtime.XMLMime: runtime.XMLProducer(), + runtime.TextMime: runtime.TextProducer(), + runtime.HTMLMime: runtime.TextProducer(), + runtime.CSVMime: runtime.CSVProducer(), + runtime.DefaultMime: runtime.ByteStreamProducer(), + } + rt.Transport = http.DefaultTransport + rt.Jar = nil + rt.Host = host + rt.BasePath = basePath + rt.Context = context.Background() + rt.clientOnce = new(sync.Once) + if !strings.HasPrefix(rt.BasePath, "/") { + rt.BasePath = "/" + rt.BasePath + } + + rt.Debug = logger.DebugEnabled() + rt.logger = logger.StandardLogger{} + + if len(schemes) > 0 { + rt.schemes = schemes + } + return &rt +} + +// NewWithClient allows you to create a new transport with a configured http.Client +func NewWithClient(host, basePath string, schemes []string, client *http.Client) *Runtime { + rt := New(host, basePath, schemes) + if client != nil { + rt.clientOnce.Do(func() { + rt.client = client + }) + } + return rt +} + +func (r *Runtime) pickScheme(schemes []string) string { + if v := r.selectScheme(r.schemes); v != "" { + return v + } + if v := r.selectScheme(schemes); v != "" { + return v + } + return "http" +} + +func (r *Runtime) selectScheme(schemes []string) string { + schLen := len(schemes) + if schLen == 0 { + return "" + } + + scheme := schemes[0] + // prefer https, but skip when not possible + if scheme != "https" && schLen > 1 { + for _, sch := range schemes { + if sch == "https" { + scheme = sch + break + } + } + } + return scheme +} +func transportOrDefault(left, right http.RoundTripper) http.RoundTripper { + if left == nil { + return right + } + return left +} + +// EnableConnectionReuse drains the remaining body from a response +// so that go will reuse the TCP connections. +// +// This is not enabled by default because there are servers where +// the response never gets closed and that would make the code hang forever. +// So instead it's provided as a http client middleware that can be used to override +// any request. +func (r *Runtime) EnableConnectionReuse() { + if r.client == nil { + r.Transport = KeepAliveTransport( + transportOrDefault(r.Transport, http.DefaultTransport), + ) + return + } + + r.client.Transport = KeepAliveTransport( + transportOrDefault(r.client.Transport, + transportOrDefault(r.Transport, http.DefaultTransport), + ), + ) +} + +// Submit a request and when there is a body on success it will turn that into the result +// all other things are turned into an api error for swagger which retains the status code +func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error) { + params, readResponse, auth := operation.Params, operation.Reader, operation.AuthInfo + + request, err := newRequest(operation.Method, operation.PathPattern, params) + if err != nil { + return nil, err + } + + var accept []string + accept = append(accept, operation.ProducesMediaTypes...) + if err = request.SetHeaderParam(runtime.HeaderAccept, accept...); err != nil { + return nil, err + } + + if auth == nil && r.DefaultAuthentication != nil { + auth = r.DefaultAuthentication + } + //if auth != nil { + // if err := auth.AuthenticateRequest(request, r.Formats); err != nil { + // return nil, err + // } + //} + + // TODO: pick appropriate media type + cmt := r.DefaultMediaType + for _, mediaType := range operation.ConsumesMediaTypes { + // Pick first non-empty media type + if mediaType != "" { + cmt = mediaType + break + } + } + + if _, ok := r.Producers[cmt]; !ok && cmt != runtime.MultipartFormMime && cmt != runtime.URLencodedFormMime { + return nil, fmt.Errorf("none of producers: %v registered. try %s", r.Producers, cmt) + } + + req, err := request.buildHTTP(cmt, r.BasePath, r.Producers, r.Formats, auth) + if err != nil { + return nil, err + } + req.URL.Scheme = r.pickScheme(operation.Schemes) + req.URL.Host = r.Host + req.Host = r.Host + + r.clientOnce.Do(func() { + r.client = &http.Client{ + Transport: r.Transport, + Jar: r.Jar, + } + }) + + if r.Debug { + b, err2 := httputil.DumpRequestOut(req, true) + if err2 != nil { + return nil, err2 + } + r.logger.Debugf("%s\n", string(b)) + } + + var hasTimeout bool + pctx := operation.Context + if pctx == nil { + pctx = r.Context + } else { + hasTimeout = true + } + if pctx == nil { + pctx = context.Background() + } + var ctx context.Context + var cancel context.CancelFunc + if hasTimeout { + ctx, cancel = context.WithCancel(pctx) + } else { + ctx, cancel = context.WithTimeout(pctx, request.timeout) + } + defer cancel() + + client := operation.Client + if client == nil { + client = r.client + } + req = req.WithContext(ctx) + res, err := client.Do(req) // make requests, by default follows 10 redirects before failing + if err != nil { + return nil, err + } + defer res.Body.Close() + + if r.Debug { + b, err2 := httputil.DumpResponse(res, true) + if err2 != nil { + return nil, err2 + } + r.logger.Debugf("%s\n", string(b)) + } + + ct := res.Header.Get(runtime.HeaderContentType) + if ct == "" { // this should really really never occur + ct = r.DefaultMediaType + } + + mt, _, err := mime.ParseMediaType(ct) + if err != nil { + return nil, fmt.Errorf("parse content type: %s", err) + } + + cons, ok := r.Consumers[mt] + if !ok { + if cons, ok = r.Consumers["*/*"]; !ok { + // scream about not knowing what to do + return nil, fmt.Errorf("no consumer: %q", ct) + } + } + return readResponse.ReadResponse(response{res}, cons) +} + +// SetDebug changes the debug flag. +// It ensures that client and middlewares have the set debug level. +func (r *Runtime) SetDebug(debug bool) { + r.Debug = debug + middleware.Debug = debug +} + +// SetLogger changes the logger stream. +// It ensures that client and middlewares use the same logger. +func (r *Runtime) SetLogger(logger logger.Logger) { + r.logger = logger + middleware.Logger = logger +} diff --git a/vendor/github.com/go-openapi/runtime/client_auth_info.go b/vendor/github.com/go-openapi/runtime/client_auth_info.go new file mode 100644 index 00000000000..c6c97d9a7c3 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client_auth_info.go @@ -0,0 +1,30 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import "github.com/go-openapi/strfmt" + +// A ClientAuthInfoWriterFunc converts a function to a request writer interface +type ClientAuthInfoWriterFunc func(ClientRequest, strfmt.Registry) error + +// AuthenticateRequest adds authentication data to the request +func (fn ClientAuthInfoWriterFunc) AuthenticateRequest(req ClientRequest, reg strfmt.Registry) error { + return fn(req, reg) +} + +// A ClientAuthInfoWriter implementor knows how to write authentication info to a request +type ClientAuthInfoWriter interface { + AuthenticateRequest(ClientRequest, strfmt.Registry) error +} diff --git a/vendor/github.com/go-openapi/runtime/client_operation.go b/vendor/github.com/go-openapi/runtime/client_operation.go new file mode 100644 index 00000000000..fa21eacf330 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client_operation.go @@ -0,0 +1,41 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "context" + "net/http" +) + +// ClientOperation represents the context for a swagger operation to be submitted to the transport +type ClientOperation struct { + ID string + Method string + PathPattern string + ProducesMediaTypes []string + ConsumesMediaTypes []string + Schemes []string + AuthInfo ClientAuthInfoWriter + Params ClientRequestWriter + Reader ClientResponseReader + Context context.Context + Client *http.Client +} + +// A ClientTransport implementor knows how to submit Request objects to some destination +type ClientTransport interface { + //Submit(string, RequestWriter, ResponseReader, AuthInfoWriter) (interface{}, error) + Submit(*ClientOperation) (interface{}, error) +} diff --git a/vendor/github.com/go-openapi/runtime/client_request.go b/vendor/github.com/go-openapi/runtime/client_request.go new file mode 100644 index 00000000000..6215e0a1c1f --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client_request.go @@ -0,0 +1,103 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "io" + "io/ioutil" + "net/http" + "net/url" + "time" + + "github.com/go-openapi/strfmt" +) + +// ClientRequestWriterFunc converts a function to a request writer interface +type ClientRequestWriterFunc func(ClientRequest, strfmt.Registry) error + +// WriteToRequest adds data to the request +func (fn ClientRequestWriterFunc) WriteToRequest(req ClientRequest, reg strfmt.Registry) error { + return fn(req, reg) +} + +// ClientRequestWriter is an interface for things that know how to write to a request +type ClientRequestWriter interface { + WriteToRequest(ClientRequest, strfmt.Registry) error +} + +// ClientRequest is an interface for things that know how to +// add information to a swagger client request +type ClientRequest interface { + SetHeaderParam(string, ...string) error + + GetHeaderParams() http.Header + + SetQueryParam(string, ...string) error + + SetFormParam(string, ...string) error + + SetPathParam(string, string) error + + GetQueryParams() url.Values + + SetFileParam(string, ...NamedReadCloser) error + + SetBodyParam(interface{}) error + + SetTimeout(time.Duration) error + + GetMethod() string + + GetPath() string + + GetBody() []byte + + GetBodyParam() interface{} + + GetFileParam() map[string][]NamedReadCloser +} + +// NamedReadCloser represents a named ReadCloser interface +type NamedReadCloser interface { + io.ReadCloser + Name() string +} + +// NamedReader creates a NamedReadCloser for use as file upload +func NamedReader(name string, rdr io.Reader) NamedReadCloser { + rc, ok := rdr.(io.ReadCloser) + if !ok { + rc = ioutil.NopCloser(rdr) + } + return &namedReadCloser{ + name: name, + cr: rc, + } +} + +type namedReadCloser struct { + name string + cr io.ReadCloser +} + +func (n *namedReadCloser) Close() error { + return n.cr.Close() +} +func (n *namedReadCloser) Read(p []byte) (int, error) { + return n.cr.Read(p) +} +func (n *namedReadCloser) Name() string { + return n.name +} diff --git a/vendor/github.com/go-openapi/runtime/client_response.go b/vendor/github.com/go-openapi/runtime/client_response.go new file mode 100644 index 00000000000..729e18b2283 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/client_response.go @@ -0,0 +1,63 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "fmt" + "io" +) + +// A ClientResponse represents a client response +// This bridges between responses obtained from different transports +type ClientResponse interface { + Code() int + Message() string + GetHeader(string) string + Body() io.ReadCloser +} + +// A ClientResponseReaderFunc turns a function into a ClientResponseReader interface implementation +type ClientResponseReaderFunc func(ClientResponse, Consumer) (interface{}, error) + +// ReadResponse reads the response +func (read ClientResponseReaderFunc) ReadResponse(resp ClientResponse, consumer Consumer) (interface{}, error) { + return read(resp, consumer) +} + +// A ClientResponseReader is an interface for things want to read a response. +// An application of this is to create structs from response values +type ClientResponseReader interface { + ReadResponse(ClientResponse, Consumer) (interface{}, error) +} + +// NewAPIError creates a new API error +func NewAPIError(opName string, payload interface{}, code int) *APIError { + return &APIError{ + OperationName: opName, + Response: payload, + Code: code, + } +} + +// APIError wraps an error model and captures the status code +type APIError struct { + OperationName string + Response interface{} + Code int +} + +func (a *APIError) Error() string { + return fmt.Sprintf("%s (status %d): %+v ", a.OperationName, a.Code, a.Response) +} diff --git a/vendor/github.com/go-openapi/runtime/constants.go b/vendor/github.com/go-openapi/runtime/constants.go new file mode 100644 index 00000000000..a4de897adcd --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/constants.go @@ -0,0 +1,47 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +const ( + // HeaderContentType represents a http content-type header, it's value is supposed to be a mime type + HeaderContentType = "Content-Type" + + // HeaderTransferEncoding represents a http transfer-encoding header. + HeaderTransferEncoding = "Transfer-Encoding" + + // HeaderAccept the Accept header + HeaderAccept = "Accept" + + charsetKey = "charset" + + // DefaultMime the default fallback mime type + DefaultMime = "application/octet-stream" + // JSONMime the json mime type + JSONMime = "application/json" + // YAMLMime the yaml mime type + YAMLMime = "application/x-yaml" + // XMLMime the xml mime type + XMLMime = "application/xml" + // TextMime the text mime type + TextMime = "text/plain" + // HTMLMime the html mime type + HTMLMime = "text/html" + // CSVMime the csv mime type + CSVMime = "text/csv" + // MultipartFormMime the multipart form mime type + MultipartFormMime = "multipart/form-data" + // URLencodedFormMime the url encoded form mime type + URLencodedFormMime = "application/x-www-form-urlencoded" +) diff --git a/vendor/github.com/go-openapi/runtime/csv.go b/vendor/github.com/go-openapi/runtime/csv.go new file mode 100644 index 00000000000..d807bd915b4 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/csv.go @@ -0,0 +1,77 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "bytes" + "encoding/csv" + "errors" + "io" +) + +// CSVConsumer creates a new CSV consumer +func CSVConsumer() Consumer { + return ConsumerFunc(func(reader io.Reader, data interface{}) error { + if reader == nil { + return errors.New("CSVConsumer requires a reader") + } + + csvReader := csv.NewReader(reader) + writer, ok := data.(io.Writer) + if !ok { + return errors.New("data type must be io.Writer") + } + csvWriter := csv.NewWriter(writer) + records, err := csvReader.ReadAll() + if err != nil { + return err + } + for _, r := range records { + if err := csvWriter.Write(r); err != nil { + return err + } + } + csvWriter.Flush() + return nil + }) +} + +// CSVProducer creates a new CSV producer +func CSVProducer() Producer { + return ProducerFunc(func(writer io.Writer, data interface{}) error { + if writer == nil { + return errors.New("CSVProducer requires a writer") + } + + dataBytes, ok := data.([]byte) + if !ok { + return errors.New("data type must be byte array") + } + + csvReader := csv.NewReader(bytes.NewBuffer(dataBytes)) + records, err := csvReader.ReadAll() + if err != nil { + return err + } + csvWriter := csv.NewWriter(writer) + for _, r := range records { + if err := csvWriter.Write(r); err != nil { + return err + } + } + csvWriter.Flush() + return nil + }) +} diff --git a/vendor/github.com/go-openapi/runtime/discard.go b/vendor/github.com/go-openapi/runtime/discard.go new file mode 100644 index 00000000000..0d390cfd64c --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/discard.go @@ -0,0 +1,9 @@ +package runtime + +import "io" + +// DiscardConsumer does absolutely nothing, it's a black hole. +var DiscardConsumer = ConsumerFunc(func(_ io.Reader, _ interface{}) error { return nil }) + +// DiscardProducer does absolutely nothing, it's a black hole. +var DiscardProducer = ProducerFunc(func(_ io.Writer, _ interface{}) error { return nil }) diff --git a/vendor/github.com/go-openapi/runtime/file.go b/vendor/github.com/go-openapi/runtime/file.go new file mode 100644 index 00000000000..85971c18c4b --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/file.go @@ -0,0 +1,33 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import "mime/multipart" + +// File represents an uploaded file. +type File struct { + Data multipart.File + Header *multipart.FileHeader +} + +// Read bytes from the file +func (f *File) Read(p []byte) (n int, err error) { + return f.Data.Read(p) +} + +// Close the file +func (f *File) Close() error { + return f.Data.Close() +} diff --git a/vendor/github.com/go-openapi/runtime/go.mod b/vendor/github.com/go-openapi/runtime/go.mod new file mode 100644 index 00000000000..f5f9d16be9e --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/go.mod @@ -0,0 +1,16 @@ +module github.com/go-openapi/runtime + +require ( + github.com/docker/go-units v0.4.0 + github.com/go-openapi/analysis v0.19.5 + github.com/go-openapi/errors v0.19.2 + github.com/go-openapi/loads v0.19.3 + github.com/go-openapi/spec v0.19.3 + github.com/go-openapi/strfmt v0.19.3 + github.com/go-openapi/swag v0.19.5 + github.com/go-openapi/validate v0.19.3 + github.com/stretchr/testify v1.4.0 + gopkg.in/yaml.v2 v2.2.4 +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/runtime/go.sum b/vendor/github.com/go-openapi/runtime/go.sum new file mode 100644 index 00000000000..c24bb9865fd --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/go.sum @@ -0,0 +1,149 @@ +github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +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/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2 h1:ophLETFestFZHk3ji7niPEL4d466QjW+0Tdg5VyDq7E= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5 h1:8b2ZgKfKIUTVQpTb77MoRDIMEIwvDVw40o3aOXdfYzI= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2 h1:rf5ArTHmIJxyV5Oiks+Su0mUens1+AjpkPoWr5xFRcI= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3 h1:jwIoahqCmaA5OBoc/B+1+Mu2L0Gr8xYQnbeyQEo/7b0= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCrE= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= +github.com/go-openapi/spec v0.19.3 h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0 h1:0Dn9qy1G9+UJfRU7TR8bmdGxb4uifB7HNrJjOnV0yPk= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3 h1:eRfyY5SkaNJCAwmmMcADjY31ow9+N7MCLW7oRkbsINA= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2 h1:ky5l57HjyVRrsJfd2+Ro5Z9PjGuKbsmftwyMtk8H7js= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3 h1:PAH/2DylwWcIU1s0Y7k3yNmeAgWOcKrNE2Q7Ww/kCg4= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe h1:W/GaMY0y69G4cFlmsC6B9sbuo2fP8OFP1ABjt4kPz+w= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1 h1:Sq1fR+0c58RME5EoqKdjkiQAmPjmfHlZOoRI6fTUOcs= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53 h1:kcXqo9vE6fsZY5X5Rd7R1l7fTgnWaDCVmln65REefiE= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/runtime/headers.go b/vendor/github.com/go-openapi/runtime/headers.go new file mode 100644 index 00000000000..4d111db4fec --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/headers.go @@ -0,0 +1,45 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "mime" + "net/http" + + "github.com/go-openapi/errors" +) + +// ContentType parses a content type header +func ContentType(headers http.Header) (string, string, error) { + ct := headers.Get(HeaderContentType) + orig := ct + if ct == "" { + ct = DefaultMime + } + if ct == "" { + return "", "", nil + } + + mt, opts, err := mime.ParseMediaType(ct) + if err != nil { + return "", "", errors.NewParseError(HeaderContentType, "header", orig, err) + } + + if cs, ok := opts[charsetKey]; ok { + return mt, cs, nil + } + + return mt, "", nil +} diff --git a/vendor/github.com/go-openapi/runtime/interfaces.go b/vendor/github.com/go-openapi/runtime/interfaces.go new file mode 100644 index 00000000000..65de0aa44b9 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/interfaces.go @@ -0,0 +1,103 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "io" + "net/http" + + "github.com/go-openapi/strfmt" +) + +// OperationHandlerFunc an adapter for a function to the OperationHandler interface +type OperationHandlerFunc func(interface{}) (interface{}, error) + +// Handle implements the operation handler interface +func (s OperationHandlerFunc) Handle(data interface{}) (interface{}, error) { + return s(data) +} + +// OperationHandler a handler for a swagger operation +type OperationHandler interface { + Handle(interface{}) (interface{}, error) +} + +// ConsumerFunc represents a function that can be used as a consumer +type ConsumerFunc func(io.Reader, interface{}) error + +// Consume consumes the reader into the data parameter +func (fn ConsumerFunc) Consume(reader io.Reader, data interface{}) error { + return fn(reader, data) +} + +// Consumer implementations know how to bind the values on the provided interface to +// data provided by the request body +type Consumer interface { + // Consume performs the binding of request values + Consume(io.Reader, interface{}) error +} + +// ProducerFunc represents a function that can be used as a producer +type ProducerFunc func(io.Writer, interface{}) error + +// Produce produces the response for the provided data +func (f ProducerFunc) Produce(writer io.Writer, data interface{}) error { + return f(writer, data) +} + +// Producer implementations know how to turn the provided interface into a valid +// HTTP response +type Producer interface { + // Produce writes to the http response + Produce(io.Writer, interface{}) error +} + +// AuthenticatorFunc turns a function into an authenticator +type AuthenticatorFunc func(interface{}) (bool, interface{}, error) + +// Authenticate authenticates the request with the provided data +func (f AuthenticatorFunc) Authenticate(params interface{}) (bool, interface{}, error) { + return f(params) +} + +// Authenticator represents an authentication strategy +// implementations of Authenticator know how to authenticate the +// request data and translate that into a valid principal object or an error +type Authenticator interface { + Authenticate(interface{}) (bool, interface{}, error) +} + +// AuthorizerFunc turns a function into an authorizer +type AuthorizerFunc func(*http.Request, interface{}) error + +// Authorize authorizes the processing of the request for the principal +func (f AuthorizerFunc) Authorize(r *http.Request, principal interface{}) error { + return f(r, principal) +} + +// Authorizer represents an authorization strategy +// implementations of Authorizer know how to authorize the principal object +// using the request data and returns error if unauthorized +type Authorizer interface { + Authorize(*http.Request, interface{}) error +} + +// Validatable types implementing this interface allow customizing their validation +// this will be used instead of the reflective validation based on the spec document. +// the implementations are assumed to have been generated by the swagger tool so they should +// contain all the validations obtained from the spec +type Validatable interface { + Validate(strfmt.Registry) error +} diff --git a/vendor/github.com/go-openapi/runtime/json.go b/vendor/github.com/go-openapi/runtime/json.go new file mode 100644 index 00000000000..5a690559cc5 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/json.go @@ -0,0 +1,38 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "encoding/json" + "io" +) + +// JSONConsumer creates a new JSON consumer +func JSONConsumer() Consumer { + return ConsumerFunc(func(reader io.Reader, data interface{}) error { + dec := json.NewDecoder(reader) + dec.UseNumber() // preserve number formats + return dec.Decode(data) + }) +} + +// JSONProducer creates a new JSON producer +func JSONProducer() Producer { + return ProducerFunc(func(writer io.Writer, data interface{}) error { + enc := json.NewEncoder(writer) + enc.SetEscapeHTML(false) + return enc.Encode(data) + }) +} diff --git a/vendor/github.com/go-openapi/runtime/logger/logger.go b/vendor/github.com/go-openapi/runtime/logger/logger.go new file mode 100644 index 00000000000..6f4debcc145 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/logger/logger.go @@ -0,0 +1,20 @@ +package logger + +import "os" + +type Logger interface { + Printf(format string, args ...interface{}) + Debugf(format string, args ...interface{}) +} + +func DebugEnabled() bool { + d := os.Getenv("SWAGGER_DEBUG") + if d != "" && d != "false" && d != "0" { + return true + } + d = os.Getenv("DEBUG") + if d != "" && d != "false" && d != "0" { + return true + } + return false +} diff --git a/vendor/github.com/go-openapi/runtime/logger/standard.go b/vendor/github.com/go-openapi/runtime/logger/standard.go new file mode 100644 index 00000000000..f7e67ebb9e7 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/logger/standard.go @@ -0,0 +1,22 @@ +package logger + +import ( + "fmt" + "os" +) + +type StandardLogger struct{} + +func (StandardLogger) Printf(format string, args ...interface{}) { + if len(format) == 0 || format[len(format)-1] != '\n' { + format += "\n" + } + fmt.Fprintf(os.Stderr, format, args...) +} + +func (StandardLogger) Debugf(format string, args ...interface{}) { + if len(format) == 0 || format[len(format)-1] != '\n' { + format += "\n" + } + fmt.Fprintf(os.Stderr, format, args...) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go new file mode 100644 index 00000000000..0ff9e39a888 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/context.go @@ -0,0 +1,592 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + stdContext "context" + "fmt" + "net/http" + "strings" + "sync" + + "github.com/go-openapi/analysis" + "github.com/go-openapi/errors" + "github.com/go-openapi/loads" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/logger" + "github.com/go-openapi/runtime/middleware/untyped" + "github.com/go-openapi/runtime/security" +) + +// Debug when true turns on verbose logging +var Debug = logger.DebugEnabled() +var Logger logger.Logger = logger.StandardLogger{} + +func debugLog(format string, args ...interface{}) { + if Debug { + Logger.Printf(format, args...) + } +} + +// A Builder can create middlewares +type Builder func(http.Handler) http.Handler + +// PassthroughBuilder returns the handler, aka the builder identity function +func PassthroughBuilder(handler http.Handler) http.Handler { return handler } + +// RequestBinder is an interface for types to implement +// when they want to be able to bind from a request +type RequestBinder interface { + BindRequest(*http.Request, *MatchedRoute) error +} + +// Responder is an interface for types to implement +// when they want to be considered for writing HTTP responses +type Responder interface { + WriteResponse(http.ResponseWriter, runtime.Producer) +} + +// ResponderFunc wraps a func as a Responder interface +type ResponderFunc func(http.ResponseWriter, runtime.Producer) + +// WriteResponse writes to the response +func (fn ResponderFunc) WriteResponse(rw http.ResponseWriter, pr runtime.Producer) { + fn(rw, pr) +} + +// Context is a type safe wrapper around an untyped request context +// used throughout to store request context with the standard context attached +// to the http.Request +type Context struct { + spec *loads.Document + analyzer *analysis.Spec + api RoutableAPI + router Router +} + +type routableUntypedAPI struct { + api *untyped.API + hlock *sync.Mutex + handlers map[string]map[string]http.Handler + defaultConsumes string + defaultProduces string +} + +func newRoutableUntypedAPI(spec *loads.Document, api *untyped.API, context *Context) *routableUntypedAPI { + var handlers map[string]map[string]http.Handler + if spec == nil || api == nil { + return nil + } + analyzer := analysis.New(spec.Spec()) + for method, hls := range analyzer.Operations() { + um := strings.ToUpper(method) + for path, op := range hls { + schemes := analyzer.SecurityRequirementsFor(op) + + if oh, ok := api.OperationHandlerFor(method, path); ok { + if handlers == nil { + handlers = make(map[string]map[string]http.Handler) + } + if b, ok := handlers[um]; !ok || b == nil { + handlers[um] = make(map[string]http.Handler) + } + + var handler http.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // lookup route info in the context + route, rCtx, _ := context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + + // bind and validate the request using reflection + var bound interface{} + var validation error + bound, r, validation = context.BindAndValidate(r, route) + if validation != nil { + context.Respond(w, r, route.Produces, route, validation) + return + } + + // actually handle the request + result, err := oh.Handle(bound) + if err != nil { + // respond with failure + context.Respond(w, r, route.Produces, route, err) + return + } + + // respond with success + context.Respond(w, r, route.Produces, route, result) + }) + + if len(schemes) > 0 { + handler = newSecureAPI(context, handler) + } + handlers[um][path] = handler + } + } + } + + return &routableUntypedAPI{ + api: api, + hlock: new(sync.Mutex), + handlers: handlers, + defaultProduces: api.DefaultProduces, + defaultConsumes: api.DefaultConsumes, + } +} + +func (r *routableUntypedAPI) HandlerFor(method, path string) (http.Handler, bool) { + r.hlock.Lock() + paths, ok := r.handlers[strings.ToUpper(method)] + if !ok { + r.hlock.Unlock() + return nil, false + } + handler, ok := paths[path] + r.hlock.Unlock() + return handler, ok +} +func (r *routableUntypedAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) { + return r.api.ServeError +} +func (r *routableUntypedAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { + return r.api.ConsumersFor(mediaTypes) +} +func (r *routableUntypedAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer { + return r.api.ProducersFor(mediaTypes) +} +func (r *routableUntypedAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { + return r.api.AuthenticatorsFor(schemes) +} +func (r *routableUntypedAPI) Authorizer() runtime.Authorizer { + return r.api.Authorizer() +} +func (r *routableUntypedAPI) Formats() strfmt.Registry { + return r.api.Formats() +} + +func (r *routableUntypedAPI) DefaultProduces() string { + return r.defaultProduces +} + +func (r *routableUntypedAPI) DefaultConsumes() string { + return r.defaultConsumes +} + +// NewRoutableContext creates a new context for a routable API +func NewRoutableContext(spec *loads.Document, routableAPI RoutableAPI, routes Router) *Context { + var an *analysis.Spec + if spec != nil { + an = analysis.New(spec.Spec()) + } + ctx := &Context{spec: spec, api: routableAPI, analyzer: an, router: routes} + return ctx +} + +// NewContext creates a new context wrapper +func NewContext(spec *loads.Document, api *untyped.API, routes Router) *Context { + var an *analysis.Spec + if spec != nil { + an = analysis.New(spec.Spec()) + } + ctx := &Context{spec: spec, analyzer: an} + ctx.api = newRoutableUntypedAPI(spec, api, ctx) + ctx.router = routes + return ctx +} + +// Serve serves the specified spec with the specified api registrations as a http.Handler +func Serve(spec *loads.Document, api *untyped.API) http.Handler { + return ServeWithBuilder(spec, api, PassthroughBuilder) +} + +// ServeWithBuilder serves the specified spec with the specified api registrations as a http.Handler that is decorated +// by the Builder +func ServeWithBuilder(spec *loads.Document, api *untyped.API, builder Builder) http.Handler { + context := NewContext(spec, api, nil) + return context.APIHandler(builder) +} + +type contextKey int8 + +const ( + _ contextKey = iota + ctxContentType + ctxResponseFormat + ctxMatchedRoute + ctxBoundParams + ctxSecurityPrincipal + ctxSecurityScopes +) + +// MatchedRouteFrom request context value. +func MatchedRouteFrom(req *http.Request) *MatchedRoute { + mr := req.Context().Value(ctxMatchedRoute) + if mr == nil { + return nil + } + if res, ok := mr.(*MatchedRoute); ok { + return res + } + return nil +} + +// SecurityPrincipalFrom request context value. +func SecurityPrincipalFrom(req *http.Request) interface{} { + return req.Context().Value(ctxSecurityPrincipal) +} + +// SecurityScopesFrom request context value. +func SecurityScopesFrom(req *http.Request) []string { + rs := req.Context().Value(ctxSecurityScopes) + if res, ok := rs.([]string); ok { + return res + } + return nil +} + +type contentTypeValue struct { + MediaType string + Charset string +} + +// BasePath returns the base path for this API +func (c *Context) BasePath() string { + return c.spec.BasePath() +} + +// RequiredProduces returns the accepted content types for responses +func (c *Context) RequiredProduces() []string { + return c.analyzer.RequiredProduces() +} + +// BindValidRequest binds a params object to a request but only when the request is valid +// if the request is not valid an error will be returned +func (c *Context) BindValidRequest(request *http.Request, route *MatchedRoute, binder RequestBinder) error { + var res []error + var requestContentType string + + // check and validate content type, select consumer + if runtime.HasBody(request) { + ct, _, err := runtime.ContentType(request.Header) + if err != nil { + res = append(res, err) + } else { + if err := validateContentType(route.Consumes, ct); err != nil { + res = append(res, err) + } + if len(res) == 0 { + cons, ok := route.Consumers[ct] + if !ok { + res = append(res, errors.New(500, "no consumer registered for %s", ct)) + } else { + route.Consumer = cons + requestContentType = ct + } + } + } + } + + // check and validate the response format + if len(res) == 0 { + if str := NegotiateContentType(request, route.Produces, requestContentType); str == "" { + res = append(res, errors.InvalidResponseFormat(request.Header.Get(runtime.HeaderAccept), route.Produces)) + } + } + + // now bind the request with the provided binder + // it's assumed the binder will also validate the request and return an error if the + // request is invalid + if binder != nil && len(res) == 0 { + if err := binder.BindRequest(request, route); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContentType gets the parsed value of a content type +// Returns the media type, its charset and a shallow copy of the request +// when its context doesn't contain the content type value, otherwise it returns +// the same request +// Returns the error that runtime.ContentType may retunrs. +func (c *Context) ContentType(request *http.Request) (string, string, *http.Request, error) { + var rCtx = request.Context() + + if v, ok := rCtx.Value(ctxContentType).(*contentTypeValue); ok { + return v.MediaType, v.Charset, request, nil + } + + mt, cs, err := runtime.ContentType(request.Header) + if err != nil { + return "", "", nil, err + } + rCtx = stdContext.WithValue(rCtx, ctxContentType, &contentTypeValue{mt, cs}) + return mt, cs, request.WithContext(rCtx), nil +} + +// LookupRoute looks a route up and returns true when it is found +func (c *Context) LookupRoute(request *http.Request) (*MatchedRoute, bool) { + if route, ok := c.router.Lookup(request.Method, request.URL.EscapedPath()); ok { + return route, ok + } + return nil, false +} + +// RouteInfo tries to match a route for this request +// Returns the matched route, a shallow copy of the request if its context +// contains the matched router, otherwise the same request, and a bool to +// indicate if it the request matches one of the routes, if it doesn't +// then it returns false and nil for the other two return values +func (c *Context) RouteInfo(request *http.Request) (*MatchedRoute, *http.Request, bool) { + var rCtx = request.Context() + + if v, ok := rCtx.Value(ctxMatchedRoute).(*MatchedRoute); ok { + return v, request, ok + } + + if route, ok := c.LookupRoute(request); ok { + rCtx = stdContext.WithValue(rCtx, ctxMatchedRoute, route) + return route, request.WithContext(rCtx), ok + } + + return nil, nil, false +} + +// ResponseFormat negotiates the response content type +// Returns the response format and a shallow copy of the request if its context +// doesn't contain the response format, otherwise the same request +func (c *Context) ResponseFormat(r *http.Request, offers []string) (string, *http.Request) { + var rCtx = r.Context() + + if v, ok := rCtx.Value(ctxResponseFormat).(string); ok { + debugLog("[%s %s] found response format %q in context", r.Method, r.URL.Path, v) + return v, r + } + + format := NegotiateContentType(r, offers, "") + if format != "" { + debugLog("[%s %s] set response format %q in context", r.Method, r.URL.Path, format) + r = r.WithContext(stdContext.WithValue(rCtx, ctxResponseFormat, format)) + } + debugLog("[%s %s] negotiated response format %q", r.Method, r.URL.Path, format) + return format, r +} + +// AllowedMethods gets the allowed methods for the path of this request +func (c *Context) AllowedMethods(request *http.Request) []string { + return c.router.OtherMethods(request.Method, request.URL.EscapedPath()) +} + +// ResetAuth removes the current principal from the request context +func (c *Context) ResetAuth(request *http.Request) *http.Request { + rctx := request.Context() + rctx = stdContext.WithValue(rctx, ctxSecurityPrincipal, nil) + rctx = stdContext.WithValue(rctx, ctxSecurityScopes, nil) + return request.WithContext(rctx) +} + +// Authorize authorizes the request +// Returns the principal object and a shallow copy of the request when its +// context doesn't contain the principal, otherwise the same request or an error +// (the last) if one of the authenticators returns one or an Unauthenticated error +func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interface{}, *http.Request, error) { + if route == nil || !route.HasAuth() { + return nil, nil, nil + } + + var rCtx = request.Context() + if v := rCtx.Value(ctxSecurityPrincipal); v != nil { + return v, request, nil + } + + applies, usr, err := route.Authenticators.Authenticate(request, route) + if !applies || err != nil || !route.Authenticators.AllowsAnonymous() && usr == nil { + if err != nil { + return nil, nil, err + } + return nil, nil, errors.Unauthenticated("invalid credentials") + } + if route.Authorizer != nil { + if err := route.Authorizer.Authorize(request, usr); err != nil { + return nil, nil, errors.New(http.StatusForbidden, err.Error()) + } + } + + rCtx = request.Context() + + rCtx = stdContext.WithValue(rCtx, ctxSecurityPrincipal, usr) + rCtx = stdContext.WithValue(rCtx, ctxSecurityScopes, route.Authenticator.AllScopes()) + return usr, request.WithContext(rCtx), nil +} + +// BindAndValidate binds and validates the request +// Returns the validation map and a shallow copy of the request when its context +// doesn't contain the validation, otherwise it returns the same request or an +// CompositeValidationError error +func (c *Context) BindAndValidate(request *http.Request, matched *MatchedRoute) (interface{}, *http.Request, error) { + var rCtx = request.Context() + + if v, ok := rCtx.Value(ctxBoundParams).(*validation); ok { + debugLog("got cached validation (valid: %t)", len(v.result) == 0) + if len(v.result) > 0 { + return v.bound, request, errors.CompositeValidationError(v.result...) + } + return v.bound, request, nil + } + result := validateRequest(c, request, matched) + rCtx = stdContext.WithValue(rCtx, ctxBoundParams, result) + request = request.WithContext(rCtx) + if len(result.result) > 0 { + return result.bound, request, errors.CompositeValidationError(result.result...) + } + debugLog("no validation errors found") + return result.bound, request, nil +} + +// NotFound the default not found responder for when no route has been matched yet +func (c *Context) NotFound(rw http.ResponseWriter, r *http.Request) { + c.Respond(rw, r, []string{c.api.DefaultProduces()}, nil, errors.NotFound("not found")) +} + +// Respond renders the response after doing some content negotiation +func (c *Context) Respond(rw http.ResponseWriter, r *http.Request, produces []string, route *MatchedRoute, data interface{}) { + debugLog("responding to %s %s with produces: %v", r.Method, r.URL.Path, produces) + offers := []string{} + for _, mt := range produces { + if mt != c.api.DefaultProduces() { + offers = append(offers, mt) + } + } + // the default producer is last so more specific producers take precedence + offers = append(offers, c.api.DefaultProduces()) + debugLog("offers: %v", offers) + + var format string + format, r = c.ResponseFormat(r, offers) + rw.Header().Set(runtime.HeaderContentType, format) + + if resp, ok := data.(Responder); ok { + producers := route.Producers + prod, ok := producers[format] + if !ok { + prods := c.api.ProducersFor(normalizeOffers([]string{c.api.DefaultProduces()})) + pr, ok := prods[c.api.DefaultProduces()] + if !ok { + panic(errors.New(http.StatusInternalServerError, "can't find a producer for "+format)) + } + prod = pr + } + resp.WriteResponse(rw, prod) + return + } + + if err, ok := data.(error); ok { + if format == "" { + rw.Header().Set(runtime.HeaderContentType, runtime.JSONMime) + } + + if realm := security.FailedBasicAuth(r); realm != "" { + rw.Header().Set("WWW-Authenticate", fmt.Sprintf("Basic realm=%q", realm)) + } + + if route == nil || route.Operation == nil { + c.api.ServeErrorFor("")(rw, r, err) + return + } + c.api.ServeErrorFor(route.Operation.ID)(rw, r, err) + return + } + + if route == nil || route.Operation == nil { + rw.WriteHeader(200) + if r.Method == "HEAD" { + return + } + producers := c.api.ProducersFor(normalizeOffers(offers)) + prod, ok := producers[format] + if !ok { + panic(errors.New(http.StatusInternalServerError, "can't find a producer for "+format)) + } + if err := prod.Produce(rw, data); err != nil { + panic(err) // let the recovery middleware deal with this + } + return + } + + if _, code, ok := route.Operation.SuccessResponse(); ok { + rw.WriteHeader(code) + if code == 204 || r.Method == "HEAD" { + return + } + + producers := route.Producers + prod, ok := producers[format] + if !ok { + if !ok { + prods := c.api.ProducersFor(normalizeOffers([]string{c.api.DefaultProduces()})) + pr, ok := prods[c.api.DefaultProduces()] + if !ok { + panic(errors.New(http.StatusInternalServerError, "can't find a producer for "+format)) + } + prod = pr + } + } + if err := prod.Produce(rw, data); err != nil { + panic(err) // let the recovery middleware deal with this + } + return + } + + c.api.ServeErrorFor(route.Operation.ID)(rw, r, errors.New(http.StatusInternalServerError, "can't produce response")) +} + +// APIHandler returns a handler to serve the API, this includes a swagger spec, router and the contract defined in the swagger spec +func (c *Context) APIHandler(builder Builder) http.Handler { + b := builder + if b == nil { + b = PassthroughBuilder + } + + var title string + sp := c.spec.Spec() + if sp != nil && sp.Info != nil && sp.Info.Title != "" { + title = sp.Info.Title + } + + redocOpts := RedocOpts{ + BasePath: c.BasePath(), + Title: title, + } + + return Spec("", c.spec.Raw(), Redoc(redocOpts, c.RoutesHandler(b))) +} + +// RoutesHandler returns a handler to serve the API, just the routes and the contract defined in the swagger spec +func (c *Context) RoutesHandler(builder Builder) http.Handler { + b := builder + if b == nil { + b = PassthroughBuilder + } + return NewRouter(c, b(NewOperationExecutor(c))) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE b/vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE new file mode 100644 index 00000000000..e65039ad84c --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Naoya Inada + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/README.md b/vendor/github.com/go-openapi/runtime/middleware/denco/README.md new file mode 100644 index 00000000000..30109e17d5e --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/README.md @@ -0,0 +1,180 @@ +# Denco [![Build Status](https://travis-ci.org/naoina/denco.png?branch=master)](https://travis-ci.org/naoina/denco) + +The fast and flexible HTTP request router for [Go](http://golang.org). + +Denco is based on Double-Array implementation of [Kocha-urlrouter](https://github.com/naoina/kocha-urlrouter). +However, Denco is optimized and some features added. + +## Features + +* Fast (See [go-http-routing-benchmark](https://github.com/naoina/go-http-routing-benchmark)) +* [URL patterns](#url-patterns) (`/foo/:bar` and `/foo/*wildcard`) +* Small (but enough) URL router API +* HTTP request multiplexer like `http.ServeMux` + +## Installation + + go get -u github.com/go-openapi/runtime/middleware/denco + +## Using as HTTP request multiplexer + +```go +package main + +import ( + "fmt" + "log" + "net/http" + + "github.com/go-openapi/runtime/middleware/denco" +) + +func Index(w http.ResponseWriter, r *http.Request, params denco.Params) { + fmt.Fprintf(w, "Welcome to Denco!\n") +} + +func User(w http.ResponseWriter, r *http.Request, params denco.Params) { + fmt.Fprintf(w, "Hello %s!\n", params.Get("name")) +} + +func main() { + mux := denco.NewMux() + handler, err := mux.Build([]denco.Handler{ + mux.GET("/", Index), + mux.GET("/user/:name", User), + mux.POST("/user/:name", User), + }) + if err != nil { + panic(err) + } + log.Fatal(http.ListenAndServe(":8080", handler)) +} +``` + +## Using as URL router + +```go +package main + +import ( + "fmt" + + "github.com/go-openapi/runtime/middleware/denco" +) + +type route struct { + name string +} + +func main() { + router := denco.New() + router.Build([]denco.Record{ + {"/", &route{"root"}}, + {"/user/:id", &route{"user"}}, + {"/user/:name/:id", &route{"username"}}, + {"/static/*filepath", &route{"static"}}, + }) + + data, params, found := router.Lookup("/") + // print `&main.route{name:"root"}, denco.Params(nil), true`. + fmt.Printf("%#v, %#v, %#v\n", data, params, found) + + data, params, found = router.Lookup("/user/hoge") + // print `&main.route{name:"user"}, denco.Params{denco.Param{Name:"id", Value:"hoge"}}, true`. + fmt.Printf("%#v, %#v, %#v\n", data, params, found) + + data, params, found = router.Lookup("/user/hoge/7") + // print `&main.route{name:"username"}, denco.Params{denco.Param{Name:"name", Value:"hoge"}, denco.Param{Name:"id", Value:"7"}}, true`. + fmt.Printf("%#v, %#v, %#v\n", data, params, found) + + data, params, found = router.Lookup("/static/path/to/file") + // print `&main.route{name:"static"}, denco.Params{denco.Param{Name:"filepath", Value:"path/to/file"}}, true`. + fmt.Printf("%#v, %#v, %#v\n", data, params, found) +} +``` + +See [Godoc](http://godoc.org/github.com/go-openapi/runtime/middleware/denco) for more details. + +## Getting the value of path parameter + +You can get the value of path parameter by 2 ways. + +1. Using [`denco.Params.Get`](http://godoc.org/github.com/go-openapi/runtime/middleware/denco#Params.Get) method +2. Find by loop + +```go +package main + +import ( + "fmt" + + "github.com/go-openapi/runtime/middleware/denco" +) + +func main() { + router := denco.New() + if err := router.Build([]denco.Record{ + {"/user/:name/:id", "route1"}, + }); err != nil { + panic(err) + } + + // 1. Using denco.Params.Get method. + _, params, _ := router.Lookup("/user/alice/1") + name := params.Get("name") + if name != "" { + fmt.Printf("Hello %s.\n", name) // prints "Hello alice.". + } + + // 2. Find by loop. + for _, param := range params { + if param.Name == "name" { + fmt.Printf("Hello %s.\n", name) // prints "Hello alice.". + } + } +} +``` + +## URL patterns + +Denco's route matching strategy is "most nearly matching". + +When routes `/:name` and `/alice` have been built, URI `/alice` matches the route `/alice`, not `/:name`. +Because URI `/alice` is more match with the route `/alice` than `/:name`. + +For more example, when routes below have been built: + +``` +/user/alice +/user/:name +/user/:name/:id +/user/alice/:id +/user/:id/bob +``` + +Routes matching are: + +``` +/user/alice => "/user/alice" (no match with "/user/:name") +/user/bob => "/user/:name" +/user/naoina/1 => "/user/:name/1" +/user/alice/1 => "/user/alice/:id" (no match with "/user/:name/:id") +/user/1/bob => "/user/:id/bob" (no match with "/user/:name/:id") +/user/alice/bob => "/user/alice/:id" (no match with "/user/:name/:id" and "/user/:id/bob") +``` + +## Limitation + +Denco has some limitations below. + +* Number of param records (such as `/:name`) must be less than 2^22 +* Number of elements of internal slice must be less than 2^22 + +## Benchmarks + + cd $GOPATH/github.com/go-openapi/runtime/middleware/denco + go test -bench . -benchmem + +## License + +Denco is licensed under the MIT License. diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/router.go b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go new file mode 100644 index 00000000000..ecacc31ff68 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/router.go @@ -0,0 +1,456 @@ +// Package denco provides fast URL router. +package denco + +import ( + "fmt" + "sort" + "strings" +) + +const ( + // ParamCharacter is a special character for path parameter. + ParamCharacter = ':' + + // WildcardCharacter is a special character for wildcard path parameter. + WildcardCharacter = '*' + + // TerminationCharacter is a special character for end of path. + TerminationCharacter = '#' + + // SeparatorCharacter separates path segments. + SeparatorCharacter = '/' + + // MaxSize is max size of records and internal slice. + MaxSize = (1 << 22) - 1 +) + +// Router represents a URL router. +type Router struct { + // SizeHint expects the maximum number of path parameters in records to Build. + // SizeHint will be used to determine the capacity of the memory to allocate. + // By default, SizeHint will be determined from given records to Build. + SizeHint int + + static map[string]interface{} + param *doubleArray +} + +// New returns a new Router. +func New() *Router { + return &Router{ + SizeHint: -1, + static: make(map[string]interface{}), + param: newDoubleArray(), + } +} + +// Lookup returns data and path parameters that associated with path. +// params is a slice of the Param that arranged in the order in which parameters appeared. +// e.g. when built routing path is "/path/to/:id/:name" and given path is "/path/to/1/alice". params order is [{"id": "1"}, {"name": "alice"}], not [{"name": "alice"}, {"id": "1"}]. +func (rt *Router) Lookup(path string) (data interface{}, params Params, found bool) { + if data, found := rt.static[path]; found { + return data, nil, true + } + if len(rt.param.node) == 1 { + return nil, nil, false + } + nd, params, found := rt.param.lookup(path, make([]Param, 0, rt.SizeHint), 1) + if !found { + return nil, nil, false + } + for i := 0; i < len(params); i++ { + params[i].Name = nd.paramNames[i] + } + return nd.data, params, true +} + +// Build builds URL router from records. +func (rt *Router) Build(records []Record) error { + statics, params := makeRecords(records) + if len(params) > MaxSize { + return fmt.Errorf("denco: too many records") + } + if rt.SizeHint < 0 { + rt.SizeHint = 0 + for _, p := range params { + size := 0 + for _, k := range p.Key { + if k == ParamCharacter || k == WildcardCharacter { + size++ + } + } + if size > rt.SizeHint { + rt.SizeHint = size + } + } + } + for _, r := range statics { + rt.static[r.Key] = r.Value + } + if err := rt.param.build(params, 1, 0, make(map[int]struct{})); err != nil { + return err + } + return nil +} + +// Param represents name and value of path parameter. +type Param struct { + Name string + Value string +} + +// Params represents the name and value of path parameters. +type Params []Param + +// Get gets the first value associated with the given name. +// If there are no values associated with the key, Get returns "". +func (ps Params) Get(name string) string { + for _, p := range ps { + if p.Name == name { + return p.Value + } + } + return "" +} + +type doubleArray struct { + bc []baseCheck + node []*node +} + +func newDoubleArray() *doubleArray { + return &doubleArray{ + bc: []baseCheck{0}, + node: []*node{nil}, // A start index is adjusting to 1 because 0 will be used as a mark of non-existent node. + } +} + +// baseCheck contains BASE, CHECK and Extra flags. +// From the top, 22bits of BASE, 2bits of Extra flags and 8bits of CHECK. +// +// BASE (22bit) | Extra flags (2bit) | CHECK (8bit) +// |----------------------|--|--------| +// 32 10 8 0 +type baseCheck uint32 + +func (bc baseCheck) Base() int { + return int(bc >> 10) +} + +func (bc *baseCheck) SetBase(base int) { + *bc |= baseCheck(base) << 10 +} + +func (bc baseCheck) Check() byte { + return byte(bc) +} + +func (bc *baseCheck) SetCheck(check byte) { + *bc |= baseCheck(check) +} + +func (bc baseCheck) IsEmpty() bool { + return bc&0xfffffcff == 0 +} + +func (bc baseCheck) IsSingleParam() bool { + return bc¶mTypeSingle == paramTypeSingle +} + +func (bc baseCheck) IsWildcardParam() bool { + return bc¶mTypeWildcard == paramTypeWildcard +} + +func (bc baseCheck) IsAnyParam() bool { + return bc¶mTypeAny != 0 +} + +func (bc *baseCheck) SetSingleParam() { + *bc |= (1 << 8) +} + +func (bc *baseCheck) SetWildcardParam() { + *bc |= (1 << 9) +} + +const ( + paramTypeSingle = 0x0100 + paramTypeWildcard = 0x0200 + paramTypeAny = 0x0300 +) + +func (da *doubleArray) lookup(path string, params []Param, idx int) (*node, []Param, bool) { + indices := make([]uint64, 0, 1) + for i := 0; i < len(path); i++ { + if da.bc[idx].IsAnyParam() { + indices = append(indices, (uint64(i)<<32)|(uint64(idx)&0xffffffff)) + } + c := path[i] + if idx = nextIndex(da.bc[idx].Base(), c); idx >= len(da.bc) || da.bc[idx].Check() != c { + goto BACKTRACKING + } + } + if next := nextIndex(da.bc[idx].Base(), TerminationCharacter); next < len(da.bc) && da.bc[next].Check() == TerminationCharacter { + return da.node[da.bc[next].Base()], params, true + } +BACKTRACKING: + for j := len(indices) - 1; j >= 0; j-- { + i, idx := int(indices[j]>>32), int(indices[j]&0xffffffff) + if da.bc[idx].IsSingleParam() { + idx := nextIndex(da.bc[idx].Base(), ParamCharacter) + if idx >= len(da.bc) { + break + } + next := NextSeparator(path, i) + params := append(params, Param{Value: path[i:next]}) + if nd, params, found := da.lookup(path[next:], params, idx); found { + return nd, params, true + } + } + if da.bc[idx].IsWildcardParam() { + idx := nextIndex(da.bc[idx].Base(), WildcardCharacter) + params := append(params, Param{Value: path[i:]}) + return da.node[da.bc[idx].Base()], params, true + } + } + return nil, nil, false +} + +// build builds double-array from records. +func (da *doubleArray) build(srcs []*record, idx, depth int, usedBase map[int]struct{}) error { + sort.Stable(recordSlice(srcs)) + base, siblings, leaf, err := da.arrange(srcs, idx, depth, usedBase) + if err != nil { + return err + } + if leaf != nil { + nd, err := makeNode(leaf) + if err != nil { + return err + } + da.bc[idx].SetBase(len(da.node)) + da.node = append(da.node, nd) + } + for _, sib := range siblings { + da.setCheck(nextIndex(base, sib.c), sib.c) + } + for _, sib := range siblings { + records := srcs[sib.start:sib.end] + switch sib.c { + case ParamCharacter: + for _, r := range records { + next := NextSeparator(r.Key, depth+1) + name := r.Key[depth+1 : next] + r.paramNames = append(r.paramNames, name) + r.Key = r.Key[next:] + } + da.bc[idx].SetSingleParam() + if err := da.build(records, nextIndex(base, sib.c), 0, usedBase); err != nil { + return err + } + case WildcardCharacter: + r := records[0] + name := r.Key[depth+1 : len(r.Key)-1] + r.paramNames = append(r.paramNames, name) + r.Key = "" + da.bc[idx].SetWildcardParam() + if err := da.build(records, nextIndex(base, sib.c), 0, usedBase); err != nil { + return err + } + default: + if err := da.build(records, nextIndex(base, sib.c), depth+1, usedBase); err != nil { + return err + } + } + } + return nil +} + +// setBase sets BASE. +func (da *doubleArray) setBase(i, base int) { + da.bc[i].SetBase(base) +} + +// setCheck sets CHECK. +func (da *doubleArray) setCheck(i int, check byte) { + da.bc[i].SetCheck(check) +} + +// findEmptyIndex returns an index of unused BASE/CHECK node. +func (da *doubleArray) findEmptyIndex(start int) int { + i := start + for ; i < len(da.bc); i++ { + if da.bc[i].IsEmpty() { + break + } + } + return i +} + +// findBase returns good BASE. +func (da *doubleArray) findBase(siblings []sibling, start int, usedBase map[int]struct{}) (base int) { + for idx, firstChar := start+1, siblings[0].c; ; idx = da.findEmptyIndex(idx + 1) { + base = nextIndex(idx, firstChar) + if _, used := usedBase[base]; used { + continue + } + i := 0 + for ; i < len(siblings); i++ { + next := nextIndex(base, siblings[i].c) + if len(da.bc) <= next { + da.bc = append(da.bc, make([]baseCheck, next-len(da.bc)+1)...) + } + if !da.bc[next].IsEmpty() { + break + } + } + if i == len(siblings) { + break + } + } + usedBase[base] = struct{}{} + return base +} + +func (da *doubleArray) arrange(records []*record, idx, depth int, usedBase map[int]struct{}) (base int, siblings []sibling, leaf *record, err error) { + siblings, leaf, err = makeSiblings(records, depth) + if err != nil { + return -1, nil, nil, err + } + if len(siblings) < 1 { + return -1, nil, leaf, nil + } + base = da.findBase(siblings, idx, usedBase) + if base > MaxSize { + return -1, nil, nil, fmt.Errorf("denco: too many elements of internal slice") + } + da.setBase(idx, base) + return base, siblings, leaf, err +} + +// node represents a node of Double-Array. +type node struct { + data interface{} + + // Names of path parameters. + paramNames []string +} + +// makeNode returns a new node from record. +func makeNode(r *record) (*node, error) { + dups := make(map[string]bool) + for _, name := range r.paramNames { + if dups[name] { + return nil, fmt.Errorf("denco: path parameter `%v' is duplicated in the key `%v'", name, r.Key) + } + dups[name] = true + } + return &node{data: r.Value, paramNames: r.paramNames}, nil +} + +// sibling represents an intermediate data of build for Double-Array. +type sibling struct { + // An index of start of duplicated characters. + start int + + // An index of end of duplicated characters. + end int + + // A character of sibling. + c byte +} + +// nextIndex returns a next index of array of BASE/CHECK. +func nextIndex(base int, c byte) int { + return base ^ int(c) +} + +// makeSiblings returns slice of sibling. +func makeSiblings(records []*record, depth int) (sib []sibling, leaf *record, err error) { + var ( + pc byte + n int + ) + for i, r := range records { + if len(r.Key) <= depth { + leaf = r + continue + } + c := r.Key[depth] + switch { + case pc < c: + sib = append(sib, sibling{start: i, c: c}) + case pc == c: + continue + default: + return nil, nil, fmt.Errorf("denco: BUG: routing table hasn't been sorted") + } + if n > 0 { + sib[n-1].end = i + } + pc = c + n++ + } + if n == 0 { + return nil, leaf, nil + } + sib[n-1].end = len(records) + return sib, leaf, nil +} + +// Record represents a record data for router construction. +type Record struct { + // Key for router construction. + Key string + + // Result value for Key. + Value interface{} +} + +// NewRecord returns a new Record. +func NewRecord(key string, value interface{}) Record { + return Record{ + Key: key, + Value: value, + } +} + +// record represents a record that use to build the Double-Array. +type record struct { + Record + paramNames []string +} + +// makeRecords returns the records that use to build Double-Arrays. +func makeRecords(srcs []Record) (statics, params []*record) { + termChar := string(TerminationCharacter) + paramPrefix := string(SeparatorCharacter) + string(ParamCharacter) + wildcardPrefix := string(SeparatorCharacter) + string(WildcardCharacter) + for _, r := range srcs { + if strings.Contains(r.Key, paramPrefix) || strings.Contains(r.Key, wildcardPrefix) { + r.Key += termChar + params = append(params, &record{Record: r}) + } else { + statics = append(statics, &record{Record: r}) + } + } + return statics, params +} + +// recordSlice represents a slice of Record for sort and implements the sort.Interface. +type recordSlice []*record + +// Len implements the sort.Interface.Len. +func (rs recordSlice) Len() int { + return len(rs) +} + +// Less implements the sort.Interface.Less. +func (rs recordSlice) Less(i, j int) bool { + return rs[i].Key < rs[j].Key +} + +// Swap implements the sort.Interface.Swap. +func (rs recordSlice) Swap(i, j int) { + rs[i], rs[j] = rs[j], rs[i] +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/server.go b/vendor/github.com/go-openapi/runtime/middleware/denco/server.go new file mode 100644 index 00000000000..0886713c181 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/server.go @@ -0,0 +1,106 @@ +package denco + +import ( + "net/http" +) + +// Mux represents a multiplexer for HTTP request. +type Mux struct{} + +// NewMux returns a new Mux. +func NewMux() *Mux { + return &Mux{} +} + +// GET is shorthand of Mux.Handler("GET", path, handler). +func (m *Mux) GET(path string, handler HandlerFunc) Handler { + return m.Handler("GET", path, handler) +} + +// POST is shorthand of Mux.Handler("POST", path, handler). +func (m *Mux) POST(path string, handler HandlerFunc) Handler { + return m.Handler("POST", path, handler) +} + +// PUT is shorthand of Mux.Handler("PUT", path, handler). +func (m *Mux) PUT(path string, handler HandlerFunc) Handler { + return m.Handler("PUT", path, handler) +} + +// HEAD is shorthand of Mux.Handler("HEAD", path, handler). +func (m *Mux) HEAD(path string, handler HandlerFunc) Handler { + return m.Handler("HEAD", path, handler) +} + +// Handler returns a handler for HTTP method. +func (m *Mux) Handler(method, path string, handler HandlerFunc) Handler { + return Handler{ + Method: method, + Path: path, + Func: handler, + } +} + +// Build builds a http.Handler. +func (m *Mux) Build(handlers []Handler) (http.Handler, error) { + recordMap := make(map[string][]Record) + for _, h := range handlers { + recordMap[h.Method] = append(recordMap[h.Method], NewRecord(h.Path, h.Func)) + } + mux := newServeMux() + for m, records := range recordMap { + router := New() + if err := router.Build(records); err != nil { + return nil, err + } + mux.routers[m] = router + } + return mux, nil +} + +// Handler represents a handler of HTTP request. +type Handler struct { + // Method is an HTTP method. + Method string + + // Path is a routing path for handler. + Path string + + // Func is a function of handler of HTTP request. + Func HandlerFunc +} + +// The HandlerFunc type is aliased to type of handler function. +type HandlerFunc func(w http.ResponseWriter, r *http.Request, params Params) + +type serveMux struct { + routers map[string]*Router +} + +func newServeMux() *serveMux { + return &serveMux{ + routers: make(map[string]*Router), + } +} + +// ServeHTTP implements http.Handler interface. +func (mux *serveMux) ServeHTTP(w http.ResponseWriter, r *http.Request) { + handler, params := mux.handler(r.Method, r.URL.Path) + handler(w, r, params) +} + +func (mux *serveMux) handler(method, path string) (HandlerFunc, []Param) { + if router, found := mux.routers[method]; found { + if handler, params, found := router.Lookup(path); found { + return handler.(HandlerFunc), params + } + } + return NotFound, nil +} + +// NotFound replies to the request with an HTTP 404 not found error. +// NotFound is called when unknown HTTP method or a handler not found. +// If you want to use the your own NotFound handler, please overwrite this variable. +var NotFound = func(w http.ResponseWriter, r *http.Request, _ Params) { + http.NotFound(w, r) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/denco/util.go b/vendor/github.com/go-openapi/runtime/middleware/denco/util.go new file mode 100644 index 00000000000..edc1f6ab80a --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/denco/util.go @@ -0,0 +1,12 @@ +package denco + +// NextSeparator returns an index of next separator in path. +func NextSeparator(path string, start int) int { + for start < len(path) { + if c := path[start]; c == '/' || c == TerminationCharacter { + break + } + start++ + } + return start +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/doc.go b/vendor/github.com/go-openapi/runtime/middleware/doc.go new file mode 100644 index 00000000000..eaf90606ac3 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/doc.go @@ -0,0 +1,62 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*Package middleware provides the library with helper functions for serving swagger APIs. + +Pseudo middleware handler + + import ( + "net/http" + + "github.com/go-openapi/errors" + ) + + func newCompleteMiddleware(ctx *Context) http.Handler { + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + // use context to lookup routes + if matched, ok := ctx.RouteInfo(r); ok { + + if matched.NeedsAuth() { + if _, err := ctx.Authorize(r, matched); err != nil { + ctx.Respond(rw, r, matched.Produces, matched, err) + return + } + } + + bound, validation := ctx.BindAndValidate(r, matched) + if validation != nil { + ctx.Respond(rw, r, matched.Produces, matched, validation) + return + } + + result, err := matched.Handler.Handle(bound) + if err != nil { + ctx.Respond(rw, r, matched.Produces, matched, err) + return + } + + ctx.Respond(rw, r, matched.Produces, matched, result) + return + } + + // Not found, check if it exists in the other methods first + if others := ctx.AllowedMethods(r); len(others) > 0 { + ctx.Respond(rw, r, ctx.spec.RequiredProduces(), nil, errors.MethodNotAllowed(r.Method, others)) + return + } + ctx.Respond(rw, r, ctx.spec.RequiredProduces(), nil, errors.NotFound("path %s was not found", r.URL.Path)) + }) + } +*/ +package middleware diff --git a/vendor/github.com/go-openapi/runtime/middleware/go18.go b/vendor/github.com/go-openapi/runtime/middleware/go18.go new file mode 100644 index 00000000000..75c762c0948 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/go18.go @@ -0,0 +1,9 @@ +// +build go1.8 + +package middleware + +import "net/url" + +func pathUnescape(path string) (string, error) { + return url.PathUnescape(path) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/header/header.go b/vendor/github.com/go-openapi/runtime/middleware/header/header.go new file mode 100644 index 00000000000..3e342258bca --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/header/header.go @@ -0,0 +1,326 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd. + +// this file was taken from the github.com/golang/gddo repository + +// Package header provides functions for parsing HTTP headers. +package header + +import ( + "net/http" + "strings" + "time" +) + +// Octet types from RFC 2616. +var octetTypes [256]octetType + +type octetType byte + +const ( + isToken octetType = 1 << iota + isSpace +) + +func init() { + // OCTET = + // CHAR = + // CTL = + // CR = + // LF = + // SP = + // HT = + // <"> = + // CRLF = CR LF + // LWS = [CRLF] 1*( SP | HT ) + // TEXT = + // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> + // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT + // token = 1* + // qdtext = > + + for c := 0; c < 256; c++ { + var t octetType + isCtl := c <= 31 || c == 127 + isChar := 0 <= c && c <= 127 + isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) + if strings.ContainsRune(" \t\r\n", rune(c)) { + t |= isSpace + } + if isChar && !isCtl && !isSeparator { + t |= isToken + } + octetTypes[c] = t + } +} + +// Copy returns a shallow copy of the header. +func Copy(header http.Header) http.Header { + h := make(http.Header) + for k, vs := range header { + h[k] = vs + } + return h +} + +var timeLayouts = []string{"Mon, 02 Jan 2006 15:04:05 GMT", time.RFC850, time.ANSIC} + +// ParseTime parses the header as time. The zero value is returned if the +// header is not present or there is an error parsing the +// header. +func ParseTime(header http.Header, key string) time.Time { + if s := header.Get(key); s != "" { + for _, layout := range timeLayouts { + if t, err := time.Parse(layout, s); err == nil { + return t.UTC() + } + } + } + return time.Time{} +} + +// ParseList parses a comma separated list of values. Commas are ignored in +// quoted strings. Quoted values are not unescaped or unquoted. Whitespace is +// trimmed. +func ParseList(header http.Header, key string) []string { + var result []string + for _, s := range header[http.CanonicalHeaderKey(key)] { + begin := 0 + end := 0 + escape := false + quote := false + for i := 0; i < len(s); i++ { + b := s[i] + switch { + case escape: + escape = false + end = i + 1 + case quote: + switch b { + case '\\': + escape = true + case '"': + quote = false + } + end = i + 1 + case b == '"': + quote = true + end = i + 1 + case octetTypes[b]&isSpace != 0: + if begin == end { + begin = i + 1 + end = begin + } + case b == ',': + if begin < end { + result = append(result, s[begin:end]) + } + begin = i + 1 + end = begin + default: + end = i + 1 + } + } + if begin < end { + result = append(result, s[begin:end]) + } + } + return result +} + +// ParseValueAndParams parses a comma separated list of values with optional +// semicolon separated name-value pairs. Content-Type and Content-Disposition +// headers are in this format. +func ParseValueAndParams(header http.Header, key string) (string, map[string]string) { + return parseValueAndParams(header.Get(key)) +} + +func parseValueAndParams(s string) (value string, params map[string]string) { + params = make(map[string]string) + value, s = expectTokenSlash(s) + if value == "" { + return + } + value = strings.ToLower(value) + s = skipSpace(s) + for strings.HasPrefix(s, ";") { + var pkey string + pkey, s = expectToken(skipSpace(s[1:])) + if pkey == "" { + return + } + if !strings.HasPrefix(s, "=") { + return + } + var pvalue string + pvalue, s = expectTokenOrQuoted(s[1:]) + if pvalue == "" { + return + } + pkey = strings.ToLower(pkey) + params[pkey] = pvalue + s = skipSpace(s) + } + return +} + +// AcceptSpec ... +type AcceptSpec struct { + Value string + Q float64 +} + +// ParseAccept2 ... +func ParseAccept2(header http.Header, key string) (specs []AcceptSpec) { + for _, en := range ParseList(header, key) { + v, p := parseValueAndParams(en) + var spec AcceptSpec + spec.Value = v + spec.Q = 1.0 + if p != nil { + if q, ok := p["q"]; ok { + spec.Q, _ = expectQuality(q) + } + } + if spec.Q < 0.0 { + continue + } + specs = append(specs, spec) + } + + return +} + +// ParseAccept parses Accept* headers. +func ParseAccept(header http.Header, key string) (specs []AcceptSpec) { +loop: + for _, s := range header[key] { + for { + var spec AcceptSpec + spec.Value, s = expectTokenSlash(s) + if spec.Value == "" { + continue loop + } + spec.Q = 1.0 + s = skipSpace(s) + if strings.HasPrefix(s, ";") { + s = skipSpace(s[1:]) + for !strings.HasPrefix(s, "q=") && s != "" && !strings.HasPrefix(s, ",") { + s = skipSpace(s[1:]) + } + if strings.HasPrefix(s, "q=") { + spec.Q, s = expectQuality(s[2:]) + if spec.Q < 0.0 { + continue loop + } + } + } + specs = append(specs, spec) + s = skipSpace(s) + if !strings.HasPrefix(s, ",") { + continue loop + } + s = skipSpace(s[1:]) + } + } + return +} + +func skipSpace(s string) (rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isSpace == 0 { + break + } + } + return s[i:] +} + +func expectToken(s string) (token, rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isToken == 0 { + break + } + } + return s[:i], s[i:] +} + +func expectTokenSlash(s string) (token, rest string) { + i := 0 + for ; i < len(s); i++ { + b := s[i] + if (octetTypes[b]&isToken == 0) && b != '/' { + break + } + } + return s[:i], s[i:] +} + +func expectQuality(s string) (q float64, rest string) { + switch { + case len(s) == 0: + return -1, "" + case s[0] == '0': + q = 0 + case s[0] == '1': + q = 1 + default: + return -1, "" + } + s = s[1:] + if !strings.HasPrefix(s, ".") { + return q, s + } + s = s[1:] + i := 0 + n := 0 + d := 1 + for ; i < len(s); i++ { + b := s[i] + if b < '0' || b > '9' { + break + } + n = n*10 + int(b) - '0' + d *= 10 + } + return q + float64(n)/float64(d), s[i:] +} + +func expectTokenOrQuoted(s string) (value string, rest string) { + if !strings.HasPrefix(s, "\"") { + return expectToken(s) + } + s = s[1:] + for i := 0; i < len(s); i++ { + switch s[i] { + case '"': + return s[:i], s[i+1:] + case '\\': + p := make([]byte, len(s)-1) + j := copy(p, s[:i]) + escape := true + for i = i + 1; i < len(s); i++ { + b := s[i] + switch { + case escape: + escape = false + p[j] = b + j++ + case b == '\\': + escape = true + case b == '"': + return string(p[:j]), s[i+1:] + default: + p[j] = b + j++ + } + } + return "", "" + } + } + return "", "" +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/negotiate.go b/vendor/github.com/go-openapi/runtime/middleware/negotiate.go new file mode 100644 index 00000000000..a9b6f27d3d3 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/negotiate.go @@ -0,0 +1,98 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd. + +// this file was taken from the github.com/golang/gddo repository + +package middleware + +import ( + "net/http" + "strings" + + "github.com/go-openapi/runtime/middleware/header" +) + +// NegotiateContentEncoding returns the best offered content encoding for the +// request's Accept-Encoding header. If two offers match with equal weight and +// then the offer earlier in the list is preferred. If no offers are +// acceptable, then "" is returned. +func NegotiateContentEncoding(r *http.Request, offers []string) string { + bestOffer := "identity" + bestQ := -1.0 + specs := header.ParseAccept(r.Header, "Accept-Encoding") + for _, offer := range offers { + for _, spec := range specs { + if spec.Q > bestQ && + (spec.Value == "*" || spec.Value == offer) { + bestQ = spec.Q + bestOffer = offer + } + } + } + if bestQ == 0 { + bestOffer = "" + } + return bestOffer +} + +// NegotiateContentType returns the best offered content type for the request's +// Accept header. If two offers match with equal weight, then the more specific +// offer is preferred. For example, text/* trumps */*. If two offers match +// with equal weight and specificity, then the offer earlier in the list is +// preferred. If no offers match, then defaultOffer is returned. +func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string { + bestOffer := defaultOffer + bestQ := -1.0 + bestWild := 3 + specs := header.ParseAccept(r.Header, "Accept") + for _, rawOffer := range offers { + offer := normalizeOffer(rawOffer) + // No Accept header: just return the first offer. + if len(specs) == 0 { + return rawOffer + } + for _, spec := range specs { + switch { + case spec.Q == 0.0: + // ignore + case spec.Q < bestQ: + // better match found + case spec.Value == "*/*": + if spec.Q > bestQ || bestWild > 2 { + bestQ = spec.Q + bestWild = 2 + bestOffer = rawOffer + } + case strings.HasSuffix(spec.Value, "/*"): + if strings.HasPrefix(offer, spec.Value[:len(spec.Value)-1]) && + (spec.Q > bestQ || bestWild > 1) { + bestQ = spec.Q + bestWild = 1 + bestOffer = rawOffer + } + default: + if spec.Value == offer && + (spec.Q > bestQ || bestWild > 0) { + bestQ = spec.Q + bestWild = 0 + bestOffer = rawOffer + } + } + } + } + return bestOffer +} + +func normalizeOffers(orig []string) (norm []string) { + for _, o := range orig { + norm = append(norm, normalizeOffer(o)) + } + return +} + +func normalizeOffer(orig string) string { + return strings.SplitN(orig, ";", 2)[0] +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go b/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go new file mode 100644 index 00000000000..466f553db48 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/not_implemented.go @@ -0,0 +1,48 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +type errorResp struct { + code int + response interface{} + headers http.Header +} + +func (e *errorResp) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + for k, v := range e.headers { + for _, val := range v { + rw.Header().Add(k, val) + } + } + if e.code > 0 { + rw.WriteHeader(e.code) + } else { + rw.WriteHeader(http.StatusInternalServerError) + } + if err := producer.Produce(rw, e.response); err != nil { + panic(err) + } +} + +// NotImplemented the error response when the response is not implemented +func NotImplemented(message string) Responder { + return &errorResp{http.StatusNotImplemented, message, make(http.Header)} +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/operation.go b/vendor/github.com/go-openapi/runtime/middleware/operation.go new file mode 100644 index 00000000000..1175a63cf29 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/operation.go @@ -0,0 +1,30 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import "net/http" + +// NewOperationExecutor creates a context aware middleware that handles the operations after routing +func NewOperationExecutor(ctx *Context) http.Handler { + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + // use context to lookup routes + route, rCtx, _ := ctx.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + + route.Handler.ServeHTTP(rw, r) + }) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter.go b/vendor/github.com/go-openapi/runtime/middleware/parameter.go new file mode 100644 index 00000000000..2088605f98f --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/parameter.go @@ -0,0 +1,481 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "encoding" + "encoding/base64" + "fmt" + "io" + "net/http" + "reflect" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + "github.com/go-openapi/runtime" +) + +const defaultMaxMemory = 32 << 20 + +var textUnmarshalType = reflect.TypeOf(new(encoding.TextUnmarshaler)).Elem() + +func newUntypedParamBinder(param spec.Parameter, spec *spec.Swagger, formats strfmt.Registry) *untypedParamBinder { + binder := new(untypedParamBinder) + binder.Name = param.Name + binder.parameter = ¶m + binder.formats = formats + if param.In != "body" { + binder.validator = validate.NewParamValidator(¶m, formats) + } else { + binder.validator = validate.NewSchemaValidator(param.Schema, spec, param.Name, formats) + } + + return binder +} + +type untypedParamBinder struct { + parameter *spec.Parameter + formats strfmt.Registry + Name string + validator validate.EntityValidator +} + +func (p *untypedParamBinder) Type() reflect.Type { + return p.typeForSchema(p.parameter.Type, p.parameter.Format, p.parameter.Items) +} + +func (p *untypedParamBinder) typeForSchema(tpe, format string, items *spec.Items) reflect.Type { + switch tpe { + case "boolean": + return reflect.TypeOf(true) + + case "string": + if tt, ok := p.formats.GetType(format); ok { + return tt + } + return reflect.TypeOf("") + + case "integer": + switch format { + case "int8": + return reflect.TypeOf(int8(0)) + case "int16": + return reflect.TypeOf(int16(0)) + case "int32": + return reflect.TypeOf(int32(0)) + case "int64": + return reflect.TypeOf(int64(0)) + default: + return reflect.TypeOf(int64(0)) + } + + case "number": + switch format { + case "float": + return reflect.TypeOf(float32(0)) + case "double": + return reflect.TypeOf(float64(0)) + } + + case "array": + if items == nil { + return nil + } + itemsType := p.typeForSchema(items.Type, items.Format, items.Items) + if itemsType == nil { + return nil + } + return reflect.MakeSlice(reflect.SliceOf(itemsType), 0, 0).Type() + + case "file": + return reflect.TypeOf(&runtime.File{}).Elem() + + case "object": + return reflect.TypeOf(map[string]interface{}{}) + } + return nil +} + +func (p *untypedParamBinder) allowsMulti() bool { + return p.parameter.In == "query" || p.parameter.In == "formData" +} + +func (p *untypedParamBinder) readValue(values runtime.Gettable, target reflect.Value) ([]string, bool, bool, error) { + name, in, cf, tpe := p.parameter.Name, p.parameter.In, p.parameter.CollectionFormat, p.parameter.Type + if tpe == "array" { + if cf == "multi" { + if !p.allowsMulti() { + return nil, false, false, errors.InvalidCollectionFormat(name, in, cf) + } + vv, hasKey, _ := values.GetOK(name) + return vv, false, hasKey, nil + } + + v, hk, hv := values.GetOK(name) + if !hv { + return nil, false, hk, nil + } + d, c, e := p.readFormattedSliceFieldValue(v[len(v)-1], target) + return d, c, hk, e + } + + vv, hk, _ := values.GetOK(name) + return vv, false, hk, nil +} + +func (p *untypedParamBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, target reflect.Value) error { + // fmt.Println("binding", p.name, "as", p.Type()) + switch p.parameter.In { + case "query": + data, custom, hasKey, err := p.readValue(runtime.Values(request.URL.Query()), target) + if err != nil { + return err + } + if custom { + return nil + } + + return p.bindValue(data, hasKey, target) + + case "header": + data, custom, hasKey, err := p.readValue(runtime.Values(request.Header), target) + if err != nil { + return err + } + if custom { + return nil + } + return p.bindValue(data, hasKey, target) + + case "path": + data, custom, hasKey, err := p.readValue(routeParams, target) + if err != nil { + return err + } + if custom { + return nil + } + return p.bindValue(data, hasKey, target) + + case "formData": + var err error + var mt string + + mt, _, e := runtime.ContentType(request.Header) + if e != nil { + // because of the interface conversion go thinks the error is not nil + // so we first check for nil and then set the err var if it's not nil + err = e + } + + if err != nil { + return errors.InvalidContentType("", []string{"multipart/form-data", "application/x-www-form-urlencoded"}) + } + + if mt != "multipart/form-data" && mt != "application/x-www-form-urlencoded" { + return errors.InvalidContentType(mt, []string{"multipart/form-data", "application/x-www-form-urlencoded"}) + } + + if mt == "multipart/form-data" { + if err = request.ParseMultipartForm(defaultMaxMemory); err != nil { + return errors.NewParseError(p.Name, p.parameter.In, "", err) + } + } + + if err = request.ParseForm(); err != nil { + return errors.NewParseError(p.Name, p.parameter.In, "", err) + } + + if p.parameter.Type == "file" { + file, header, ffErr := request.FormFile(p.parameter.Name) + if ffErr != nil { + return errors.NewParseError(p.Name, p.parameter.In, "", ffErr) + } + target.Set(reflect.ValueOf(runtime.File{Data: file, Header: header})) + return nil + } + + if request.MultipartForm != nil { + data, custom, hasKey, rvErr := p.readValue(runtime.Values(request.MultipartForm.Value), target) + if rvErr != nil { + return rvErr + } + if custom { + return nil + } + return p.bindValue(data, hasKey, target) + } + data, custom, hasKey, err := p.readValue(runtime.Values(request.PostForm), target) + if err != nil { + return err + } + if custom { + return nil + } + return p.bindValue(data, hasKey, target) + + case "body": + newValue := reflect.New(target.Type()) + if !runtime.HasBody(request) { + if p.parameter.Default != nil { + target.Set(reflect.ValueOf(p.parameter.Default)) + } + + return nil + } + if err := consumer.Consume(request.Body, newValue.Interface()); err != nil { + if err == io.EOF && p.parameter.Default != nil { + target.Set(reflect.ValueOf(p.parameter.Default)) + return nil + } + tpe := p.parameter.Type + if p.parameter.Format != "" { + tpe = p.parameter.Format + } + return errors.InvalidType(p.Name, p.parameter.In, tpe, nil) + } + target.Set(reflect.Indirect(newValue)) + return nil + default: + return errors.New(500, fmt.Sprintf("invalid parameter location %q", p.parameter.In)) + } +} + +func (p *untypedParamBinder) bindValue(data []string, hasKey bool, target reflect.Value) error { + if p.parameter.Type == "array" { + return p.setSliceFieldValue(target, p.parameter.Default, data, hasKey) + } + var d string + if len(data) > 0 { + d = data[len(data)-1] + } + return p.setFieldValue(target, p.parameter.Default, d, hasKey) +} + +func (p *untypedParamBinder) setFieldValue(target reflect.Value, defaultValue interface{}, data string, hasKey bool) error { + tpe := p.parameter.Type + if p.parameter.Format != "" { + tpe = p.parameter.Format + } + + if (!hasKey || (!p.parameter.AllowEmptyValue && data == "")) && p.parameter.Required && p.parameter.Default == nil { + return errors.Required(p.Name, p.parameter.In) + } + + ok, err := p.tryUnmarshaler(target, defaultValue, data) + if err != nil { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if ok { + return nil + } + + defVal := reflect.Zero(target.Type()) + if defaultValue != nil { + defVal = reflect.ValueOf(defaultValue) + } + + if tpe == "byte" { + if data == "" { + if target.CanSet() { + target.SetBytes(defVal.Bytes()) + } + return nil + } + + b, err := base64.StdEncoding.DecodeString(data) + if err != nil { + b, err = base64.URLEncoding.DecodeString(data) + if err != nil { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + } + if target.CanSet() { + target.SetBytes(b) + } + return nil + } + + switch target.Kind() { + case reflect.Bool: + if data == "" { + if target.CanSet() { + target.SetBool(defVal.Bool()) + } + return nil + } + b, err := swag.ConvertBool(data) + if err != nil { + return err + } + if target.CanSet() { + target.SetBool(b) + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if data == "" { + if target.CanSet() { + rd := defVal.Convert(reflect.TypeOf(int64(0))) + target.SetInt(rd.Int()) + } + return nil + } + i, err := strconv.ParseInt(data, 10, 64) + if err != nil { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.OverflowInt(i) { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.CanSet() { + target.SetInt(i) + } + + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + if data == "" { + if target.CanSet() { + rd := defVal.Convert(reflect.TypeOf(uint64(0))) + target.SetUint(rd.Uint()) + } + return nil + } + u, err := strconv.ParseUint(data, 10, 64) + if err != nil { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.OverflowUint(u) { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.CanSet() { + target.SetUint(u) + } + + case reflect.Float32, reflect.Float64: + if data == "" { + if target.CanSet() { + rd := defVal.Convert(reflect.TypeOf(float64(0))) + target.SetFloat(rd.Float()) + } + return nil + } + f, err := strconv.ParseFloat(data, 64) + if err != nil { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.OverflowFloat(f) { + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + if target.CanSet() { + target.SetFloat(f) + } + + case reflect.String: + value := data + if value == "" { + value = defVal.String() + } + // validate string + if target.CanSet() { + target.SetString(value) + } + + case reflect.Ptr: + if data == "" && defVal.Kind() == reflect.Ptr { + if target.CanSet() { + target.Set(defVal) + } + return nil + } + newVal := reflect.New(target.Type().Elem()) + if err := p.setFieldValue(reflect.Indirect(newVal), defVal, data, hasKey); err != nil { + return err + } + if target.CanSet() { + target.Set(newVal) + } + + default: + return errors.InvalidType(p.Name, p.parameter.In, tpe, data) + } + return nil +} + +func (p *untypedParamBinder) tryUnmarshaler(target reflect.Value, defaultValue interface{}, data string) (bool, error) { + if !target.CanSet() { + return false, nil + } + // When a type implements encoding.TextUnmarshaler we'll use that instead of reflecting some more + if reflect.PtrTo(target.Type()).Implements(textUnmarshalType) { + if defaultValue != nil && len(data) == 0 { + target.Set(reflect.ValueOf(defaultValue)) + return true, nil + } + value := reflect.New(target.Type()) + if err := value.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(data)); err != nil { + return true, err + } + target.Set(reflect.Indirect(value)) + return true, nil + } + return false, nil +} + +func (p *untypedParamBinder) readFormattedSliceFieldValue(data string, target reflect.Value) ([]string, bool, error) { + ok, err := p.tryUnmarshaler(target, p.parameter.Default, data) + if err != nil { + return nil, true, err + } + if ok { + return nil, true, nil + } + + return swag.SplitByFormat(data, p.parameter.CollectionFormat), false, nil +} + +func (p *untypedParamBinder) setSliceFieldValue(target reflect.Value, defaultValue interface{}, data []string, hasKey bool) error { + sz := len(data) + if (!hasKey || (!p.parameter.AllowEmptyValue && (sz == 0 || (sz == 1 && data[0] == "")))) && p.parameter.Required && defaultValue == nil { + return errors.Required(p.Name, p.parameter.In) + } + + defVal := reflect.Zero(target.Type()) + if defaultValue != nil { + defVal = reflect.ValueOf(defaultValue) + } + + if !target.CanSet() { + return nil + } + if sz == 0 { + target.Set(defVal) + return nil + } + + value := reflect.MakeSlice(reflect.SliceOf(target.Type().Elem()), sz, sz) + + for i := 0; i < sz; i++ { + if err := p.setFieldValue(value.Index(i), nil, data[i], hasKey); err != nil { + return err + } + } + + target.Set(value) + + return nil +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/pre_go18.go b/vendor/github.com/go-openapi/runtime/middleware/pre_go18.go new file mode 100644 index 00000000000..03385251e19 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/pre_go18.go @@ -0,0 +1,9 @@ +// +build !go1.8 + +package middleware + +import "net/url" + +func pathUnescape(path string) (string, error) { + return url.QueryUnescape(path) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/redoc.go b/vendor/github.com/go-openapi/runtime/middleware/redoc.go new file mode 100644 index 00000000000..019c854295b --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/redoc.go @@ -0,0 +1,103 @@ +package middleware + +import ( + "bytes" + "fmt" + "html/template" + "net/http" + "path" +) + +// RedocOpts configures the Redoc middlewares +type RedocOpts struct { + // BasePath for the UI path, defaults to: / + BasePath string + // Path combines with BasePath for the full UI path, defaults to: docs + Path string + // SpecURL the url to find the spec for + SpecURL string + // RedocURL for the js that generates the redoc site, defaults to: https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js + RedocURL string + // Title for the documentation site, default to: API documentation + Title string +} + +// EnsureDefaults in case some options are missing +func (r *RedocOpts) EnsureDefaults() { + if r.BasePath == "" { + r.BasePath = "/" + } + if r.Path == "" { + r.Path = "docs" + } + if r.SpecURL == "" { + r.SpecURL = "/swagger.json" + } + if r.RedocURL == "" { + r.RedocURL = redocLatest + } + if r.Title == "" { + r.Title = "API documentation" + } +} + +// Redoc creates a middleware to serve a documentation site for a swagger spec. +// This allows for altering the spec before starting the http listener. +// +func Redoc(opts RedocOpts, next http.Handler) http.Handler { + opts.EnsureDefaults() + + pth := path.Join(opts.BasePath, opts.Path) + tmpl := template.Must(template.New("redoc").Parse(redocTemplate)) + + buf := bytes.NewBuffer(nil) + _ = tmpl.Execute(buf, opts) + b := buf.Bytes() + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if r.URL.Path == pth { + rw.Header().Set("Content-Type", "text/html; charset=utf-8") + rw.WriteHeader(http.StatusOK) + + _, _ = rw.Write(b) + return + } + + if next == nil { + rw.Header().Set("Content-Type", "text/plain") + rw.WriteHeader(http.StatusNotFound) + _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth))) + return + } + next.ServeHTTP(rw, r) + }) +} + +const ( + redocLatest = "https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js" + redocTemplate = ` + + + {{ .Title }} + + + + + + + + + + + + + +` +) diff --git a/vendor/github.com/go-openapi/runtime/middleware/request.go b/vendor/github.com/go-openapi/runtime/middleware/request.go new file mode 100644 index 00000000000..4e1c0ab58b9 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/request.go @@ -0,0 +1,104 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "net/http" + "reflect" + + "github.com/go-openapi/errors" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" +) + +// RequestBinder binds and validates the data from a http request +type untypedRequestBinder struct { + Spec *spec.Swagger + Parameters map[string]spec.Parameter + Formats strfmt.Registry + paramBinders map[string]*untypedParamBinder +} + +// NewRequestBinder creates a new binder for reading a request. +func newUntypedRequestBinder(parameters map[string]spec.Parameter, spec *spec.Swagger, formats strfmt.Registry) *untypedRequestBinder { + binders := make(map[string]*untypedParamBinder) + for fieldName, param := range parameters { + binders[fieldName] = newUntypedParamBinder(param, spec, formats) + } + return &untypedRequestBinder{ + Parameters: parameters, + paramBinders: binders, + Spec: spec, + Formats: formats, + } +} + +// Bind perform the databinding and validation +func (o *untypedRequestBinder) Bind(request *http.Request, routeParams RouteParams, consumer runtime.Consumer, data interface{}) error { + val := reflect.Indirect(reflect.ValueOf(data)) + isMap := val.Kind() == reflect.Map + var result []error + debugLog("binding %d parameters for %s %s", len(o.Parameters), request.Method, request.URL.EscapedPath()) + for fieldName, param := range o.Parameters { + binder := o.paramBinders[fieldName] + debugLog("binding parameter %s for %s %s", fieldName, request.Method, request.URL.EscapedPath()) + var target reflect.Value + if !isMap { + binder.Name = fieldName + target = val.FieldByName(fieldName) + } + + if isMap { + tpe := binder.Type() + if tpe == nil { + if param.Schema.Type.Contains("array") { + tpe = reflect.TypeOf([]interface{}{}) + } else { + tpe = reflect.TypeOf(map[string]interface{}{}) + } + } + target = reflect.Indirect(reflect.New(tpe)) + } + + if !target.IsValid() { + result = append(result, errors.New(500, "parameter name %q is an unknown field", binder.Name)) + continue + } + + if err := binder.Bind(request, routeParams, consumer, target); err != nil { + result = append(result, err) + continue + } + + if binder.validator != nil { + rr := binder.validator.Validate(target.Interface()) + if rr != nil && rr.HasErrors() { + result = append(result, rr.AsError()) + } + } + + if isMap { + val.SetMapIndex(reflect.ValueOf(param.Name), target) + } + } + + if len(result) > 0 { + return errors.CompositeValidationError(result...) + } + + return nil +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/router.go b/vendor/github.com/go-openapi/runtime/middleware/router.go new file mode 100644 index 00000000000..6d797e82c98 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/router.go @@ -0,0 +1,478 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "fmt" + "net/http" + fpath "path" + "regexp" + "strings" + + "github.com/go-openapi/runtime/security" + + "github.com/go-openapi/analysis" + "github.com/go-openapi/errors" + "github.com/go-openapi/loads" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware/denco" +) + +// RouteParam is a object to capture route params in a framework agnostic way. +// implementations of the muxer should use these route params to communicate with the +// swagger framework +type RouteParam struct { + Name string + Value string +} + +// RouteParams the collection of route params +type RouteParams []RouteParam + +// Get gets the value for the route param for the specified key +func (r RouteParams) Get(name string) string { + vv, _, _ := r.GetOK(name) + if len(vv) > 0 { + return vv[len(vv)-1] + } + return "" +} + +// GetOK gets the value but also returns booleans to indicate if a key or value +// is present. This aids in validation and satisfies an interface in use there +// +// The returned values are: data, has key, has value +func (r RouteParams) GetOK(name string) ([]string, bool, bool) { + for _, p := range r { + if p.Name == name { + return []string{p.Value}, true, p.Value != "" + } + } + return nil, false, false +} + +// NewRouter creates a new context aware router middleware +func NewRouter(ctx *Context, next http.Handler) http.Handler { + if ctx.router == nil { + ctx.router = DefaultRouter(ctx.spec, ctx.api) + } + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if _, rCtx, ok := ctx.RouteInfo(r); ok { + next.ServeHTTP(rw, rCtx) + return + } + + // Not found, check if it exists in the other methods first + if others := ctx.AllowedMethods(r); len(others) > 0 { + ctx.Respond(rw, r, ctx.analyzer.RequiredProduces(), nil, errors.MethodNotAllowed(r.Method, others)) + return + } + + ctx.Respond(rw, r, ctx.analyzer.RequiredProduces(), nil, errors.NotFound("path %s was not found", r.URL.EscapedPath())) + }) +} + +// RoutableAPI represents an interface for things that can serve +// as a provider of implementations for the swagger router +type RoutableAPI interface { + HandlerFor(string, string) (http.Handler, bool) + ServeErrorFor(string) func(http.ResponseWriter, *http.Request, error) + ConsumersFor([]string) map[string]runtime.Consumer + ProducersFor([]string) map[string]runtime.Producer + AuthenticatorsFor(map[string]spec.SecurityScheme) map[string]runtime.Authenticator + Authorizer() runtime.Authorizer + Formats() strfmt.Registry + DefaultProduces() string + DefaultConsumes() string +} + +// Router represents a swagger aware router +type Router interface { + Lookup(method, path string) (*MatchedRoute, bool) + OtherMethods(method, path string) []string +} + +type defaultRouteBuilder struct { + spec *loads.Document + analyzer *analysis.Spec + api RoutableAPI + records map[string][]denco.Record +} + +type defaultRouter struct { + spec *loads.Document + routers map[string]*denco.Router +} + +func newDefaultRouteBuilder(spec *loads.Document, api RoutableAPI) *defaultRouteBuilder { + return &defaultRouteBuilder{ + spec: spec, + analyzer: analysis.New(spec.Spec()), + api: api, + records: make(map[string][]denco.Record), + } +} + +// DefaultRouter creates a default implemenation of the router +func DefaultRouter(spec *loads.Document, api RoutableAPI) Router { + builder := newDefaultRouteBuilder(spec, api) + if spec != nil { + for method, paths := range builder.analyzer.Operations() { + for path, operation := range paths { + fp := fpath.Join(spec.BasePath(), path) + debugLog("adding route %s %s %q", method, fp, operation.ID) + builder.AddRoute(method, fp, operation) + } + } + } + return builder.Build() +} + +// RouteAuthenticator is an authenticator that can compose several authenticators together. +// It also knows when it contains an authenticator that allows for anonymous pass through. +// Contains a group of 1 or more authenticators that have a logical AND relationship +type RouteAuthenticator struct { + Authenticator map[string]runtime.Authenticator + Schemes []string + Scopes map[string][]string + allScopes []string + commonScopes []string + allowAnonymous bool +} + +func (ra *RouteAuthenticator) AllowsAnonymous() bool { + return ra.allowAnonymous +} + +// AllScopes returns a list of unique scopes that is the combination +// of all the scopes in the requirements +func (ra *RouteAuthenticator) AllScopes() []string { + return ra.allScopes +} + +// CommonScopes returns a list of unique scopes that are common in all the +// scopes in the requirements +func (ra *RouteAuthenticator) CommonScopes() []string { + return ra.commonScopes +} + +// Authenticate Authenticator interface implementation +func (ra *RouteAuthenticator) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { + if ra.allowAnonymous { + route.Authenticator = ra + return true, nil, nil + } + // iterate in proper order + var lastResult interface{} + for _, scheme := range ra.Schemes { + if authenticator, ok := ra.Authenticator[scheme]; ok { + applies, princ, err := authenticator.Authenticate(&security.ScopedAuthRequest{ + Request: req, + RequiredScopes: ra.Scopes[scheme], + }) + if !applies { + return false, nil, nil + } + if err != nil { + route.Authenticator = ra + return true, nil, err + } + lastResult = princ + } + } + route.Authenticator = ra + return true, lastResult, nil +} + +func stringSliceUnion(slices ...[]string) []string { + unique := make(map[string]struct{}) + var result []string + for _, slice := range slices { + for _, entry := range slice { + if _, ok := unique[entry]; ok { + continue + } + unique[entry] = struct{}{} + result = append(result, entry) + } + } + return result +} + +func stringSliceIntersection(slices ...[]string) []string { + unique := make(map[string]int) + var intersection []string + + total := len(slices) + var emptyCnt int + for _, slice := range slices { + if len(slice) == 0 { + emptyCnt++ + continue + } + + for _, entry := range slice { + unique[entry]++ + if unique[entry] == total-emptyCnt { // this entry appeared in all the non-empty slices + intersection = append(intersection, entry) + } + } + } + + return intersection +} + +// RouteAuthenticators represents a group of authenticators that represent a logical OR +type RouteAuthenticators []RouteAuthenticator + +// AllowsAnonymous returns true when there is an authenticator that means optional auth +func (ras RouteAuthenticators) AllowsAnonymous() bool { + for _, ra := range ras { + if ra.AllowsAnonymous() { + return true + } + } + return false +} + +// Authenticate method implemention so this collection can be used as authenticator +func (ras RouteAuthenticators) Authenticate(req *http.Request, route *MatchedRoute) (bool, interface{}, error) { + var lastError error + var allowsAnon bool + var anonAuth RouteAuthenticator + + for _, ra := range ras { + if ra.AllowsAnonymous() { + anonAuth = ra + allowsAnon = true + continue + } + applies, usr, err := ra.Authenticate(req, route) + if !applies || err != nil || usr == nil { + if err != nil { + lastError = err + } + continue + } + return applies, usr, nil + } + + if allowsAnon && lastError == nil { + route.Authenticator = &anonAuth + return true, nil, lastError + } + return lastError != nil, nil, lastError +} + +type routeEntry struct { + PathPattern string + BasePath string + Operation *spec.Operation + Consumes []string + Consumers map[string]runtime.Consumer + Produces []string + Producers map[string]runtime.Producer + Parameters map[string]spec.Parameter + Handler http.Handler + Formats strfmt.Registry + Binder *untypedRequestBinder + Authenticators RouteAuthenticators + Authorizer runtime.Authorizer +} + +// MatchedRoute represents the route that was matched in this request +type MatchedRoute struct { + routeEntry + Params RouteParams + Consumer runtime.Consumer + Producer runtime.Producer + Authenticator *RouteAuthenticator +} + +// HasAuth returns true when the route has a security requirement defined +func (m *MatchedRoute) HasAuth() bool { + return len(m.Authenticators) > 0 +} + +// NeedsAuth returns true when the request still +// needs to perform authentication +func (m *MatchedRoute) NeedsAuth() bool { + return m.HasAuth() && m.Authenticator == nil +} + +func (d *defaultRouter) Lookup(method, path string) (*MatchedRoute, bool) { + mth := strings.ToUpper(method) + debugLog("looking up route for %s %s", method, path) + if Debug { + if len(d.routers) == 0 { + debugLog("there are no known routers") + } + for meth := range d.routers { + debugLog("got a router for %s", meth) + } + } + if router, ok := d.routers[mth]; ok { + if m, rp, ok := router.Lookup(fpath.Clean(path)); ok && m != nil { + if entry, ok := m.(*routeEntry); ok { + debugLog("found a route for %s %s with %d parameters", method, path, len(entry.Parameters)) + var params RouteParams + for _, p := range rp { + v, err := pathUnescape(p.Value) + if err != nil { + debugLog("failed to escape %q: %v", p.Value, err) + v = p.Value + } + // a workaround to handle fragment/composing parameters until they are supported in denco router + // check if this parameter is a fragment within a path segment + if xpos := strings.Index(entry.PathPattern, fmt.Sprintf("{%s}", p.Name)) + len(p.Name) + 2; xpos < len(entry.PathPattern) && entry.PathPattern[xpos] != '/' { + // extract fragment parameters + ep := strings.Split(entry.PathPattern[xpos:], "/")[0] + pnames, pvalues := decodeCompositParams(p.Name, v, ep, nil, nil) + for i, pname := range pnames { + params = append(params, RouteParam{Name: pname, Value: pvalues[i]}) + } + } else { + // use the parameter directly + params = append(params, RouteParam{Name: p.Name, Value: v}) + } + } + return &MatchedRoute{routeEntry: *entry, Params: params}, true + } + } else { + debugLog("couldn't find a route by path for %s %s", method, path) + } + } else { + debugLog("couldn't find a route by method for %s %s", method, path) + } + return nil, false +} + +func (d *defaultRouter) OtherMethods(method, path string) []string { + mn := strings.ToUpper(method) + var methods []string + for k, v := range d.routers { + if k != mn { + if _, _, ok := v.Lookup(fpath.Clean(path)); ok { + methods = append(methods, k) + continue + } + } + } + return methods +} + +// convert swagger parameters per path segment into a denco parameter as multiple parameters per segment are not supported in denco +var pathConverter = regexp.MustCompile(`{(.+?)}([^/]*)`) + +func decodeCompositParams(name string, value string, pattern string, names []string, values []string) ([]string, []string) { + pleft := strings.Index(pattern, "{") + names = append(names, name) + if pleft < 0 { + if strings.HasSuffix(value, pattern) { + values = append(values, value[:len(value)-len(pattern)]) + } else { + values = append(values, "") + } + } else { + toskip := pattern[:pleft] + pright := strings.Index(pattern, "}") + vright := strings.Index(value, toskip) + if vright >= 0 { + values = append(values, value[:vright]) + } else { + values = append(values, "") + value = "" + } + return decodeCompositParams(pattern[pleft+1:pright], value[vright+len(toskip):], pattern[pright+1:], names, values) + } + return names, values +} + +func (d *defaultRouteBuilder) AddRoute(method, path string, operation *spec.Operation) { + mn := strings.ToUpper(method) + + bp := fpath.Clean(d.spec.BasePath()) + if len(bp) > 0 && bp[len(bp)-1] == '/' { + bp = bp[:len(bp)-1] + } + + debugLog("operation: %#v", *operation) + if handler, ok := d.api.HandlerFor(method, strings.TrimPrefix(path, bp)); ok { + consumes := d.analyzer.ConsumesFor(operation) + produces := d.analyzer.ProducesFor(operation) + parameters := d.analyzer.ParamsFor(method, strings.TrimPrefix(path, bp)) + + record := denco.NewRecord(pathConverter.ReplaceAllString(path, ":$1"), &routeEntry{ + BasePath: bp, + PathPattern: path, + Operation: operation, + Handler: handler, + Consumes: consumes, + Produces: produces, + Consumers: d.api.ConsumersFor(normalizeOffers(consumes)), + Producers: d.api.ProducersFor(normalizeOffers(produces)), + Parameters: parameters, + Formats: d.api.Formats(), + Binder: newUntypedRequestBinder(parameters, d.spec.Spec(), d.api.Formats()), + Authenticators: d.buildAuthenticators(operation), + Authorizer: d.api.Authorizer(), + }) + d.records[mn] = append(d.records[mn], record) + } +} + +func (d *defaultRouteBuilder) buildAuthenticators(operation *spec.Operation) RouteAuthenticators { + requirements := d.analyzer.SecurityRequirementsFor(operation) + var auths []RouteAuthenticator + for _, reqs := range requirements { + var schemes []string + scopes := make(map[string][]string, len(reqs)) + var scopeSlices [][]string + for _, req := range reqs { + schemes = append(schemes, req.Name) + scopes[req.Name] = req.Scopes + scopeSlices = append(scopeSlices, req.Scopes) + } + + definitions := d.analyzer.SecurityDefinitionsForRequirements(reqs) + authenticators := d.api.AuthenticatorsFor(definitions) + auths = append(auths, RouteAuthenticator{ + Authenticator: authenticators, + Schemes: schemes, + Scopes: scopes, + allScopes: stringSliceUnion(scopeSlices...), + commonScopes: stringSliceIntersection(scopeSlices...), + allowAnonymous: len(reqs) == 1 && reqs[0].Name == "", + }) + } + return auths +} + +func (d *defaultRouteBuilder) Build() *defaultRouter { + routers := make(map[string]*denco.Router) + for method, records := range d.records { + router := denco.New() + _ = router.Build(records) + routers[method] = router + } + return &defaultRouter{ + spec: d.spec, + routers: routers, + } +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/security.go b/vendor/github.com/go-openapi/runtime/middleware/security.go new file mode 100644 index 00000000000..2b061caefcb --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/security.go @@ -0,0 +1,39 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import "net/http" + +func newSecureAPI(ctx *Context, next http.Handler) http.Handler { + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := ctx.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + if route != nil && !route.NeedsAuth() { + next.ServeHTTP(rw, r) + return + } + + _, rCtx, err := ctx.Authorize(r, route) + if err != nil { + ctx.Respond(rw, r, route.Produces, route, err) + return + } + r = rCtx + + next.ServeHTTP(rw, r) + }) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/spec.go b/vendor/github.com/go-openapi/runtime/middleware/spec.go new file mode 100644 index 00000000000..f0291429806 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/spec.go @@ -0,0 +1,48 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "net/http" + "path" +) + +// Spec creates a middleware to serve a swagger spec. +// This allows for altering the spec before starting the http listener. +// This can be useful if you want to serve the swagger spec from another path than /swagger.json +// +func Spec(basePath string, b []byte, next http.Handler) http.Handler { + if basePath == "" { + basePath = "/" + } + pth := path.Join(basePath, "swagger.json") + + return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { + if r.URL.Path == pth { + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(http.StatusOK) + //#nosec + _, _ = rw.Write(b) + return + } + + if next == nil { + rw.Header().Set("Content-Type", "application/json") + rw.WriteHeader(http.StatusNotFound) + return + } + next.ServeHTTP(rw, r) + }) +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go new file mode 100644 index 00000000000..39a85f7d9e8 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go @@ -0,0 +1,286 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package untyped + +import ( + "fmt" + "net/http" + "sort" + "strings" + + "github.com/go-openapi/analysis" + "github.com/go-openapi/errors" + "github.com/go-openapi/loads" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + + "github.com/go-openapi/runtime" +) + +// NewAPI creates the default untyped API +func NewAPI(spec *loads.Document) *API { + var an *analysis.Spec + if spec != nil && spec.Spec() != nil { + an = analysis.New(spec.Spec()) + } + api := &API{ + spec: spec, + analyzer: an, + consumers: make(map[string]runtime.Consumer, 10), + producers: make(map[string]runtime.Producer, 10), + authenticators: make(map[string]runtime.Authenticator), + operations: make(map[string]map[string]runtime.OperationHandler), + ServeError: errors.ServeError, + Models: make(map[string]func() interface{}), + formats: strfmt.NewFormats(), + } + return api.WithJSONDefaults() +} + +// API represents an untyped mux for a swagger spec +type API struct { + spec *loads.Document + analyzer *analysis.Spec + DefaultProduces string + DefaultConsumes string + consumers map[string]runtime.Consumer + producers map[string]runtime.Producer + authenticators map[string]runtime.Authenticator + authorizer runtime.Authorizer + operations map[string]map[string]runtime.OperationHandler + ServeError func(http.ResponseWriter, *http.Request, error) + Models map[string]func() interface{} + formats strfmt.Registry +} + +// WithJSONDefaults loads the json defaults for this api +func (d *API) WithJSONDefaults() *API { + d.DefaultConsumes = runtime.JSONMime + d.DefaultProduces = runtime.JSONMime + d.consumers[runtime.JSONMime] = runtime.JSONConsumer() + d.producers[runtime.JSONMime] = runtime.JSONProducer() + return d +} + +// WithoutJSONDefaults clears the json defaults for this api +func (d *API) WithoutJSONDefaults() *API { + d.DefaultConsumes = "" + d.DefaultProduces = "" + delete(d.consumers, runtime.JSONMime) + delete(d.producers, runtime.JSONMime) + return d +} + +// Formats returns the registered string formats +func (d *API) Formats() strfmt.Registry { + if d.formats == nil { + d.formats = strfmt.NewFormats() + } + return d.formats +} + +// RegisterFormat registers a custom format validator +func (d *API) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) { + if d.formats == nil { + d.formats = strfmt.NewFormats() + } + d.formats.Add(name, format, validator) +} + +// RegisterAuth registers an auth handler in this api +func (d *API) RegisterAuth(scheme string, handler runtime.Authenticator) { + if d.authenticators == nil { + d.authenticators = make(map[string]runtime.Authenticator) + } + d.authenticators[scheme] = handler +} + +// RegisterAuthorizer registers an authorizer handler in this api +func (d *API) RegisterAuthorizer(handler runtime.Authorizer) { + d.authorizer = handler +} + +// RegisterConsumer registers a consumer for a media type. +func (d *API) RegisterConsumer(mediaType string, handler runtime.Consumer) { + if d.consumers == nil { + d.consumers = make(map[string]runtime.Consumer, 10) + } + d.consumers[strings.ToLower(mediaType)] = handler +} + +// RegisterProducer registers a producer for a media type +func (d *API) RegisterProducer(mediaType string, handler runtime.Producer) { + if d.producers == nil { + d.producers = make(map[string]runtime.Producer, 10) + } + d.producers[strings.ToLower(mediaType)] = handler +} + +// RegisterOperation registers an operation handler for an operation name +func (d *API) RegisterOperation(method, path string, handler runtime.OperationHandler) { + if d.operations == nil { + d.operations = make(map[string]map[string]runtime.OperationHandler, 30) + } + um := strings.ToUpper(method) + if b, ok := d.operations[um]; !ok || b == nil { + d.operations[um] = make(map[string]runtime.OperationHandler) + } + d.operations[um][path] = handler +} + +// OperationHandlerFor returns the operation handler for the specified id if it can be found +func (d *API) OperationHandlerFor(method, path string) (runtime.OperationHandler, bool) { + if d.operations == nil { + return nil, false + } + if pi, ok := d.operations[strings.ToUpper(method)]; ok { + h, ok := pi[path] + return h, ok + } + return nil, false +} + +// ConsumersFor gets the consumers for the specified media types +func (d *API) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { + result := make(map[string]runtime.Consumer) + for _, mt := range mediaTypes { + if consumer, ok := d.consumers[mt]; ok { + result[mt] = consumer + } + } + return result +} + +// ProducersFor gets the producers for the specified media types +func (d *API) ProducersFor(mediaTypes []string) map[string]runtime.Producer { + result := make(map[string]runtime.Producer) + for _, mt := range mediaTypes { + if producer, ok := d.producers[mt]; ok { + result[mt] = producer + } + } + return result +} + +// AuthenticatorsFor gets the authenticators for the specified security schemes +func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { + result := make(map[string]runtime.Authenticator) + for k := range schemes { + if a, ok := d.authenticators[k]; ok { + result[k] = a + } + } + return result +} + +// Authorizer returns the registered authorizer +func (d *API) Authorizer() runtime.Authorizer { + return d.authorizer +} + +// Validate validates this API for any missing items +func (d *API) Validate() error { + return d.validate() +} + +// validateWith validates the registrations in this API against the provided spec analyzer +func (d *API) validate() error { + var consumes []string + for k := range d.consumers { + consumes = append(consumes, k) + } + + var produces []string + for k := range d.producers { + produces = append(produces, k) + } + + var authenticators []string + for k := range d.authenticators { + authenticators = append(authenticators, k) + } + + var operations []string + for m, v := range d.operations { + for p := range v { + operations = append(operations, fmt.Sprintf("%s %s", strings.ToUpper(m), p)) + } + } + + var definedAuths []string + for k := range d.spec.Spec().SecurityDefinitions { + definedAuths = append(definedAuths, k) + } + + if err := d.verify("consumes", consumes, d.analyzer.RequiredConsumes()); err != nil { + return err + } + if err := d.verify("produces", produces, d.analyzer.RequiredProduces()); err != nil { + return err + } + if err := d.verify("operation", operations, d.analyzer.OperationMethodPaths()); err != nil { + return err + } + + requiredAuths := d.analyzer.RequiredSecuritySchemes() + if err := d.verify("auth scheme", authenticators, requiredAuths); err != nil { + return err + } + if err := d.verify("security definitions", definedAuths, requiredAuths); err != nil { + return err + } + return nil +} + +func (d *API) verify(name string, registrations []string, expectations []string) error { + sort.Strings(registrations) + sort.Strings(expectations) + + expected := map[string]struct{}{} + seen := map[string]struct{}{} + + for _, v := range expectations { + expected[v] = struct{}{} + } + + var unspecified []string + for _, v := range registrations { + seen[v] = struct{}{} + if _, ok := expected[v]; !ok { + unspecified = append(unspecified, v) + } + } + + for k := range seen { + delete(expected, k) + } + + var unregistered []string + for k := range expected { + unregistered = append(unregistered, k) + } + sort.Strings(unspecified) + sort.Strings(unregistered) + + if len(unregistered) > 0 || len(unspecified) > 0 { + return &errors.APIVerificationFailed{ + Section: name, + MissingSpecification: unspecified, + MissingRegistration: unregistered, + } + } + + return nil +} diff --git a/vendor/github.com/go-openapi/runtime/middleware/validation.go b/vendor/github.com/go-openapi/runtime/middleware/validation.go new file mode 100644 index 00000000000..9505c66c8c1 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/middleware/validation.go @@ -0,0 +1,123 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package middleware + +import ( + "mime" + "net/http" + "strings" + + "github.com/go-openapi/errors" + "github.com/go-openapi/swag" + + "github.com/go-openapi/runtime" +) + +type validation struct { + context *Context + result []error + request *http.Request + route *MatchedRoute + bound map[string]interface{} +} + +// ContentType validates the content type of a request +func validateContentType(allowed []string, actual string) error { + debugLog("validating content type for %q against [%s]", actual, strings.Join(allowed, ", ")) + if len(allowed) == 0 { + return nil + } + mt, _, err := mime.ParseMediaType(actual) + if err != nil { + return errors.InvalidContentType(actual, allowed) + } + if swag.ContainsStringsCI(allowed, mt) { + return nil + } + if swag.ContainsStringsCI(allowed, "*/*") { + return nil + } + parts := strings.Split(actual, "/") + if len(parts) == 2 && swag.ContainsStringsCI(allowed, parts[0]+"/*") { + return nil + } + return errors.InvalidContentType(actual, allowed) +} + +func validateRequest(ctx *Context, request *http.Request, route *MatchedRoute) *validation { + debugLog("validating request %s %s", request.Method, request.URL.EscapedPath()) + validate := &validation{ + context: ctx, + request: request, + route: route, + bound: make(map[string]interface{}), + } + + validate.contentType() + if len(validate.result) == 0 { + validate.responseFormat() + } + if len(validate.result) == 0 { + validate.parameters() + } + + return validate +} + +func (v *validation) parameters() { + debugLog("validating request parameters for %s %s", v.request.Method, v.request.URL.EscapedPath()) + if result := v.route.Binder.Bind(v.request, v.route.Params, v.route.Consumer, v.bound); result != nil { + if result.Error() == "validation failure list" { + for _, e := range result.(*errors.Validation).Value.([]interface{}) { + v.result = append(v.result, e.(error)) + } + return + } + v.result = append(v.result, result) + } +} + +func (v *validation) contentType() { + if len(v.result) == 0 && runtime.HasBody(v.request) { + debugLog("validating body content type for %s %s", v.request.Method, v.request.URL.EscapedPath()) + ct, _, req, err := v.context.ContentType(v.request) + if err != nil { + v.result = append(v.result, err) + } else { + v.request = req + } + + if len(v.result) == 0 { + if err := validateContentType(v.route.Consumes, ct); err != nil { + v.result = append(v.result, err) + } + } + if ct != "" && v.route.Consumer == nil { + cons, ok := v.route.Consumers[ct] + if !ok { + v.result = append(v.result, errors.New(500, "no consumer registered for %s", ct)) + } else { + v.route.Consumer = cons + } + } + } +} + +func (v *validation) responseFormat() { + if str, rCtx := v.context.ResponseFormat(v.request, v.route.Produces); str == "" { + v.request = rCtx + v.result = append(v.result, errors.InvalidResponseFormat(v.request.Header.Get(runtime.HeaderAccept), v.route.Produces)) + } +} diff --git a/vendor/github.com/go-openapi/runtime/request.go b/vendor/github.com/go-openapi/runtime/request.go new file mode 100644 index 00000000000..9e51b42b59d --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/request.go @@ -0,0 +1,139 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "bufio" + "io" + "net/http" + "strings" + + "github.com/go-openapi/swag" +) + +// CanHaveBody returns true if this method can have a body +func CanHaveBody(method string) bool { + mn := strings.ToUpper(method) + return mn == "POST" || mn == "PUT" || mn == "PATCH" || mn == "DELETE" +} + +// IsSafe returns true if this is a request with a safe method +func IsSafe(r *http.Request) bool { + mn := strings.ToUpper(r.Method) + return mn == "GET" || mn == "HEAD" +} + +// AllowsBody returns true if the request allows for a body +func AllowsBody(r *http.Request) bool { + mn := strings.ToUpper(r.Method) + return mn != "HEAD" +} + +// HasBody returns true if this method needs a content-type +func HasBody(r *http.Request) bool { + // happy case: we have a content length set + if r.ContentLength > 0 { + return true + } + + if r.Header.Get(http.CanonicalHeaderKey("content-length")) != "" { + // in this case, no Transfer-Encoding should be present + // we have a header set but it was explicitly set to 0, so we assume no body + return false + } + + rdr := newPeekingReader(r.Body) + r.Body = rdr + return rdr.HasContent() +} + +func newPeekingReader(r io.ReadCloser) *peekingReader { + if r == nil { + return nil + } + return &peekingReader{ + underlying: bufio.NewReader(r), + orig: r, + } +} + +type peekingReader struct { + underlying interface { + Buffered() int + Peek(int) ([]byte, error) + Read([]byte) (int, error) + } + orig io.ReadCloser +} + +func (p *peekingReader) HasContent() bool { + if p == nil { + return false + } + if p.underlying.Buffered() > 0 { + return true + } + b, err := p.underlying.Peek(1) + if err != nil { + return false + } + return len(b) > 0 +} + +func (p *peekingReader) Read(d []byte) (int, error) { + if p == nil { + return 0, io.EOF + } + return p.underlying.Read(d) +} + +func (p *peekingReader) Close() error { + p.underlying = nil + if p.orig != nil { + return p.orig.Close() + } + return nil +} + +// JSONRequest creates a new http request with json headers set +func JSONRequest(method, urlStr string, body io.Reader) (*http.Request, error) { + req, err := http.NewRequest(method, urlStr, body) + if err != nil { + return nil, err + } + req.Header.Add(HeaderContentType, JSONMime) + req.Header.Add(HeaderAccept, JSONMime) + return req, nil +} + +// Gettable for things with a method GetOK(string) (data string, hasKey bool, hasValue bool) +type Gettable interface { + GetOK(string) ([]string, bool, bool) +} + +// ReadSingleValue reads a single value from the source +func ReadSingleValue(values Gettable, name string) string { + vv, _, hv := values.GetOK(name) + if hv { + return vv[len(vv)-1] + } + return "" +} + +// ReadCollectionValue reads a collection value from a string data source +func ReadCollectionValue(values Gettable, name, collectionFormat string) []string { + v := ReadSingleValue(values, name) + return swag.SplitByFormat(v, collectionFormat) +} diff --git a/vendor/github.com/go-openapi/runtime/security/authenticator.go b/vendor/github.com/go-openapi/runtime/security/authenticator.go new file mode 100644 index 00000000000..476d26c3e77 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/security/authenticator.go @@ -0,0 +1,276 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package security + +import ( + "context" + "net/http" + "strings" + + "github.com/go-openapi/errors" + + "github.com/go-openapi/runtime" +) + +const ( + query = "query" + header = "header" +) + +// HttpAuthenticator is a function that authenticates a HTTP request +func HttpAuthenticator(handler func(*http.Request) (bool, interface{}, error)) runtime.Authenticator { + return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { + if request, ok := params.(*http.Request); ok { + return handler(request) + } + if scoped, ok := params.(*ScopedAuthRequest); ok { + return handler(scoped.Request) + } + return false, nil, nil + }) +} + +// ScopedAuthenticator is a function that authenticates a HTTP request against a list of valid scopes +func ScopedAuthenticator(handler func(*ScopedAuthRequest) (bool, interface{}, error)) runtime.Authenticator { + return runtime.AuthenticatorFunc(func(params interface{}) (bool, interface{}, error) { + if request, ok := params.(*ScopedAuthRequest); ok { + return handler(request) + } + return false, nil, nil + }) +} + +// UserPassAuthentication authentication function +type UserPassAuthentication func(string, string) (interface{}, error) + +// UserPassAuthenticationCtx authentication function with context.Context +type UserPassAuthenticationCtx func(context.Context, string, string) (context.Context, interface{}, error) + +// TokenAuthentication authentication function +type TokenAuthentication func(string) (interface{}, error) + +// TokenAuthenticationCtx authentication function with context.Context +type TokenAuthenticationCtx func(context.Context, string) (context.Context, interface{}, error) + +// ScopedTokenAuthentication authentication function +type ScopedTokenAuthentication func(string, []string) (interface{}, error) + +// ScopedTokenAuthenticationCtx authentication function with context.Context +type ScopedTokenAuthenticationCtx func(context.Context, string, []string) (context.Context, interface{}, error) + +var DefaultRealmName = "API" + +type secCtxKey uint8 + +const ( + failedBasicAuth secCtxKey = iota + oauth2SchemeName +) + +func FailedBasicAuth(r *http.Request) string { + return FailedBasicAuthCtx(r.Context()) +} + +func FailedBasicAuthCtx(ctx context.Context) string { + v, ok := ctx.Value(failedBasicAuth).(string) + if !ok { + return "" + } + return v +} + +func OAuth2SchemeName(r *http.Request) string { + return OAuth2SchemeNameCtx(r.Context()) +} + +func OAuth2SchemeNameCtx(ctx context.Context) string { + v, ok := ctx.Value(oauth2SchemeName).(string) + if !ok { + return "" + } + return v +} + +// BasicAuth creates a basic auth authenticator with the provided authentication function +func BasicAuth(authenticate UserPassAuthentication) runtime.Authenticator { + return BasicAuthRealm(DefaultRealmName, authenticate) +} + +// BasicAuthRealm creates a basic auth authenticator with the provided authentication function and realm name +func BasicAuthRealm(realm string, authenticate UserPassAuthentication) runtime.Authenticator { + if realm == "" { + realm = DefaultRealmName + } + + return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + if usr, pass, ok := r.BasicAuth(); ok { + p, err := authenticate(usr, pass) + if err != nil { + *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) + } + return true, p, err + } + *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) + return false, nil, nil + }) +} + +// BasicAuthCtx creates a basic auth authenticator with the provided authentication function with support for context.Context +func BasicAuthCtx(authenticate UserPassAuthenticationCtx) runtime.Authenticator { + return BasicAuthRealmCtx(DefaultRealmName, authenticate) +} + +// BasicAuthRealmCtx creates a basic auth authenticator with the provided authentication function and realm name with support for context.Context +func BasicAuthRealmCtx(realm string, authenticate UserPassAuthenticationCtx) runtime.Authenticator { + if realm == "" { + realm = DefaultRealmName + } + + return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + if usr, pass, ok := r.BasicAuth(); ok { + ctx, p, err := authenticate(r.Context(), usr, pass) + if err != nil { + ctx = context.WithValue(ctx, failedBasicAuth, realm) + } + *r = *r.WithContext(ctx) + return true, p, err + } + *r = *r.WithContext(context.WithValue(r.Context(), failedBasicAuth, realm)) + return false, nil, nil + }) +} + +// APIKeyAuth creates an authenticator that uses a token for authorization. +// This token can be obtained from either a header or a query string +func APIKeyAuth(name, in string, authenticate TokenAuthentication) runtime.Authenticator { + inl := strings.ToLower(in) + if inl != query && inl != header { + // panic because this is most likely a typo + panic(errors.New(500, "api key auth: in value needs to be either \"query\" or \"header\".")) + } + + var getToken func(*http.Request) string + switch inl { + case header: + getToken = func(r *http.Request) string { return r.Header.Get(name) } + case query: + getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } + } + + return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + token := getToken(r) + if token == "" { + return false, nil, nil + } + + p, err := authenticate(token) + return true, p, err + }) +} + +// APIKeyAuthCtx creates an authenticator that uses a token for authorization with support for context.Context. +// This token can be obtained from either a header or a query string +func APIKeyAuthCtx(name, in string, authenticate TokenAuthenticationCtx) runtime.Authenticator { + inl := strings.ToLower(in) + if inl != query && inl != header { + // panic because this is most likely a typo + panic(errors.New(500, "api key auth: in value needs to be either \"query\" or \"header\".")) + } + + var getToken func(*http.Request) string + switch inl { + case header: + getToken = func(r *http.Request) string { return r.Header.Get(name) } + case query: + getToken = func(r *http.Request) string { return r.URL.Query().Get(name) } + } + + return HttpAuthenticator(func(r *http.Request) (bool, interface{}, error) { + token := getToken(r) + if token == "" { + return false, nil, nil + } + + ctx, p, err := authenticate(r.Context(), token) + *r = *r.WithContext(ctx) + return true, p, err + }) +} + +// ScopedAuthRequest contains both a http request and the required scopes for a particular operation +type ScopedAuthRequest struct { + Request *http.Request + RequiredScopes []string +} + +// BearerAuth for use with oauth2 flows +func BearerAuth(name string, authenticate ScopedTokenAuthentication) runtime.Authenticator { + const prefix = "Bearer " + return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { + var token string + hdr := r.Request.Header.Get("Authorization") + if strings.HasPrefix(hdr, prefix) { + token = strings.TrimPrefix(hdr, prefix) + } + if token == "" { + qs := r.Request.URL.Query() + token = qs.Get("access_token") + } + //#nosec + ct, _, _ := runtime.ContentType(r.Request.Header) + if token == "" && (ct == "application/x-www-form-urlencoded" || ct == "multipart/form-data") { + token = r.Request.FormValue("access_token") + } + + if token == "" { + return false, nil, nil + } + + rctx := context.WithValue(r.Request.Context(), oauth2SchemeName, name) + *r.Request = *r.Request.WithContext(rctx) + p, err := authenticate(token, r.RequiredScopes) + return true, p, err + }) +} + +// BearerAuthCtx for use with oauth2 flows with support for context.Context. +func BearerAuthCtx(name string, authenticate ScopedTokenAuthenticationCtx) runtime.Authenticator { + const prefix = "Bearer " + return ScopedAuthenticator(func(r *ScopedAuthRequest) (bool, interface{}, error) { + var token string + hdr := r.Request.Header.Get("Authorization") + if strings.HasPrefix(hdr, prefix) { + token = strings.TrimPrefix(hdr, prefix) + } + if token == "" { + qs := r.Request.URL.Query() + token = qs.Get("access_token") + } + //#nosec + ct, _, _ := runtime.ContentType(r.Request.Header) + if token == "" && (ct == "application/x-www-form-urlencoded" || ct == "multipart/form-data") { + token = r.Request.FormValue("access_token") + } + + if token == "" { + return false, nil, nil + } + + rctx := context.WithValue(r.Request.Context(), oauth2SchemeName, name) + ctx, p, err := authenticate(rctx, token, r.RequiredScopes) + *r.Request = *r.Request.WithContext(ctx) + return true, p, err + }) +} diff --git a/vendor/github.com/go-openapi/runtime/security/authorizer.go b/vendor/github.com/go-openapi/runtime/security/authorizer.go new file mode 100644 index 00000000000..00c1a4d6a4c --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/security/authorizer.go @@ -0,0 +1,27 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package security + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// Authorized provides a default implementation of the Authorizer interface where all +// requests are authorized (successful) +func Authorized() runtime.Authorizer { + return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil }) +} diff --git a/vendor/github.com/go-openapi/runtime/statuses.go b/vendor/github.com/go-openapi/runtime/statuses.go new file mode 100644 index 00000000000..3b011a0bff1 --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/statuses.go @@ -0,0 +1,90 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +// Statuses lists the most common HTTP status codes to default message +// taken from https://httpstatuses.com/ +var Statuses = map[int]string{ + 100: "Continue", + 101: "Switching Protocols", + 102: "Processing", + 103: "Checkpoint", + 122: "URI too long", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "Request Processed", + 204: "No Content", + 205: "Reset Content", + 206: "Partial Content", + 207: "Multi-Status", + 208: "Already Reported", + 226: "IM Used", + 300: "Multiple Choices", + 301: "Moved Permanently", + 302: "Found", + 303: "See Other", + 304: "Not Modified", + 305: "Use Proxy", + 306: "Switch Proxy", + 307: "Temporary Redirect", + 308: "Permanent Redirect", + 400: "Bad Request", + 401: "Unauthorized", + 402: "Payment Required", + 403: "Forbidden", + 404: "Not Found", + 405: "Method Not Allowed", + 406: "Not Acceptable", + 407: "Proxy Authentication Required", + 408: "Request Timeout", + 409: "Conflict", + 410: "Gone", + 411: "Length Required", + 412: "Precondition Failed", + 413: "Request Entity Too Large", + 414: "Request-URI Too Long", + 415: "Unsupported Media Type", + 416: "Request Range Not Satisfiable", + 417: "Expectation Failed", + 418: "I'm a teapot", + 420: "Enhance Your Calm", + 422: "Unprocessable Entity", + 423: "Locked", + 424: "Failed Dependency", + 426: "Upgrade Required", + 428: "Precondition Required", + 429: "Too Many Requests", + 431: "Request Header Fields Too Large", + 444: "No Response", + 449: "Retry With", + 450: "Blocked by Windows Parental Controls", + 451: "Wrong Exchange Server", + 499: "Client Closed Request", + 500: "Internal Server Error", + 501: "Not Implemented", + 502: "Bad Gateway", + 503: "Service Unavailable", + 504: "Gateway Timeout", + 505: "HTTP Version Not Supported", + 506: "Variant Also Negotiates", + 507: "Insufficient Storage", + 508: "Loop Detected", + 509: "Bandwidth Limit Exceeded", + 510: "Not Extended", + 511: "Network Authentication Required", + 598: "Network read timeout error", + 599: "Network connect timeout error", +} diff --git a/vendor/github.com/go-openapi/runtime/text.go b/vendor/github.com/go-openapi/runtime/text.go new file mode 100644 index 00000000000..c7fd04c3c5c --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/text.go @@ -0,0 +1,117 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "bytes" + "encoding" + "errors" + "fmt" + "io" + "reflect" + + "github.com/go-openapi/swag" +) + +// TextConsumer creates a new text consumer +func TextConsumer() Consumer { + return ConsumerFunc(func(reader io.Reader, data interface{}) error { + if reader == nil { + return errors.New("TextConsumer requires a reader") // early exit + } + + buf := new(bytes.Buffer) + _, err := buf.ReadFrom(reader) + if err != nil { + return err + } + b := buf.Bytes() + + // If the buffer is empty, no need to unmarshal it, which causes a panic. + if len(b) == 0 { + data = "" + return nil + } + + if tu, ok := data.(encoding.TextUnmarshaler); ok { + err := tu.UnmarshalText(b) + if err != nil { + return fmt.Errorf("text consumer: %v", err) + } + + return nil + } + + t := reflect.TypeOf(data) + if data != nil && t.Kind() == reflect.Ptr { + v := reflect.Indirect(reflect.ValueOf(data)) + if t.Elem().Kind() == reflect.String { + v.SetString(string(b)) + return nil + } + } + + return fmt.Errorf("%v (%T) is not supported by the TextConsumer, %s", + data, data, "can be resolved by supporting TextUnmarshaler interface") + }) +} + +// TextProducer creates a new text producer +func TextProducer() Producer { + return ProducerFunc(func(writer io.Writer, data interface{}) error { + if writer == nil { + return errors.New("TextProducer requires a writer") // early exit + } + + if data == nil { + return errors.New("no data given to produce text from") + } + + if tm, ok := data.(encoding.TextMarshaler); ok { + txt, err := tm.MarshalText() + if err != nil { + return fmt.Errorf("text producer: %v", err) + } + _, err = writer.Write(txt) + return err + } + + if str, ok := data.(error); ok { + _, err := writer.Write([]byte(str.Error())) + return err + } + + if str, ok := data.(fmt.Stringer); ok { + _, err := writer.Write([]byte(str.String())) + return err + } + + v := reflect.Indirect(reflect.ValueOf(data)) + if t := v.Type(); t.Kind() == reflect.Struct || t.Kind() == reflect.Slice { + b, err := swag.WriteJSON(data) + if err != nil { + return err + } + _, err = writer.Write(b) + return err + } + if v.Kind() != reflect.String { + return fmt.Errorf("%T is not a supported type by the TextProducer", data) + } + + _, err := writer.Write([]byte(v.String())) + return err + }) +} diff --git a/vendor/github.com/go-openapi/runtime/values.go b/vendor/github.com/go-openapi/runtime/values.go new file mode 100644 index 00000000000..11f5732af4e --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/values.go @@ -0,0 +1,19 @@ +package runtime + +// Values typically represent parameters on a http request. +type Values map[string][]string + +// GetOK returns the values collection for the given key. +// When the key is present in the map it will return true for hasKey. +// When the value is not empty it will return true for hasValue. +func (v Values) GetOK(key string) (value []string, hasKey bool, hasValue bool) { + value, hasKey = v[key] + if !hasKey { + return + } + if len(value) == 0 { + return + } + hasValue = true + return +} diff --git a/vendor/github.com/go-openapi/runtime/xml.go b/vendor/github.com/go-openapi/runtime/xml.go new file mode 100644 index 00000000000..821c7393dfb --- /dev/null +++ b/vendor/github.com/go-openapi/runtime/xml.go @@ -0,0 +1,36 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runtime + +import ( + "encoding/xml" + "io" +) + +// XMLConsumer creates a new XML consumer +func XMLConsumer() Consumer { + return ConsumerFunc(func(reader io.Reader, data interface{}) error { + dec := xml.NewDecoder(reader) + return dec.Decode(data) + }) +} + +// XMLProducer creates a new XML producer +func XMLProducer() Producer { + return ProducerFunc(func(writer io.Writer, data interface{}) error { + enc := xml.NewEncoder(writer) + return enc.Encode(data) + }) +} diff --git a/vendor/github.com/go-openapi/spec/.editorconfig b/vendor/github.com/go-openapi/spec/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/spec/.gitignore b/vendor/github.com/go-openapi/spec/.gitignore new file mode 100644 index 00000000000..dd91ed6a04e --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.gitignore @@ -0,0 +1,2 @@ +secrets.yml +coverage.out diff --git a/vendor/github.com/go-openapi/spec/.golangci.yml b/vendor/github.com/go-openapi/spec/.golangci.yml new file mode 100644 index 00000000000..4e17ed4979b --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.golangci.yml @@ -0,0 +1,28 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 45 + maligned: + suggest-new: true + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 2 + +linters: + enable-all: true + disable: + - maligned + - unparam + - lll + - gochecknoinits + - gochecknoglobals + - funlen + - godox + - gocognit + - whitespace + - wsl diff --git a/vendor/github.com/go-openapi/spec/.travis.yml b/vendor/github.com/go-openapi/spec/.travis.yml new file mode 100644 index 00000000000..f1a3f80b350 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/.travis.yml @@ -0,0 +1,13 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.13.x +- 1.14.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +language: go +notifications: + slack: + secure: QUWvCkBBK09GF7YtEvHHVt70JOkdlNBG0nIKu/5qc4/nW5HP8I2w0SEf/XR2je0eED1Qe3L/AfMCWwrEj+IUZc3l4v+ju8X8R3Lomhme0Eb0jd1MTMCuPcBT47YCj0M7RON7vXtbFfm1hFJ/jLe5+9FXz0hpXsR24PJc5ZIi/ogNwkaPqG4BmndzecpSh0vc2FJPZUD9LT0I09REY/vXR0oQAalLkW0asGD5taHZTUZq/kBpsNxaAFrLM23i4mUcf33M5fjLpvx5LRICrX/57XpBrDh2TooBU6Qj3CgoY0uPRYUmSNxbVx1czNzl2JtEpb5yjoxfVPQeg0BvQM00G8LJINISR+ohrjhkZmAqchDupAX+yFrxTtORa78CtnIL6z/aTNlgwwVD8kvL/1pFA/JWYmKDmz93mV/+6wubGzNSQCstzjkFA4/iZEKewKUoRIAi/fxyscP6L/rCpmY/4llZZvrnyTqVbt6URWpopUpH4rwYqreXAtJxJsfBJIeSmUIiDIOMGkCTvyTEW3fWGmGoqWtSHLoaWDyAIGb7azb+KvfpWtEcoPFWfSWU+LGee0A/YsUhBl7ADB9A0CJEuR8q4BPpKpfLwPKSiKSAXL7zDkyjExyhtgqbSl2jS+rKIHOZNL8JkCcTP2MKMVd563C5rC5FMKqu3S9m2b6380E= +script: +- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/spec/LICENSE b/vendor/github.com/go-openapi/spec/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/spec/README.md b/vendor/github.com/go-openapi/spec/README.md new file mode 100644 index 00000000000..6354742cbf6 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/README.md @@ -0,0 +1,10 @@ +# OAI object model [![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec) [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/go-openapi/spec?status.svg)](http://godoc.org/github.com/go-openapi/spec) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/spec.svg)](https://golangci.com) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/spec)](https://goreportcard.com/report/github.com/go-openapi/spec) + +The object model for OpenAPI specification documents. + +Currently supports Swagger 2.0. diff --git a/vendor/github.com/go-openapi/spec/bindata.go b/vendor/github.com/go-openapi/spec/bindata.go new file mode 100644 index 00000000000..66b1f32635d --- /dev/null +++ b/vendor/github.com/go-openapi/spec/bindata.go @@ -0,0 +1,297 @@ +// Code generated by go-bindata. DO NOT EDIT. +// sources: +// schemas/jsonschema-draft-04.json (4.357kB) +// schemas/v2/schema.json (40.248kB) + +package spec + +import ( + "bytes" + "compress/gzip" + "crypto/sha256" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "time" +) + +func bindataRead(data []byte, name string) ([]byte, error) { + gz, err := gzip.NewReader(bytes.NewBuffer(data)) + if err != nil { + return nil, fmt.Errorf("read %q: %v", name, err) + } + + var buf bytes.Buffer + _, err = io.Copy(&buf, gz) + clErr := gz.Close() + + if err != nil { + return nil, fmt.Errorf("read %q: %v", name, err) + } + if clErr != nil { + return nil, err + } + + return buf.Bytes(), nil +} + +type asset struct { + bytes []byte + info os.FileInfo + digest [sha256.Size]byte +} + +type bindataFileInfo struct { + name string + size int64 + mode os.FileMode + modTime time.Time +} + +func (fi bindataFileInfo) Name() string { + return fi.name +} +func (fi bindataFileInfo) Size() int64 { + return fi.size +} +func (fi bindataFileInfo) Mode() os.FileMode { + return fi.mode +} +func (fi bindataFileInfo) ModTime() time.Time { + return fi.modTime +} +func (fi bindataFileInfo) IsDir() bool { + return false +} +func (fi bindataFileInfo) Sys() interface{} { + return nil +} + +var _jsonschemaDraft04Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xc4\x57\x3d\x6f\xdb\x3c\x10\xde\xf3\x2b\x08\x26\x63\xf2\x2a\x2f\xd0\xc9\x5b\xd1\x2e\x01\x5a\x34\x43\x37\x23\x03\x6d\x9d\x6c\x06\x14\xa9\x50\x54\x60\xc3\xd0\x7f\x2f\x28\x4a\x14\x29\x91\x92\x2d\xa7\x8d\x97\x28\xbc\xaf\xe7\x8e\xf7\xc5\xd3\x0d\x42\x08\x61\x9a\xe2\x15\xc2\x7b\xa5\x8a\x55\x92\xbc\x96\x82\x3f\x94\xdb\x3d\xe4\xe4\x3f\x21\x77\x49\x2a\x49\xa6\x1e\x1e\xbf\x24\xe6\xec\x16\xdf\x1b\xa1\x3b\xf3\xff\x02\xc9\x14\xca\xad\xa4\x85\xa2\x82\x6b\xe9\x6f\x42\x02\x32\x2c\x28\x07\x45\x5a\x15\x3d\x77\x46\x39\xd5\xcc\x25\x5e\x21\x83\xb8\x21\x18\xb6\xaf\x52\x92\xa3\x47\x68\x88\xea\x58\x80\x56\x4e\x1a\xf2\xbd\x4f\xcc\x29\x7f\x52\x90\x6b\x7d\xff\x0f\x48\xb4\x3d\x3f\x21\x7c\x27\x21\xd3\x2a\x6e\x31\xaa\x2d\x53\xdd\xf3\xe3\x42\x94\x54\xd1\x77\x78\xe2\x0a\x76\x20\xe3\x20\x68\xcb\x30\x86\x41\xf3\x2a\xc7\x2b\xf4\x78\x8e\xfe\xef\x90\x91\x8a\xa9\xc7\xb1\x1d\xc2\xd8\x2f\x0d\x75\xed\xc1\x4e\x9c\xc8\x25\x43\xac\xa8\xbe\xd7\xcc\xa9\xd1\xa9\x21\xa0\x1a\xbd\x04\x61\x94\x34\x2f\x18\xfc\x3e\x16\x50\x8e\x4d\x03\x6f\x1c\x58\xdb\x48\x23\xbc\x11\x82\x01\xe1\xfa\xd3\x3a\x8e\x30\xaf\x18\x33\x7f\xf3\x8d\x39\x11\x9b\x57\xd8\x2a\xfd\x55\x2a\x49\xf9\x0e\xc7\xec\x37\xd4\x25\xf7\xec\x5c\x66\xc7\xd7\x99\xaa\xcf\x4f\x89\x8a\xd3\xb7\x0a\x3a\xaa\x92\x15\xf4\x30\x6f\x1c\xb0\xd6\x46\xe7\x98\x39\x2d\xa4\x28\x40\x2a\x3a\x88\x9e\x29\xba\x88\x37\x2d\xca\x60\x38\xfa\xba\x5b\x20\xac\xa8\x62\xb0\x4c\xd4\xaf\xda\x45\x0a\xba\x5c\x3b\xb9\xc7\x79\xc5\x14\x2d\x18\x34\x19\x1c\x51\xdb\x25\x4d\xb4\x7e\x06\x14\x38\x6c\x59\x55\xd2\x77\xf8\x69\x59\xfc\x7b\x73\xed\x93\x43\xcb\x32\x6d\x3c\x28\xdc\x1b\x9a\xd3\x62\xab\xc2\x27\xf7\x41\xc9\x08\x2b\x23\x08\xad\x13\x57\x21\x9c\xd3\x72\x0d\x42\x72\xf8\x01\x7c\xa7\xf6\x83\xce\x39\xd7\x82\x3c\x1f\x2f\xd6\x60\x1b\xa2\xdf\x35\x89\x52\x20\xe7\x73\x74\xe0\x66\x26\x64\x4e\xb4\x97\x58\xc2\x0e\x0e\xe1\x60\x92\x34\x6d\xa0\x10\xd6\xb5\x83\x61\x27\xe6\x47\xd3\x89\xbd\x63\xfd\x3b\x8d\x03\x3d\x6c\x42\x2d\x5b\x70\xee\xe8\xdf\x4b\xf4\x66\x4e\xe1\x01\x45\x17\x80\x74\xad\x4f\xc3\xf3\xae\xc6\x1d\xc6\xd7\xc2\xce\xc9\xe1\x29\x30\x86\x2f\x4a\xa6\x4b\x15\x84\x73\xc9\x6f\xfd\x7f\xa5\x6e\x9e\xbd\xf1\xb0\xd4\xdd\x45\x5a\xc2\x3e\x4b\x78\xab\xa8\x84\x74\x4a\x91\x3b\x92\x23\x05\xf2\x1c\x1e\x7b\xf3\x09\xf8\xcf\xab\x24\xb6\x60\xa2\xe8\x4c\x9f\x75\x77\xaa\x8c\xe6\x01\x45\x36\x86\xcf\xc3\x63\x3a\xea\xd4\x8d\x7e\x06\xac\x14\x0a\xe0\x29\xf0\xed\x07\x22\x1a\x65\xda\x44\xae\xa2\x73\x1a\xe6\x90\x69\xa2\x8c\x46\xb2\x2f\xde\x49\x38\x08\xed\xfe\xfd\x41\xaf\x9f\xa9\x55\xd7\xdd\x22\x8d\xfa\x45\x63\xc5\x0f\x80\xf3\xb4\x08\xd6\x79\x30\x9e\x93\xee\x59\xa6\xd0\x4b\xee\x22\xe3\x33\xc1\x3a\x27\x68\x36\x78\x7e\x87\x0a\x06\xd5\x2e\x20\xd3\xaf\x15\xfb\xd8\x3b\x73\x14\xbb\x92\xed\x05\x5d\x2e\x29\x38\x2c\x94\xe4\x42\x45\x5e\xd3\xb5\x7d\xdf\x47\xca\x38\xb4\x5c\xaf\xfb\x7d\xdd\x6d\xf4\xa1\x2d\x77\xdd\x2f\xce\x6d\xc4\x7b\x8b\x4e\x67\xa9\x6f\xfe\x04\x00\x00\xff\xff\xb1\xd1\x27\x78\x05\x11\x00\x00") + +func jsonschemaDraft04JsonBytes() ([]byte, error) { + return bindataRead( + _jsonschemaDraft04Json, + "jsonschema-draft-04.json", + ) +} + +func jsonschemaDraft04Json() (*asset, error) { + bytes, err := jsonschemaDraft04JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "jsonschema-draft-04.json", size: 4357, mode: os.FileMode(0640), modTime: time.Unix(1568963823, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe1, 0x48, 0x9d, 0xb, 0x47, 0x55, 0xf0, 0x27, 0x93, 0x30, 0x25, 0x91, 0xd3, 0xfc, 0xb8, 0xf0, 0x7b, 0x68, 0x93, 0xa8, 0x2a, 0x94, 0xf2, 0x48, 0x95, 0xf8, 0xe4, 0xed, 0xf1, 0x1b, 0x82, 0xe2}} + return a, nil +} + +var _v2SchemaJson = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5d\x4f\x93\xdb\x36\xb2\xbf\xfb\x53\xa0\x14\x57\xd9\xae\xd8\x92\xe3\xf7\x2e\xcf\x97\xd4\xbc\xd8\x49\x66\x37\x5e\x4f\x79\x26\xbb\x87\x78\x5c\x05\x91\x2d\x09\x09\x09\x30\x00\x38\x33\x5a\xef\x7c\xf7\x2d\xf0\x9f\x08\x02\x20\x41\x8a\xd2\xc8\x0e\x0f\xa9\x78\x28\xa0\xd1\xdd\x68\x34\x7e\xdd\xf8\xf7\xf9\x11\x42\x33\x49\x64\x04\xb3\xd7\x68\x76\x86\xfe\x76\xf9\xfe\x1f\xe8\x32\xd8\x40\x8c\xd1\x8a\x71\x74\x79\x8b\xd7\x6b\xe0\xe8\xd5\xfc\x25\x3a\xbb\x38\x9f\xcf\x9e\xab\x0a\x24\x54\xa5\x37\x52\x26\xaf\x17\x0b\x91\x17\x99\x13\xb6\xb8\x79\xb5\x10\x59\xdd\xf9\xef\x82\xd1\x6f\xf2\xc2\x8f\xf3\x4f\xb5\x1a\xea\xc7\x17\x45\x41\xc6\xd7\x8b\x90\xe3\x95\x7c\xf1\xf2\x7f\x8b\xca\x45\x3d\xb9\x4d\x32\xa6\xd8\xf2\x77\x08\x64\xfe\x8d\xc3\x9f\x29\xe1\xa0\x9a\xff\xed\x11\x42\x08\xcd\x8a\xd6\xb3\x9f\x15\x67\x74\xc5\xca\x7f\x27\x58\x6e\xc4\xec\x11\x42\xd7\x59\x5d\x1c\x86\x44\x12\x46\x71\x74\xc1\x59\x02\x5c\x12\x10\xb3\xd7\x68\x85\x23\x01\x59\x81\x04\x4b\x09\x9c\x6a\xbf\x7e\xce\x49\x7d\xba\x7b\x51\xfd\xa1\x44\xe2\xb0\x52\xac\x7d\xb3\x08\x61\x45\x68\x46\x56\x2c\x6e\x80\x86\x8c\xbf\xbd\x93\x40\x05\x61\x74\x96\x95\xbe\x7f\x84\xd0\x7d\x4e\xde\x42\xb7\xe4\xbe\x46\xbb\x14\x5b\x48\x4e\xe8\xba\x90\x05\xa1\x19\xd0\x34\xae\xc4\xce\xbe\xbc\x9a\xbf\x9c\x15\x7f\x5d\x57\xc5\x42\x10\x01\x27\x89\xe2\x48\x51\xb9\xda\x40\xd5\x87\x37\xc0\x15\x5f\x88\xad\x90\xdc\x10\x81\x42\x16\xa4\x31\x50\x39\x2f\x38\xad\xab\xb0\x53\xd8\xac\x94\x56\x6f\xc3\x84\xf4\x11\xa4\x50\xb3\xfa\xe9\xd3\x6f\x9f\x3e\xdf\x2f\xd0\xeb\x8f\x1f\x3f\x7e\xbc\xfe\xf6\xe9\xf7\xaf\x5f\x7f\xfc\x18\x7e\xfb\xec\xfb\xc7\xb3\x36\x79\x54\x43\xe8\x29\xc5\x31\x20\xc6\x11\x49\x9e\xe5\x12\x41\x66\xa0\xe8\xed\x1d\x8e\x93\x08\x5e\xa3\x27\x3b\xc3\x7c\xa2\x73\xba\xc4\x02\x2e\xb0\xdc\xf4\xe5\x76\xd1\xca\x96\xa2\x8a\x94\xcd\x21\xc9\x6c\xec\x2c\x70\x42\x9e\x34\x74\x9d\x19\x7c\xcd\x20\x9c\xea\x2e\x0a\xfe\x42\x84\xd4\x29\x04\x8c\x8a\xb4\x41\xa2\xc1\xdc\x19\x8a\x88\x90\x4a\x49\xef\xce\xdf\xbd\x45\x4a\x52\x81\x70\x10\x40\x22\x21\x44\xcb\x6d\xc5\xec\x4e\x3c\x1c\x45\xef\x57\x9a\xb5\x7d\xae\xfe\xe5\xe4\x31\x86\x90\xe0\xab\x6d\x02\x3b\x2e\xcb\x11\x90\xd9\xa8\xc6\x77\xc2\x59\x98\x06\xfd\xf9\x2e\x78\x45\x01\xa6\xa8\xa0\x71\x5c\xbe\x33\xa7\xd2\xd9\x5f\x95\xef\xd9\xd5\xac\xfd\xdc\x5d\xbf\x5e\xb8\xd1\x3e\xc7\x31\x48\xe0\x5e\x4c\x14\x65\xdf\xb8\xa8\x71\x10\x09\xa3\xc2\xc7\x02\xcb\xa2\x4e\x5a\x02\x82\x94\x13\xb9\xf5\x30\xe6\xb2\xa4\xb5\xfe\x9b\x3e\x7a\xb2\x55\xd2\xa8\x4a\xbc\x16\xb6\x71\x8e\x39\xc7\xdb\x9d\xe1\x10\x09\x71\xbd\x9c\xb3\x41\x89\xd7\xa5\x89\xdc\x57\xb5\x53\x4a\xfe\x4c\xe1\xbc\xa0\x21\x79\x0a\x1a\x0f\x70\xa7\x5c\x08\x8e\xde\xb0\xc0\x43\x24\xad\x74\x63\x0e\xb1\xd9\x90\xe1\xb0\x2d\x13\xa7\x6d\x78\xfd\x04\x14\x38\x8e\x90\xaa\xce\x63\xac\x3e\x23\xbc\x64\xa9\xb4\xf8\x03\x63\xde\xcd\xbe\x16\x13\x4a\x55\xac\x82\x12\xc6\xac\xd4\x35\xf7\x22\xd4\x3a\xff\x22\x73\x0e\x6e\x51\xa0\x75\x1e\xae\x8f\xe8\x5d\xc7\x59\xe6\xe4\x9a\x18\x8d\xd6\x1c\x53\x84\x4d\xb7\x67\x28\x37\x09\x84\x69\x88\x12\x0e\x01\x11\x80\x32\xa2\xf5\xb9\xaa\xc6\xd9\x73\x53\xab\xfb\xb4\x2e\x20\xc6\x54\x92\xa0\x9a\xf3\x69\x1a\x2f\x81\x77\x37\xae\x53\x1a\xce\x40\xc4\xa8\x82\x1c\xb5\xef\xda\x24\x7d\xb9\x61\x69\x14\xa2\x25\xa0\x90\xac\x56\xc0\x81\x4a\xb4\xe2\x2c\xce\x4a\x64\x7a\x9a\x23\xf4\x13\x91\x3f\xa7\x4b\xf4\x63\x84\x6f\x18\x87\x10\xbd\xc3\xfc\x8f\x90\xdd\x52\x44\x04\xc2\x51\xc4\x6e\x21\x74\x48\x21\x81\xc7\xe2\xfd\xea\x12\xf8\x0d\x09\xf6\xe9\x47\x35\xaf\x67\xc4\x14\xf7\x22\x27\x97\xe1\xe2\x76\x2d\x06\x8c\x4a\x1c\x48\x3f\x73\x2d\x0b\x5b\x29\x45\x24\x00\x2a\x0c\x11\xec\x94\xca\xc2\xa6\xc1\x37\x21\x43\x83\x3b\x5f\x97\xf1\x43\x5e\x53\x73\x19\xa5\x36\xd8\x2d\x05\x2e\x34\x0b\xeb\x39\xfc\x1d\x63\x51\x01\xbd\x3d\xbb\x90\x84\x40\x25\x59\x6d\x09\x5d\xa3\x1c\x37\xe6\x5c\x16\x9a\x40\x09\x70\xc1\xe8\x82\xf1\x35\xa6\xe4\xdf\x99\x5c\x8e\x9e\x4d\x79\xb4\x27\x2f\xbf\x7e\xf8\x05\x25\x8c\x50\xa9\x98\x29\x90\x62\x60\xea\x75\xae\x13\xca\xbf\x2b\x1a\x29\x27\x76\xd6\x20\xc6\x64\x5f\xe6\x32\x1a\x08\x87\x21\x07\x21\xbc\xb4\xe4\xe0\x32\x67\xa6\xcd\xf3\x1e\xcd\xd9\x6b\xb6\x6f\x8e\x27\xa7\xed\xdb\xe7\xbc\xcc\x1a\x07\xce\x6f\x87\x33\xf0\xba\x51\x17\x22\x66\x78\x79\x8e\xce\xe5\x13\x81\x80\x06\x2c\xe5\x78\x0d\xa1\xb2\xb8\x54\xa8\x79\x09\xbd\xbf\x3c\x47\x01\x8b\x13\x2c\xc9\x32\xaa\xaa\x1d\xd5\xee\xab\x36\xbd\x6c\xfd\x54\x6c\xc8\x08\x01\x3c\xbd\xe7\x07\x88\xb0\x24\x37\x79\x90\x28\x4a\x1d\x10\x1a\x92\x1b\x12\xa6\x38\x42\x40\xc3\x4c\x43\x62\x8e\xae\x36\xb0\x45\x71\x2a\xa4\x9a\x23\x79\x59\xb1\xa8\xf2\xa4\x0c\x60\x9f\xcc\x8d\x40\xf5\x80\xca\xa8\x99\xc3\xa7\x85\x1f\x31\x25\xa9\x82\xc5\x6d\xbd\xd8\x36\x76\x7c\x02\x28\x97\xf6\x1d\x74\x3b\x11\x7e\x91\xae\x32\xf8\x6c\xf4\xe6\x7b\x9a\xa5\x1f\x62\xc6\x21\xcf\x9a\xe5\xed\x8b\x02\xf3\x2c\x33\x33\xdf\x00\xca\xc9\x09\xb4\x04\xf5\xa5\x08\xd7\xc3\x02\x18\x66\xf1\xab\x1e\x83\x37\x4c\xcd\x12\xc1\x1d\x50\xf6\xaa\xbd\xfe\xe2\x73\x48\x38\x08\xa0\x32\x9b\x18\x44\x86\x0b\x6a\xc1\xaa\x26\x96\x2d\x96\x3c\xa0\x54\x65\x73\xe3\x08\xb5\x8b\x99\xbd\x82\xbc\x9e\xc2\xe8\x53\x46\x83\x3f\x33\x54\x2b\x5b\xad\x92\x79\xd9\x8f\x5d\x93\x98\xf2\xe6\xc6\x1c\xe6\x9a\x9e\xfc\x43\x82\x31\x66\x8e\x53\x77\xfe\x90\xe7\xf3\xf6\xe9\x62\x23\x3f\x10\x93\x18\xae\x72\x1a\x9d\xf9\x48\xcb\xcc\x5a\x65\xc7\x4a\x04\xf0\xf3\xd5\xd5\x05\x8a\x41\x08\xbc\x86\x86\x43\x51\x6c\xe0\x46\x57\xf6\x44\x40\x0d\xfb\xff\xa2\xc3\x7c\x3d\x39\x84\xdc\x09\x22\x64\x4f\x12\xd9\xba\xaa\xf6\xe3\xbd\x56\xdd\x91\x25\x6a\x14\x9c\x89\x34\x8e\x31\xdf\xee\x15\x7e\x2f\x39\x81\x15\x2a\x28\x95\x66\x51\xf5\xfd\x83\xc5\xfe\x15\x07\xcf\xf7\x08\xee\x1d\x8e\xb6\xc5\x52\xcc\x8c\x5a\x93\x66\xc5\xd8\x79\x38\x46\xd6\xa7\x88\x37\xc9\x2e\xe3\xd2\xa5\x7b\x4b\x3a\xdc\xa1\xdc\x9e\x29\xf1\x8c\x8a\x99\x16\x47\x8d\xd4\x78\x8b\xf6\x1c\xe9\x71\x54\x1b\x69\xa8\x4a\x93\x37\xe5\xb2\x2c\x4f\x0c\x92\xab\xa0\x73\x32\x72\x59\xd3\xf0\x2d\x8d\xed\xca\x37\x16\x19\x9e\xdb\x1c\xab\x17\x49\xc3\x0f\x37\xdc\x88\xb1\xb4\xd4\x42\xcb\x58\x5e\x6a\x52\x0b\x15\x10\x0a\xb0\x04\xe7\xf8\x58\x32\x16\x01\xa6\xcd\x01\xb2\xc2\x69\x24\x35\x38\x6f\x30\x6a\xae\x1b\xb4\x71\xaa\xad\x1d\xa0\xd6\x20\x2d\x8b\x3c\xc6\x82\x62\x27\x34\x6d\x15\x84\x7b\x43\xb1\x35\x78\xa6\x24\x77\x28\xc1\x6e\xfc\xe9\x48\x74\xf4\x15\xe3\xe1\x84\x42\x88\x40\x7a\x26\x49\x3b\x48\xb1\xa4\x19\x8e\x0c\xa7\xb5\x01\x6c\x0c\x97\x61\x8a\xc2\x32\xd8\x8c\x44\x69\x24\xbf\x65\x1d\x74\xd6\xe5\x44\xef\xec\x48\x5e\xb7\x8a\xa3\x29\x8e\x41\x64\xce\x1f\x88\xdc\x00\x47\x4b\x40\x98\x6e\xd1\x0d\x8e\x48\x98\x63\x5c\x21\xb1\x4c\x05\x0a\x58\x98\xc5\x6d\x4f\x0a\x77\x53\x4f\x8b\xc4\x44\x1f\xb2\xdf\x8d\x3b\xea\x9f\xfe\xf6\xf2\xc5\xff\x5d\x7f\xfe\x9f\xfb\x67\x8f\xff\xf3\xe9\x69\xd1\xfe\xb3\xc7\xfd\x3c\xf8\x3f\x71\x94\x82\x23\xd1\x72\x00\xb7\x42\x99\x6c\xc0\x60\x7b\x0f\x79\xea\xa8\x53\x4b\x56\x31\xfa\x0b\x52\x9f\x96\xdb\xcd\x2f\xd7\x67\xcd\x04\x19\x85\xfe\xdb\x02\x9a\x59\x03\xad\x63\x3c\xea\xff\x2e\x18\xfd\x00\xd9\xe2\x56\x60\x59\x93\xb9\xb6\xb2\x3e\x3c\x2c\xab\x0f\xa7\xb2\x89\x43\xc7\xf6\xd5\xce\x2e\xad\xa6\xa9\xed\xa6\xc6\x5a\xb4\xa6\x67\xdf\x8c\x26\x7b\x50\x5a\x91\x08\x2e\x6d\xd4\x3a\xc1\x9d\xf2\xdb\xde\x1e\xb2\x2c\x6c\xa5\x64\xc9\x16\xb4\x90\xaa\x4a\xb7\x0c\xde\x13\xc3\x2a\x9a\x11\x9b\x7a\x1b\x3d\x95\x97\x37\x31\x6b\x69\x7e\x34\xc0\x67\x1f\x66\x19\x49\xef\xf1\x25\xf5\xac\x0e\xea\x0a\x28\x8d\x4d\x7e\xd9\x57\x4b\x49\xe5\xc6\xb3\x25\xfd\xe6\x57\x42\x25\xac\xcd\xcf\x36\x74\x8e\xca\x24\x47\xe7\x80\xa8\x92\x72\xbd\x3d\x84\x2d\x65\xe2\x82\x1a\x9c\xc4\x44\x92\x1b\x10\x79\x8a\xc4\x4a\x2f\x60\x51\x04\x81\xaa\xf0\xa3\x95\x27\xd7\x12\x7b\xa3\x96\x03\x45\x96\xc1\x8a\x07\xc9\xb2\xb0\x95\x52\x8c\xef\x48\x9c\xc6\x7e\x94\xca\xc2\x0e\x07\x12\x44\xa9\x20\x37\xf0\xae\x0f\x49\xa3\x96\x9d\x4b\x42\x7b\x70\x59\x14\xee\xe0\xb2\x0f\x49\xa3\x96\x4b\x97\xbf\x00\x5d\x4b\x4f\xfc\xbb\x2b\xee\x92\xb9\x17\xb5\xaa\xb8\x0b\x97\x17\x9b\x43\xfd\xd6\xc2\xb2\xc2\x2e\x29\xcf\xfd\x87\x4a\x55\xda\x25\x63\x1f\x5a\x65\x69\x2b\x2d\x3d\x67\xe9\x41\xae\x5e\xc1\x6e\x2b\xd4\xdb\x3e\xa8\xd3\x26\xd2\x48\x92\x24\xca\x61\x86\x8f\x8c\xbb\xf2\x8e\x91\xdf\x1f\x06\x19\x33\xf3\x03\x4d\xba\xcd\xe2\x2d\xfb\x69\xe9\x16\x15\x13\xd5\x56\x85\x4e\x3c\x5b\x8a\xbf\x25\x72\x83\xee\x5e\x20\x22\xf2\xc8\xaa\x7b\xdb\x8e\xe4\x29\x58\xca\x38\xb7\x3f\x2e\x59\xb8\xbd\xa8\x16\x16\xf7\xdb\x79\x51\x9f\x5a\xb4\x8d\x87\x3a\x6e\xbc\x3e\xc5\xb4\xcd\x58\xf9\xf5\x3c\xb9\x6f\x49\xaf\x57\xc1\xfa\x1c\x5d\x6d\x88\x8a\x8b\xd3\x28\xcc\xb7\xef\x10\x8a\x4a\x74\xa9\x4a\xa7\x62\xbf\x0d\x76\x23\x6f\x59\xd9\x31\xee\x40\x11\xfb\x28\xec\x8d\x22\x1c\x13\x5a\x64\x94\x23\x16\x60\xbb\xd2\x7c\xa0\x98\xb2\xe5\x6e\xbc\x54\x33\xe0\x3e\xb9\x52\x17\xdb\xb7\x1b\xc8\x12\x20\x8c\x23\xca\x64\x7e\x78\xa3\x62\x5b\x75\x56\xd9\x9e\x2a\x91\x27\xb0\x70\x34\x1f\x90\x89\xb5\x86\x73\x7e\x71\xda\x1e\xfb\x3a\x72\xdc\x5e\x79\x88\xcb\x74\x79\xd9\x64\xe4\xd4\xc2\x9e\xce\xb1\xfe\x85\x5a\xc0\xe9\x0c\x34\x3d\xd0\x43\xce\xa1\x36\x39\xd5\xa1\x4e\xf5\xf8\xb1\xa9\x23\x08\x75\x84\xac\x53\x6c\x3a\xc5\xa6\x53\x6c\x3a\xc5\xa6\x7f\xc5\xd8\xf4\x51\xfd\xff\x25\x4e\xfa\x33\x05\xbe\x9d\x60\xd2\x04\x93\x6a\x5f\x33\x9b\x98\x50\xd2\xe1\x50\x52\xc6\xcc\xdb\x38\x91\xdb\xe6\xaa\xa2\x8f\xa1\x6a\xa6\xd4\xc6\x56\xd6\x8c\x40\x02\x68\x48\xe8\x1a\xe1\x9a\xd9\x2e\xb7\x05\xc3\x34\xda\x2a\xbb\xcd\x12\x36\x98\x22\x50\x4c\xa1\x1b\xc5\xd5\x84\xf0\xbe\x24\x84\xf7\x2f\x22\x37\xef\x94\xd7\x9f\xa0\xde\x04\xf5\x26\xa8\x37\x41\x3d\x64\x40\x3d\xe5\xf2\xde\x60\x89\x27\xb4\x37\xa1\xbd\xda\xd7\xd2\x2c\x26\xc0\x37\x01\x3e\x1b\xef\x5f\x06\xe0\x6b\x7c\x5c\x91\x08\x26\x10\x38\x81\xc0\x09\x04\x76\x4a\x3d\x81\xc0\xbf\x12\x08\x4c\xb0\xdc\x7c\x99\x00\xd0\x75\x70\xb4\xf8\x5a\x7c\xea\xde\x3e\x39\x08\x30\x5a\x27\x35\xed\xb4\x65\xad\x69\x74\x10\x88\x79\xe2\x30\x52\x19\xd6\x04\x21\xa7\x95\xd5\x0e\x03\xf8\xda\x20\xd7\x84\xb4\x26\xa4\x35\x21\xad\x09\x69\x21\x03\x69\x51\x46\xff\xff\x18\x9b\x54\xed\x87\x47\x06\x9d\x4e\x73\x6e\x9a\xb3\xa9\xce\x83\x5e\x4b\xc6\x71\x20\x45\xd7\x72\xf5\x40\x72\x0e\x34\x6c\xf4\x6c\xf3\xba\x5e\x4b\x97\x0e\x52\xb8\xbe\x8b\x79\xa0\x10\x86\xa1\x75\xb0\x6f\xec\xc8\xf4\x3d\x4d\x7b\x86\xc2\x02\x31\x12\x51\xbf\x07\x94\xad\x10\xd6\x2e\x79\xcf\xe9\x1c\xf5\x1e\x31\x23\x5c\x18\xfb\x9c\xfb\x70\xe0\x62\xbd\xf7\xb5\x94\xcf\xf3\xf6\xfa\xc5\x4e\x9c\x85\x76\x1d\xae\x37\xbc\xde\xa3\x41\xcb\x29\xd0\x5e\x70\x67\x50\x93\x6d\x98\xa8\xd3\x67\x0f\x68\xb1\xeb\x38\x47\x07\x10\x1b\xd2\xe2\x18\x68\x6d\x40\xbb\xa3\x40\xba\x21\xf2\x8e\x81\xfb\xf6\x92\x77\x2f\x70\xe8\xdb\xb2\x36\xbf\x30\x91\xc5\x21\xe7\x45\xcc\x34\x0c\x48\x8e\xd0\xf2\x9b\x7c\x3c\xbd\x1c\x04\x3e\x07\xe8\x7c\x2f\x84\x7a\x48\x4d\x1f\xba\xe1\x76\x45\x7b\x60\xe0\x01\xca\xee\x04\xca\x31\xbe\x73\x5f\xa3\x70\x0c\xad\x1f\xa5\xf5\x76\xd5\xbb\xd2\x7e\xfb\x30\x90\xcf\xfa\x67\x7a\xe6\xc3\x37\x42\x19\xe2\xc9\x9c\x61\x4c\xe7\xd1\x77\x55\x86\x6e\x8f\x7b\x85\x42\x33\xa3\xaa\x57\xae\xfd\xd5\xcc\x9c\x56\x68\xe2\xde\x0e\xa8\x2c\xa9\xb0\x7d\xf0\x54\x2d\x80\xf2\x48\x39\x3d\x98\x1a\x6d\x0b\x9d\xba\x53\xfb\xce\xf8\xd1\x7e\xbb\x60\x4f\x06\xf5\xce\xda\xab\xeb\xca\xcb\xd5\xac\x20\xda\x72\x3b\xa2\x4b\x38\xd7\xb5\x89\xbe\x42\xd9\xb9\x73\xc4\x0c\x6d\xb7\xd9\xf8\x8d\xbd\x3e\x9c\xf5\x53\x68\x48\x14\x36\x8f\x09\xc5\x92\xf1\x21\xd1\x09\x07\x1c\xbe\xa7\x91\xf3\x6a\xc8\xc1\x57\xb0\xdd\xc5\xc6\x1d\xad\x76\x1d\xa8\x82\x0e\x4c\x38\xfe\xa5\x8c\xc5\x0a\x40\x5d\xa1\xbb\x98\xd1\xfb\x74\x61\xed\x1a\x98\xaf\x3c\x8c\x1e\xe3\xc2\x92\x29\x74\x3e\x99\xd0\xf9\x41\x50\xd0\x38\x4b\x57\x7e\x5b\x7a\x0e\xe6\xce\x4e\xd7\x19\x35\x57\xbb\x3c\x3c\xd2\x5e\x4f\x4b\x4c\xf7\x0f\x4d\x2b\x91\x5d\x94\xa6\x95\xc8\x69\x25\x72\x5a\x89\x7c\xb8\x95\xc8\x07\x80\x8c\xda\x9c\x64\x7b\xb7\x71\xdf\x57\x12\x4b\x9a\x1f\x72\x0c\x13\x03\xad\x3c\xd5\x4e\xde\x8e\x57\x13\x6d\x34\x86\xcf\x97\xe6\xa4\x68\xc4\xb0\xf6\xc9\xc2\xeb\x8d\x0b\xd7\xcd\xfe\xba\xa6\xf5\x30\xeb\x30\x33\xbe\xc7\x56\x27\xab\x08\xd9\x6d\xbb\x09\xee\x7c\x2d\xcf\xee\x87\x38\xac\xc8\xdd\x90\x9a\x58\x4a\x4e\x96\xa9\x79\x79\xf3\xde\x20\xf0\x96\xe3\x24\x19\xeb\xba\xf2\x53\x19\xab\x12\xaf\x47\xb3\xa0\x3e\xef\x9b\x8d\x6d\x6d\x7b\xde\x3b\x3b\x1a\xc0\x3f\x95\x7e\xed\x78\xfb\x76\xb8\xaf\xb3\xdd\xc5\xeb\x95\xed\x5a\x62\x41\x82\xb3\x54\x6e\x80\x4a\x92\x6f\x36\xbd\x34\xae\xde\x6f\xa4\xc0\xbc\x08\xe3\x84\xfc\x1d\xb6\xe3\xd0\x62\x38\x95\x9b\x57\xe7\x71\x12\x91\x80\xc8\x31\x69\x5e\x60\x21\x6e\x19\x0f\xc7\xa4\x79\x96\x28\x3e\x47\x54\x65\x41\x36\x08\x40\x88\x1f\x58\x08\x56\xaa\xd5\xbf\xaf\xad\x96\xd7\xd6\xcf\x87\xf5\x34\x0f\x71\x93\x6e\x26\xed\x98\x5b\x9f\x4f\xcf\x95\x34\xc6\xd7\x11\xfa\xb0\x81\x22\x1a\xdb\xdf\x8e\xdc\xc3\xb9\xf8\xdd\x5d\x3c\x74\xe6\xea\xb7\x8b\xbf\xf5\x6e\xb3\x46\x2e\x64\xf4\xab\x3c\x4e\xcf\x36\x1d\xfe\xfa\xb8\x36\xba\x8a\xd8\xad\xf6\xc6\x41\x2a\x37\x8c\x17\x0f\xda\xfe\xda\xe7\x65\xbc\x71\x2c\x36\x57\x8a\x47\x12\x4c\xf1\xbd\x77\x6b\xa4\x50\x7e\x77\x7b\x22\x60\x89\xef\xcd\xf5\xb9\x0c\x97\x79\x0d\x2b\x35\x43\xcb\x3d\x24\xf1\x78\xfc\xf8\xcb\x1f\x15\x06\xe2\x78\xd8\x51\x21\xd9\x1f\xf0\xf5\x8f\x86\xa4\x50\xfa\xb1\x47\x43\xa5\xdd\x69\x14\xe8\xa3\xc0\x86\x91\xa7\x81\x50\xb4\x7c\xc0\x81\x80\x77\x7a\x9f\xc6\xc2\xa9\x8c\x05\x33\xb0\x3b\x31\xa4\xf4\xd7\x1b\x26\x55\x97\x7c\x65\xf8\x69\x1a\x84\x8e\x41\x78\xd9\xec\xc5\x11\x16\x1e\x74\x91\xf5\x56\xf5\x57\x49\x47\x5c\x92\xa9\x1e\x99\x36\xf4\xdb\xb1\x0e\xd3\x78\x02\xb0\x9b\x25\xcb\xe9\xe9\x1d\x0d\x44\x01\x42\x08\x91\x64\xd9\xdd\x37\x08\x17\xef\xf9\xe5\x0f\xbd\x46\x91\xf5\xf9\x89\x92\x37\xdd\x89\x59\x44\x1f\x9c\xee\x34\x1e\xbe\x47\x83\x32\x72\x8e\x37\xdf\xac\x69\x38\xef\x75\xb0\xda\xdb\xac\x83\x94\x2f\x39\xa6\x62\x05\x1c\x25\x9c\x49\x16\xb0\xa8\x3c\xc7\x7e\x76\x71\x3e\x6f\xb5\x24\xe7\xe8\xb7\xb9\xc7\x6c\x43\x92\xee\x21\xd4\x17\xa1\x7f\xba\x35\xfe\xae\x39\xbc\xde\xba\x69\xd9\x8e\xe1\x62\xde\x64\x7d\x16\x88\x1b\xed\x29\x11\xfd\x4f\xa9\xff\x99\x90\xc4\xf6\xf4\xf9\x6e\xe9\x28\x23\xd7\xca\xe5\xee\xee\x9f\x63\xb1\x5b\xfb\x10\xd7\x2f\x1d\xf2\xe3\xbf\xb9\xb5\x6f\xa4\x6d\x7d\x25\x79\xfb\x24\x31\xea\x56\xbe\x5d\x53\xcd\x2d\x36\xa3\x6d\xdf\xab\x1c\xb8\x6d\x6f\xc0\x98\xa7\xdd\xaa\x86\x8c\x1d\x39\xa3\x9d\x70\x2b\x9b\x68\xd9\xfd\x33\xfe\xa9\xb6\x4a\x2e\x63\x0f\xcf\x68\x27\xd9\x4c\xb9\x46\x6d\xcb\xbe\xa1\xa8\xd6\x5f\xc6\xd6\x9f\xf1\x4f\xf4\xd4\xb4\x78\xd0\xd6\xf4\x13\x3c\x3b\xac\xd0\xdc\x90\x34\xda\xc9\xb4\x9a\x1a\x8d\xbd\x93\x87\xd4\xe2\x21\x1b\xb3\x2b\xd1\xbe\xe7\x69\xd4\x53\x67\xd5\x40\xa0\xe3\x19\x3f\x6d\x1a\xbc\x0e\x86\x3c\x10\xb4\x3d\x2a\xcd\x78\x32\xe6\xab\xbd\x36\xc9\xf4\x3a\x58\xae\xc3\xf4\x47\xea\xbf\xfb\x47\xff\x0d\x00\x00\xff\xff\xd2\x32\x5a\x28\x38\x9d\x00\x00") + +func v2SchemaJsonBytes() ([]byte, error) { + return bindataRead( + _v2SchemaJson, + "v2/schema.json", + ) +} + +func v2SchemaJson() (*asset, error) { + bytes, err := v2SchemaJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "v2/schema.json", size: 40248, mode: os.FileMode(0640), modTime: time.Unix(1568964748, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x88, 0x5e, 0xf, 0xbf, 0x17, 0x74, 0x0, 0xb2, 0x5a, 0x7f, 0xbc, 0x58, 0xcd, 0xc, 0x25, 0x73, 0xd5, 0x29, 0x1c, 0x7a, 0xd0, 0xce, 0x79, 0xd4, 0x89, 0x31, 0x27, 0x90, 0xf2, 0xff, 0xe6}} + return a, nil +} + +// Asset loads and returns the asset for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func Asset(name string) ([]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) + } + return a.bytes, nil + } + return nil, fmt.Errorf("Asset %s not found", name) +} + +// AssetString returns the asset contents as a string (instead of a []byte). +func AssetString(name string) (string, error) { + data, err := Asset(name) + return string(data), err +} + +// MustAsset is like Asset but panics when Asset would return an error. +// It simplifies safe initialization of global variables. +func MustAsset(name string) []byte { + a, err := Asset(name) + if err != nil { + panic("asset: Asset(" + name + "): " + err.Error()) + } + + return a +} + +// MustAssetString is like AssetString but panics when Asset would return an +// error. It simplifies safe initialization of global variables. +func MustAssetString(name string) string { + return string(MustAsset(name)) +} + +// AssetInfo loads and returns the asset info for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func AssetInfo(name string) (os.FileInfo, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) + } + return a.info, nil + } + return nil, fmt.Errorf("AssetInfo %s not found", name) +} + +// AssetDigest returns the digest of the file with the given name. It returns an +// error if the asset could not be found or the digest could not be loaded. +func AssetDigest(name string) ([sha256.Size]byte, error) { + canonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[canonicalName]; ok { + a, err := f() + if err != nil { + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s can't read by error: %v", name, err) + } + return a.digest, nil + } + return [sha256.Size]byte{}, fmt.Errorf("AssetDigest %s not found", name) +} + +// Digests returns a map of all known files and their checksums. +func Digests() (map[string][sha256.Size]byte, error) { + mp := make(map[string][sha256.Size]byte, len(_bindata)) + for name := range _bindata { + a, err := _bindata[name]() + if err != nil { + return nil, err + } + mp[name] = a.digest + } + return mp, nil +} + +// AssetNames returns the names of the assets. +func AssetNames() []string { + names := make([]string, 0, len(_bindata)) + for name := range _bindata { + names = append(names, name) + } + return names +} + +// _bindata is a table, holding each asset generator, mapped to its name. +var _bindata = map[string]func() (*asset, error){ + "jsonschema-draft-04.json": jsonschemaDraft04Json, + + "v2/schema.json": v2SchemaJson, +} + +// AssetDir returns the file names below a certain +// directory embedded in the file by go-bindata. +// For example if you run go-bindata on data/... and data contains the +// following hierarchy: +// data/ +// foo.txt +// img/ +// a.png +// b.png +// then AssetDir("data") would return []string{"foo.txt", "img"}, +// AssetDir("data/img") would return []string{"a.png", "b.png"}, +// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and +// AssetDir("") will return []string{"data"}. +func AssetDir(name string) ([]string, error) { + node := _bintree + if len(name) != 0 { + canonicalName := strings.Replace(name, "\\", "/", -1) + pathList := strings.Split(canonicalName, "/") + for _, p := range pathList { + node = node.Children[p] + if node == nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + } + } + if node.Func != nil { + return nil, fmt.Errorf("Asset %s not found", name) + } + rv := make([]string, 0, len(node.Children)) + for childName := range node.Children { + rv = append(rv, childName) + } + return rv, nil +} + +type bintree struct { + Func func() (*asset, error) + Children map[string]*bintree +} + +var _bintree = &bintree{nil, map[string]*bintree{ + "jsonschema-draft-04.json": &bintree{jsonschemaDraft04Json, map[string]*bintree{}}, + "v2": &bintree{nil, map[string]*bintree{ + "schema.json": &bintree{v2SchemaJson, map[string]*bintree{}}, + }}, +}} + +// RestoreAsset restores an asset under the given directory. +func RestoreAsset(dir, name string) error { + data, err := Asset(name) + if err != nil { + return err + } + info, err := AssetInfo(name) + if err != nil { + return err + } + err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) + if err != nil { + return err + } + err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + if err != nil { + return err + } + return os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) +} + +// RestoreAssets restores an asset under the given directory recursively. +func RestoreAssets(dir, name string) error { + children, err := AssetDir(name) + // File + if err != nil { + return RestoreAsset(dir, name) + } + // Dir + for _, child := range children { + err = RestoreAssets(dir, filepath.Join(name, child)) + if err != nil { + return err + } + } + return nil +} + +func _filePath(dir, name string) string { + canonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(canonicalName, "/")...)...) +} diff --git a/vendor/github.com/go-openapi/spec/cache.go b/vendor/github.com/go-openapi/spec/cache.go new file mode 100644 index 00000000000..3fada0daef1 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/cache.go @@ -0,0 +1,60 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import "sync" + +// ResolutionCache a cache for resolving urls +type ResolutionCache interface { + Get(string) (interface{}, bool) + Set(string, interface{}) +} + +type simpleCache struct { + lock sync.RWMutex + store map[string]interface{} +} + +// Get retrieves a cached URI +func (s *simpleCache) Get(uri string) (interface{}, bool) { + debugLog("getting %q from resolution cache", uri) + s.lock.RLock() + v, ok := s.store[uri] + debugLog("got %q from resolution cache: %t", uri, ok) + + s.lock.RUnlock() + return v, ok +} + +// Set caches a URI +func (s *simpleCache) Set(uri string, data interface{}) { + s.lock.Lock() + s.store[uri] = data + s.lock.Unlock() +} + +var resCache ResolutionCache + +func init() { + resCache = initResolutionCache() +} + +// initResolutionCache initializes the URI resolution cache +func initResolutionCache() ResolutionCache { + return &simpleCache{store: map[string]interface{}{ + "http://swagger.io/v2/schema.json": MustLoadSwagger20Schema(), + "http://json-schema.org/draft-04/schema": MustLoadJSONSchemaDraft04(), + }} +} diff --git a/vendor/github.com/go-openapi/spec/contact_info.go b/vendor/github.com/go-openapi/spec/contact_info.go new file mode 100644 index 00000000000..f9bf42e8dd8 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/contact_info.go @@ -0,0 +1,54 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/swag" +) + +// ContactInfo contact information for the exposed API. +// +// For more information: http://goo.gl/8us55a#contactObject +type ContactInfo struct { + ContactInfoProps + VendorExtensible +} + +type ContactInfoProps struct { + Name string `json:"name,omitempty"` + URL string `json:"url,omitempty"` + Email string `json:"email,omitempty"` +} + +func (c *ContactInfo) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &c.ContactInfoProps); err != nil { + return err + } + return json.Unmarshal(data, &c.VendorExtensible) +} + +func (c ContactInfo) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(c.ContactInfoProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(c.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} diff --git a/vendor/github.com/go-openapi/spec/debug.go b/vendor/github.com/go-openapi/spec/debug.go new file mode 100644 index 00000000000..389c528ff61 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/debug.go @@ -0,0 +1,47 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "fmt" + "log" + "os" + "path/filepath" + "runtime" +) + +var ( + // Debug is true when the SWAGGER_DEBUG env var is not empty. + // It enables a more verbose logging of this package. + Debug = os.Getenv("SWAGGER_DEBUG") != "" + // specLogger is a debug logger for this package + specLogger *log.Logger +) + +func init() { + debugOptions() +} + +func debugOptions() { + specLogger = log.New(os.Stdout, "spec:", log.LstdFlags) +} + +func debugLog(msg string, args ...interface{}) { + // A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog() + if Debug { + _, file1, pos1, _ := runtime.Caller(1) + specLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...)) + } +} diff --git a/vendor/github.com/go-openapi/spec/expander.go b/vendor/github.com/go-openapi/spec/expander.go new file mode 100644 index 00000000000..043720d7d8e --- /dev/null +++ b/vendor/github.com/go-openapi/spec/expander.go @@ -0,0 +1,651 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "strings" +) + +// ExpandOptions provides options for spec expand +type ExpandOptions struct { + RelativeBase string + SkipSchemas bool + ContinueOnError bool + AbsoluteCircularRef bool +} + +// ResolveRefWithBase resolves a reference against a context root with preservation of base path +func ResolveRefWithBase(root interface{}, ref *Ref, opts *ExpandOptions) (*Schema, error) { + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return nil, err + } + specBasePath := "" + if opts != nil && opts.RelativeBase != "" { + specBasePath, _ = absPath(opts.RelativeBase) + } + + result := new(Schema) + if err := resolver.Resolve(ref, result, specBasePath); err != nil { + return nil, err + } + return result, nil +} + +// ResolveRef resolves a reference against a context root +// ref is guaranteed to be in root (no need to go to external files) +// ResolveRef is ONLY called from the code generation module +func ResolveRef(root interface{}, ref *Ref) (*Schema, error) { + res, _, err := ref.GetPointer().Get(root) + if err != nil { + panic(err) + } + switch sch := res.(type) { + case Schema: + return &sch, nil + case *Schema: + return sch, nil + case map[string]interface{}: + b, _ := json.Marshal(sch) + newSch := new(Schema) + _ = json.Unmarshal(b, newSch) + return newSch, nil + default: + return nil, fmt.Errorf("unknown type for the resolved reference") + } +} + +// ResolveParameter resolves a parameter reference against a context root +func ResolveParameter(root interface{}, ref Ref) (*Parameter, error) { + return ResolveParameterWithBase(root, ref, nil) +} + +// ResolveParameterWithBase resolves a parameter reference against a context root and base path +func ResolveParameterWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Parameter, error) { + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return nil, err + } + + result := new(Parameter) + if err := resolver.Resolve(&ref, result, ""); err != nil { + return nil, err + } + return result, nil +} + +// ResolveResponse resolves response a reference against a context root +func ResolveResponse(root interface{}, ref Ref) (*Response, error) { + return ResolveResponseWithBase(root, ref, nil) +} + +// ResolveResponseWithBase resolves response a reference against a context root and base path +func ResolveResponseWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Response, error) { + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return nil, err + } + + result := new(Response) + if err := resolver.Resolve(&ref, result, ""); err != nil { + return nil, err + } + return result, nil +} + +// ResolveItems resolves parameter items reference against a context root and base path. +// +// NOTE: stricly speaking, this construct is not supported by Swagger 2.0. +// Similarly, $ref are forbidden in response headers. +func ResolveItems(root interface{}, ref Ref, opts *ExpandOptions) (*Items, error) { + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return nil, err + } + basePath := "" + if opts.RelativeBase != "" { + basePath = opts.RelativeBase + } + result := new(Items) + if err := resolver.Resolve(&ref, result, basePath); err != nil { + return nil, err + } + return result, nil +} + +// ResolvePathItem resolves response a path item against a context root and base path +func ResolvePathItem(root interface{}, ref Ref, opts *ExpandOptions) (*PathItem, error) { + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return nil, err + } + basePath := "" + if opts.RelativeBase != "" { + basePath = opts.RelativeBase + } + result := new(PathItem) + if err := resolver.Resolve(&ref, result, basePath); err != nil { + return nil, err + } + return result, nil +} + +// ExpandSpec expands the references in a swagger spec +func ExpandSpec(spec *Swagger, options *ExpandOptions) error { + resolver, err := defaultSchemaLoader(spec, options, nil, nil) + // Just in case this ever returns an error. + if resolver.shouldStopOnError(err) { + return err + } + + // getting the base path of the spec to adjust all subsequent reference resolutions + specBasePath := "" + if options != nil && options.RelativeBase != "" { + specBasePath, _ = absPath(options.RelativeBase) + } + + if options == nil || !options.SkipSchemas { + for key, definition := range spec.Definitions { + var def *Schema + var err error + if def, err = expandSchema(definition, []string{fmt.Sprintf("#/definitions/%s", key)}, resolver, specBasePath); resolver.shouldStopOnError(err) { + return err + } + if def != nil { + spec.Definitions[key] = *def + } + } + } + + for key := range spec.Parameters { + parameter := spec.Parameters[key] + if err := expandParameterOrResponse(¶meter, resolver, specBasePath); resolver.shouldStopOnError(err) { + return err + } + spec.Parameters[key] = parameter + } + + for key := range spec.Responses { + response := spec.Responses[key] + if err := expandParameterOrResponse(&response, resolver, specBasePath); resolver.shouldStopOnError(err) { + return err + } + spec.Responses[key] = response + } + + if spec.Paths != nil { + for key := range spec.Paths.Paths { + path := spec.Paths.Paths[key] + if err := expandPathItem(&path, resolver, specBasePath); resolver.shouldStopOnError(err) { + return err + } + spec.Paths.Paths[key] = path + } + } + + return nil +} + +// baseForRoot loads in the cache the root document and produces a fake "root" base path entry +// for further $ref resolution +func baseForRoot(root interface{}, cache ResolutionCache) string { + // cache the root document to resolve $ref's + const rootBase = "root" + if root != nil { + base, _ := absPath(rootBase) + normalizedBase := normalizeAbsPath(base) + debugLog("setting root doc in cache at: %s", normalizedBase) + if cache == nil { + cache = resCache + } + cache.Set(normalizedBase, root) + return rootBase + } + return "" +} + +// ExpandSchema expands the refs in the schema object with reference to the root object +// go-openapi/validate uses this function +// notice that it is impossible to reference a json schema in a different file other than root +func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error { + opts := &ExpandOptions{ + // when a root is specified, cache the root as an in-memory document for $ref retrieval + RelativeBase: baseForRoot(root, cache), + SkipSchemas: false, + ContinueOnError: false, + // when no base path is specified, remaining $ref (circular) are rendered with an absolute path + AbsoluteCircularRef: true, + } + return ExpandSchemaWithBasePath(schema, cache, opts) +} + +// ExpandSchemaWithBasePath expands the refs in the schema object, base path configured through expand options +func ExpandSchemaWithBasePath(schema *Schema, cache ResolutionCache, opts *ExpandOptions) error { + if schema == nil { + return nil + } + + var basePath string + if opts.RelativeBase != "" { + basePath, _ = absPath(opts.RelativeBase) + } + + resolver, err := defaultSchemaLoader(nil, opts, cache, nil) + if err != nil { + return err + } + + refs := []string{""} + var s *Schema + if s, err = expandSchema(*schema, refs, resolver, basePath); err != nil { + return err + } + *schema = *s + return nil +} + +func expandItems(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) { + if target.Items != nil { + if target.Items.Schema != nil { + t, err := expandSchema(*target.Items.Schema, parentRefs, resolver, basePath) + if err != nil { + return nil, err + } + *target.Items.Schema = *t + } + for i := range target.Items.Schemas { + t, err := expandSchema(target.Items.Schemas[i], parentRefs, resolver, basePath) + if err != nil { + return nil, err + } + target.Items.Schemas[i] = *t + } + } + return &target, nil +} + +func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) { + if target.Ref.String() == "" && target.Ref.IsRoot() { + // normalizing is important + newRef := normalizeFileRef(&target.Ref, basePath) + target.Ref = *newRef + return &target, nil + + } + + // change the base path of resolution when an ID is encountered + // otherwise the basePath should inherit the parent's + // important: ID can be relative path + if target.ID != "" { + debugLog("schema has ID: %s", target.ID) + // handling the case when id is a folder + // remember that basePath has to be a file + refPath := target.ID + if strings.HasSuffix(target.ID, "/") { + // path.Clean here would not work correctly if basepath is http + refPath = fmt.Sprintf("%s%s", refPath, "placeholder.json") + } + basePath = normalizePaths(refPath, basePath) + } + + var t *Schema + // if Ref is found, everything else doesn't matter + // Ref also changes the resolution scope of children expandSchema + if target.Ref.String() != "" { + // here the resolution scope is changed because a $ref was encountered + normalizedRef := normalizeFileRef(&target.Ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() + + if resolver.isCircular(normalizedRef, basePath, parentRefs...) { + // this means there is a cycle in the recursion tree: return the Ref + // - circular refs cannot be expanded. We leave them as ref. + // - denormalization means that a new local file ref is set relative to the original basePath + debugLog("shortcut circular ref: basePath: %s, normalizedPath: %s, normalized ref: %s", + basePath, normalizedBasePath, normalizedRef.String()) + if !resolver.options.AbsoluteCircularRef { + target.Ref = *denormalizeFileRef(normalizedRef, normalizedBasePath, resolver.context.basePath) + } else { + target.Ref = *normalizedRef + } + return &target, nil + } + + debugLog("basePath: %s: calling Resolve with target: %#v", basePath, target) + if err := resolver.Resolve(&target.Ref, &t, basePath); resolver.shouldStopOnError(err) { + return nil, err + } + + if t != nil { + parentRefs = append(parentRefs, normalizedRef.String()) + var err error + transitiveResolver, err := resolver.transitiveResolver(basePath, target.Ref) + if transitiveResolver.shouldStopOnError(err) { + return nil, err + } + + basePath = resolver.updateBasePath(transitiveResolver, normalizedBasePath) + + return expandSchema(*t, parentRefs, transitiveResolver, basePath) + } + } + + t, err := expandItems(target, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + target = *t + } + + for i := range target.AllOf { + t, err := expandSchema(target.AllOf[i], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + target.AllOf[i] = *t + } + for i := range target.AnyOf { + t, err := expandSchema(target.AnyOf[i], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + target.AnyOf[i] = *t + } + for i := range target.OneOf { + t, err := expandSchema(target.OneOf[i], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + target.OneOf[i] = *t + } + } + if target.Not != nil { + t, err := expandSchema(*target.Not, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + *target.Not = *t + } + } + for k := range target.Properties { + t, err := expandSchema(target.Properties[k], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + target.Properties[k] = *t + } + } + if target.AdditionalProperties != nil && target.AdditionalProperties.Schema != nil { + t, err := expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + *target.AdditionalProperties.Schema = *t + } + } + for k := range target.PatternProperties { + t, err := expandSchema(target.PatternProperties[k], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + target.PatternProperties[k] = *t + } + } + for k := range target.Dependencies { + if target.Dependencies[k].Schema != nil { + t, err := expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + *target.Dependencies[k].Schema = *t + } + } + } + if target.AdditionalItems != nil && target.AdditionalItems.Schema != nil { + t, err := expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + *target.AdditionalItems.Schema = *t + } + } + for k := range target.Definitions { + t, err := expandSchema(target.Definitions[k], parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return &target, err + } + if t != nil { + target.Definitions[k] = *t + } + } + return &target, nil +} + +func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string) error { + if pathItem == nil { + return nil + } + + parentRefs := []string{} + if err := resolver.deref(pathItem, parentRefs, basePath); resolver.shouldStopOnError(err) { + return err + } + if pathItem.Ref.String() != "" { + transitiveResolver, err := resolver.transitiveResolver(basePath, pathItem.Ref) + if transitiveResolver.shouldStopOnError(err) { + return err + } + basePath = transitiveResolver.updateBasePath(resolver, basePath) + resolver = transitiveResolver + } + pathItem.Ref = Ref{} + + for idx := range pathItem.Parameters { + if err := expandParameterOrResponse(&(pathItem.Parameters[idx]), resolver, basePath); resolver.shouldStopOnError(err) { + return err + } + } + ops := []*Operation{ + pathItem.Get, + pathItem.Head, + pathItem.Options, + pathItem.Put, + pathItem.Post, + pathItem.Patch, + pathItem.Delete, + } + for _, op := range ops { + if err := expandOperation(op, resolver, basePath); resolver.shouldStopOnError(err) { + return err + } + } + return nil +} + +func expandOperation(op *Operation, resolver *schemaLoader, basePath string) error { + if op == nil { + return nil + } + + for i := range op.Parameters { + param := op.Parameters[i] + if err := expandParameterOrResponse(¶m, resolver, basePath); resolver.shouldStopOnError(err) { + return err + } + op.Parameters[i] = param + } + + if op.Responses != nil { + responses := op.Responses + if err := expandParameterOrResponse(responses.Default, resolver, basePath); resolver.shouldStopOnError(err) { + return err + } + for code := range responses.StatusCodeResponses { + response := responses.StatusCodeResponses[code] + if err := expandParameterOrResponse(&response, resolver, basePath); resolver.shouldStopOnError(err) { + return err + } + responses.StatusCodeResponses[code] = response + } + } + return nil +} + +// ExpandResponseWithRoot expands a response based on a root document, not a fetchable document +func ExpandResponseWithRoot(response *Response, root interface{}, cache ResolutionCache) error { + opts := &ExpandOptions{ + RelativeBase: baseForRoot(root, cache), + SkipSchemas: false, + ContinueOnError: false, + // when no base path is specified, remaining $ref (circular) are rendered with an absolute path + AbsoluteCircularRef: true, + } + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return err + } + + return expandParameterOrResponse(response, resolver, opts.RelativeBase) +} + +// ExpandResponse expands a response based on a basepath +// This is the exported version of expandResponse +// all refs inside response will be resolved relative to basePath +func ExpandResponse(response *Response, basePath string) error { + var specBasePath string + if basePath != "" { + specBasePath, _ = absPath(basePath) + } + opts := &ExpandOptions{ + RelativeBase: specBasePath, + } + resolver, err := defaultSchemaLoader(nil, opts, nil, nil) + if err != nil { + return err + } + + return expandParameterOrResponse(response, resolver, opts.RelativeBase) +} + +// ExpandParameterWithRoot expands a parameter based on a root document, not a fetchable document +func ExpandParameterWithRoot(parameter *Parameter, root interface{}, cache ResolutionCache) error { + opts := &ExpandOptions{ + RelativeBase: baseForRoot(root, cache), + SkipSchemas: false, + ContinueOnError: false, + // when no base path is specified, remaining $ref (circular) are rendered with an absolute path + AbsoluteCircularRef: true, + } + resolver, err := defaultSchemaLoader(root, opts, nil, nil) + if err != nil { + return err + } + + return expandParameterOrResponse(parameter, resolver, opts.RelativeBase) +} + +// ExpandParameter expands a parameter based on a basepath. +// This is the exported version of expandParameter +// all refs inside parameter will be resolved relative to basePath +func ExpandParameter(parameter *Parameter, basePath string) error { + var specBasePath string + if basePath != "" { + specBasePath, _ = absPath(basePath) + } + opts := &ExpandOptions{ + RelativeBase: specBasePath, + } + resolver, err := defaultSchemaLoader(nil, opts, nil, nil) + if err != nil { + return err + } + + return expandParameterOrResponse(parameter, resolver, opts.RelativeBase) +} + +func getRefAndSchema(input interface{}) (*Ref, *Schema, error) { + var ref *Ref + var sch *Schema + switch refable := input.(type) { + case *Parameter: + if refable == nil { + return nil, nil, nil + } + ref = &refable.Ref + sch = refable.Schema + case *Response: + if refable == nil { + return nil, nil, nil + } + ref = &refable.Ref + sch = refable.Schema + default: + return nil, nil, fmt.Errorf("expand: unsupported type %T. Input should be of type *Parameter or *Response", input) + } + return ref, sch, nil +} + +func expandParameterOrResponse(input interface{}, resolver *schemaLoader, basePath string) error { + ref, _, err := getRefAndSchema(input) + if err != nil { + return err + } + if ref == nil { + return nil + } + parentRefs := []string{} + if err := resolver.deref(input, parentRefs, basePath); resolver.shouldStopOnError(err) { + return err + } + ref, sch, _ := getRefAndSchema(input) + if ref.String() != "" { + transitiveResolver, err := resolver.transitiveResolver(basePath, *ref) + if transitiveResolver.shouldStopOnError(err) { + return err + } + basePath = resolver.updateBasePath(transitiveResolver, basePath) + resolver = transitiveResolver + } + + if sch != nil && sch.Ref.String() != "" { + // schema expanded to a $ref in another root + var ern error + sch.Ref, ern = NewRef(normalizePaths(sch.Ref.String(), ref.RemoteURI())) + if ern != nil { + return ern + } + } + if ref != nil { + *ref = Ref{} + } + + if !resolver.options.SkipSchemas && sch != nil { + s, err := expandSchema(*sch, parentRefs, resolver, basePath) + if resolver.shouldStopOnError(err) { + return err + } + *sch = *s + } + return nil +} diff --git a/vendor/github.com/go-openapi/spec/external_docs.go b/vendor/github.com/go-openapi/spec/external_docs.go new file mode 100644 index 00000000000..88add91b2b8 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/external_docs.go @@ -0,0 +1,24 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +// ExternalDocumentation allows referencing an external resource for +// extended documentation. +// +// For more information: http://goo.gl/8us55a#externalDocumentationObject +type ExternalDocumentation struct { + Description string `json:"description,omitempty"` + URL string `json:"url,omitempty"` +} diff --git a/vendor/github.com/go-openapi/spec/go.mod b/vendor/github.com/go-openapi/spec/go.mod new file mode 100644 index 00000000000..14e5f2dac3a --- /dev/null +++ b/vendor/github.com/go-openapi/spec/go.mod @@ -0,0 +1,12 @@ +module github.com/go-openapi/spec + +require ( + github.com/go-openapi/jsonpointer v0.19.3 + github.com/go-openapi/jsonreference v0.19.2 + github.com/go-openapi/swag v0.19.5 + github.com/stretchr/testify v1.3.0 + golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 // indirect + gopkg.in/yaml.v2 v2.2.4 +) + +go 1.13 diff --git a/vendor/github.com/go-openapi/spec/go.sum b/vendor/github.com/go-openapi/spec/go.sum new file mode 100644 index 00000000000..c209ff97120 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/go.sum @@ -0,0 +1,49 @@ +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +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-openapi/jsonpointer v0.19.2 h1:A9+F4Dc/MCNB5jibxf6rRvOvR/iFgQdyNx9eIhnGqq0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2 h1:o20suLFB4Ri0tuzpWtyHlh7E7HnkqTNLq6aR6WVNS1w= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63 h1:nTT4s92Dgz2HlrB2NaMgvlfqHH39OgMhA7z3PK7PGD4= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/github.com/go-openapi/spec/header.go b/vendor/github.com/go-openapi/spec/header.go new file mode 100644 index 00000000000..39efe452bb0 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/header.go @@ -0,0 +1,197 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +const ( + jsonArray = "array" +) + +// HeaderProps describes a response header +type HeaderProps struct { + Description string `json:"description,omitempty"` +} + +// Header describes a header for a response of the API +// +// For more information: http://goo.gl/8us55a#headerObject +type Header struct { + CommonValidations + SimpleSchema + VendorExtensible + HeaderProps +} + +// ResponseHeader creates a new header instance for use in a response +func ResponseHeader() *Header { + return new(Header) +} + +// WithDescription sets the description on this response, allows for chaining +func (h *Header) WithDescription(description string) *Header { + h.Description = description + return h +} + +// Typed a fluent builder method for the type of parameter +func (h *Header) Typed(tpe, format string) *Header { + h.Type = tpe + h.Format = format + return h +} + +// CollectionOf a fluent builder method for an array item +func (h *Header) CollectionOf(items *Items, format string) *Header { + h.Type = jsonArray + h.Items = items + h.CollectionFormat = format + return h +} + +// WithDefault sets the default value on this item +func (h *Header) WithDefault(defaultValue interface{}) *Header { + h.Default = defaultValue + return h +} + +// WithMaxLength sets a max length value +func (h *Header) WithMaxLength(max int64) *Header { + h.MaxLength = &max + return h +} + +// WithMinLength sets a min length value +func (h *Header) WithMinLength(min int64) *Header { + h.MinLength = &min + return h +} + +// WithPattern sets a pattern value +func (h *Header) WithPattern(pattern string) *Header { + h.Pattern = pattern + return h +} + +// WithMultipleOf sets a multiple of value +func (h *Header) WithMultipleOf(number float64) *Header { + h.MultipleOf = &number + return h +} + +// WithMaximum sets a maximum number value +func (h *Header) WithMaximum(max float64, exclusive bool) *Header { + h.Maximum = &max + h.ExclusiveMaximum = exclusive + return h +} + +// WithMinimum sets a minimum number value +func (h *Header) WithMinimum(min float64, exclusive bool) *Header { + h.Minimum = &min + h.ExclusiveMinimum = exclusive + return h +} + +// WithEnum sets a the enum values (replace) +func (h *Header) WithEnum(values ...interface{}) *Header { + h.Enum = append([]interface{}{}, values...) + return h +} + +// WithMaxItems sets the max items +func (h *Header) WithMaxItems(size int64) *Header { + h.MaxItems = &size + return h +} + +// WithMinItems sets the min items +func (h *Header) WithMinItems(size int64) *Header { + h.MinItems = &size + return h +} + +// UniqueValues dictates that this array can only have unique items +func (h *Header) UniqueValues() *Header { + h.UniqueItems = true + return h +} + +// AllowDuplicates this array can have duplicates +func (h *Header) AllowDuplicates() *Header { + h.UniqueItems = false + return h +} + +// MarshalJSON marshal this to JSON +func (h Header) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(h.CommonValidations) + if err != nil { + return nil, err + } + b2, err := json.Marshal(h.SimpleSchema) + if err != nil { + return nil, err + } + b3, err := json.Marshal(h.HeaderProps) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2, b3), nil +} + +// UnmarshalJSON unmarshals this header from JSON +func (h *Header) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &h.CommonValidations); err != nil { + return err + } + if err := json.Unmarshal(data, &h.SimpleSchema); err != nil { + return err + } + if err := json.Unmarshal(data, &h.VendorExtensible); err != nil { + return err + } + return json.Unmarshal(data, &h.HeaderProps) +} + +// JSONLookup look up a value by the json property name +func (h Header) JSONLookup(token string) (interface{}, error) { + if ex, ok := h.Extensions[token]; ok { + return &ex, nil + } + + r, _, err := jsonpointer.GetForToken(h.CommonValidations, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(h.SimpleSchema, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(h.HeaderProps, token) + return r, err +} diff --git a/vendor/github.com/go-openapi/spec/info.go b/vendor/github.com/go-openapi/spec/info.go new file mode 100644 index 00000000000..c458b49b216 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/info.go @@ -0,0 +1,165 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// Extensions vendor specific extensions +type Extensions map[string]interface{} + +// Add adds a value to these extensions +func (e Extensions) Add(key string, value interface{}) { + realKey := strings.ToLower(key) + e[realKey] = value +} + +// GetString gets a string value from the extensions +func (e Extensions) GetString(key string) (string, bool) { + if v, ok := e[strings.ToLower(key)]; ok { + str, ok := v.(string) + return str, ok + } + return "", false +} + +// GetBool gets a string value from the extensions +func (e Extensions) GetBool(key string) (bool, bool) { + if v, ok := e[strings.ToLower(key)]; ok { + str, ok := v.(bool) + return str, ok + } + return false, false +} + +// GetStringSlice gets a string value from the extensions +func (e Extensions) GetStringSlice(key string) ([]string, bool) { + if v, ok := e[strings.ToLower(key)]; ok { + arr, isSlice := v.([]interface{}) + if !isSlice { + return nil, false + } + var strs []string + for _, iface := range arr { + str, isString := iface.(string) + if !isString { + return nil, false + } + strs = append(strs, str) + } + return strs, ok + } + return nil, false +} + +// VendorExtensible composition block. +type VendorExtensible struct { + Extensions Extensions +} + +// AddExtension adds an extension to this extensible object +func (v *VendorExtensible) AddExtension(key string, value interface{}) { + if value == nil { + return + } + if v.Extensions == nil { + v.Extensions = make(map[string]interface{}) + } + v.Extensions.Add(key, value) +} + +// MarshalJSON marshals the extensions to json +func (v VendorExtensible) MarshalJSON() ([]byte, error) { + toser := make(map[string]interface{}) + for k, v := range v.Extensions { + lk := strings.ToLower(k) + if strings.HasPrefix(lk, "x-") { + toser[k] = v + } + } + return json.Marshal(toser) +} + +// UnmarshalJSON for this extensible object +func (v *VendorExtensible) UnmarshalJSON(data []byte) error { + var d map[string]interface{} + if err := json.Unmarshal(data, &d); err != nil { + return err + } + for k, vv := range d { + lk := strings.ToLower(k) + if strings.HasPrefix(lk, "x-") { + if v.Extensions == nil { + v.Extensions = map[string]interface{}{} + } + v.Extensions[k] = vv + } + } + return nil +} + +// InfoProps the properties for an info definition +type InfoProps struct { + Description string `json:"description,omitempty"` + Title string `json:"title,omitempty"` + TermsOfService string `json:"termsOfService,omitempty"` + Contact *ContactInfo `json:"contact,omitempty"` + License *License `json:"license,omitempty"` + Version string `json:"version,omitempty"` +} + +// Info object provides metadata about the API. +// The metadata can be used by the clients if needed, and can be presented in the Swagger-UI for convenience. +// +// For more information: http://goo.gl/8us55a#infoObject +type Info struct { + VendorExtensible + InfoProps +} + +// JSONLookup look up a value by the json property name +func (i Info) JSONLookup(token string) (interface{}, error) { + if ex, ok := i.Extensions[token]; ok { + return &ex, nil + } + r, _, err := jsonpointer.GetForToken(i.InfoProps, token) + return r, err +} + +// MarshalJSON marshal this to JSON +func (i Info) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(i.InfoProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(i.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} + +// UnmarshalJSON marshal this from JSON +func (i *Info) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &i.InfoProps); err != nil { + return err + } + return json.Unmarshal(data, &i.VendorExtensible) +} diff --git a/vendor/github.com/go-openapi/spec/items.go b/vendor/github.com/go-openapi/spec/items.go new file mode 100644 index 00000000000..365d1631582 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/items.go @@ -0,0 +1,244 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +const ( + jsonRef = "$ref" +) + +// SimpleSchema describe swagger simple schemas for parameters and headers +type SimpleSchema struct { + Type string `json:"type,omitempty"` + Nullable bool `json:"nullable,omitempty"` + Format string `json:"format,omitempty"` + Items *Items `json:"items,omitempty"` + CollectionFormat string `json:"collectionFormat,omitempty"` + Default interface{} `json:"default,omitempty"` + Example interface{} `json:"example,omitempty"` +} + +// TypeName return the type (or format) of a simple schema +func (s *SimpleSchema) TypeName() string { + if s.Format != "" { + return s.Format + } + return s.Type +} + +// ItemsTypeName yields the type of items in a simple schema array +func (s *SimpleSchema) ItemsTypeName() string { + if s.Items == nil { + return "" + } + return s.Items.TypeName() +} + +// CommonValidations describe common JSON-schema validations +type CommonValidations struct { + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []interface{} `json:"enum,omitempty"` +} + +// Items a limited subset of JSON-Schema's items object. +// It is used by parameter definitions that are not located in "body". +// +// For more information: http://goo.gl/8us55a#items-object +type Items struct { + Refable + CommonValidations + SimpleSchema + VendorExtensible +} + +// NewItems creates a new instance of items +func NewItems() *Items { + return &Items{} +} + +// Typed a fluent builder method for the type of item +func (i *Items) Typed(tpe, format string) *Items { + i.Type = tpe + i.Format = format + return i +} + +// AsNullable flags this schema as nullable. +func (i *Items) AsNullable() *Items { + i.Nullable = true + return i +} + +// CollectionOf a fluent builder method for an array item +func (i *Items) CollectionOf(items *Items, format string) *Items { + i.Type = jsonArray + i.Items = items + i.CollectionFormat = format + return i +} + +// WithDefault sets the default value on this item +func (i *Items) WithDefault(defaultValue interface{}) *Items { + i.Default = defaultValue + return i +} + +// WithMaxLength sets a max length value +func (i *Items) WithMaxLength(max int64) *Items { + i.MaxLength = &max + return i +} + +// WithMinLength sets a min length value +func (i *Items) WithMinLength(min int64) *Items { + i.MinLength = &min + return i +} + +// WithPattern sets a pattern value +func (i *Items) WithPattern(pattern string) *Items { + i.Pattern = pattern + return i +} + +// WithMultipleOf sets a multiple of value +func (i *Items) WithMultipleOf(number float64) *Items { + i.MultipleOf = &number + return i +} + +// WithMaximum sets a maximum number value +func (i *Items) WithMaximum(max float64, exclusive bool) *Items { + i.Maximum = &max + i.ExclusiveMaximum = exclusive + return i +} + +// WithMinimum sets a minimum number value +func (i *Items) WithMinimum(min float64, exclusive bool) *Items { + i.Minimum = &min + i.ExclusiveMinimum = exclusive + return i +} + +// WithEnum sets a the enum values (replace) +func (i *Items) WithEnum(values ...interface{}) *Items { + i.Enum = append([]interface{}{}, values...) + return i +} + +// WithMaxItems sets the max items +func (i *Items) WithMaxItems(size int64) *Items { + i.MaxItems = &size + return i +} + +// WithMinItems sets the min items +func (i *Items) WithMinItems(size int64) *Items { + i.MinItems = &size + return i +} + +// UniqueValues dictates that this array can only have unique items +func (i *Items) UniqueValues() *Items { + i.UniqueItems = true + return i +} + +// AllowDuplicates this array can have duplicates +func (i *Items) AllowDuplicates() *Items { + i.UniqueItems = false + return i +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (i *Items) UnmarshalJSON(data []byte) error { + var validations CommonValidations + if err := json.Unmarshal(data, &validations); err != nil { + return err + } + var ref Refable + if err := json.Unmarshal(data, &ref); err != nil { + return err + } + var simpleSchema SimpleSchema + if err := json.Unmarshal(data, &simpleSchema); err != nil { + return err + } + var vendorExtensible VendorExtensible + if err := json.Unmarshal(data, &vendorExtensible); err != nil { + return err + } + i.Refable = ref + i.CommonValidations = validations + i.SimpleSchema = simpleSchema + i.VendorExtensible = vendorExtensible + return nil +} + +// MarshalJSON converts this items object to JSON +func (i Items) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(i.CommonValidations) + if err != nil { + return nil, err + } + b2, err := json.Marshal(i.SimpleSchema) + if err != nil { + return nil, err + } + b3, err := json.Marshal(i.Refable) + if err != nil { + return nil, err + } + b4, err := json.Marshal(i.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b4, b3, b1, b2), nil +} + +// JSONLookup look up a value by the json property name +func (i Items) JSONLookup(token string) (interface{}, error) { + if token == jsonRef { + return &i.Ref, nil + } + + r, _, err := jsonpointer.GetForToken(i.CommonValidations, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(i.SimpleSchema, token) + return r, err +} diff --git a/vendor/github.com/go-openapi/spec/license.go b/vendor/github.com/go-openapi/spec/license.go new file mode 100644 index 00000000000..e1529b401c7 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/license.go @@ -0,0 +1,53 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/swag" +) + +// License information for the exposed API. +// +// For more information: http://goo.gl/8us55a#licenseObject +type License struct { + LicenseProps + VendorExtensible +} + +type LicenseProps struct { + Name string `json:"name,omitempty"` + URL string `json:"url,omitempty"` +} + +func (l *License) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &l.LicenseProps); err != nil { + return err + } + return json.Unmarshal(data, &l.VendorExtensible) +} + +func (l License) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(l.LicenseProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(l.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} diff --git a/vendor/github.com/go-openapi/spec/normalizer.go b/vendor/github.com/go-openapi/spec/normalizer.go new file mode 100644 index 00000000000..b8957e7c0c1 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/normalizer.go @@ -0,0 +1,152 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "fmt" + "net/url" + "os" + "path" + "path/filepath" + "strings" +) + +// normalize absolute path for cache. +// on Windows, drive letters should be converted to lower as scheme in net/url.URL +func normalizeAbsPath(path string) string { + u, err := url.Parse(path) + if err != nil { + debugLog("normalize absolute path failed: %s", err) + return path + } + return u.String() +} + +// base or refPath could be a file path or a URL +// given a base absolute path and a ref path, return the absolute path of refPath +// 1) if refPath is absolute, return it +// 2) if refPath is relative, join it with basePath keeping the scheme, hosts, and ports if exists +// base could be a directory or a full file path +func normalizePaths(refPath, base string) string { + refURL, _ := url.Parse(refPath) + if path.IsAbs(refURL.Path) || filepath.IsAbs(refPath) { + // refPath is actually absolute + if refURL.Host != "" { + return refPath + } + parts := strings.Split(refPath, "#") + result := filepath.FromSlash(parts[0]) + if len(parts) == 2 { + result += "#" + parts[1] + } + return result + } + + // relative refPath + baseURL, _ := url.Parse(base) + if !strings.HasPrefix(refPath, "#") { + // combining paths + if baseURL.Host != "" { + baseURL.Path = path.Join(path.Dir(baseURL.Path), refURL.Path) + } else { // base is a file + newBase := fmt.Sprintf("%s#%s", filepath.Join(filepath.Dir(base), filepath.FromSlash(refURL.Path)), refURL.Fragment) + return newBase + } + + } + // copying fragment from ref to base + baseURL.Fragment = refURL.Fragment + return baseURL.String() +} + +// denormalizePaths returns to simplest notation on file $ref, +// i.e. strips the absolute path and sets a path relative to the base path. +// +// This is currently used when we rewrite ref after a circular ref has been detected +func denormalizeFileRef(ref *Ref, relativeBase, originalRelativeBase string) *Ref { + debugLog("denormalizeFileRef for: %s", ref.String()) + + if ref.String() == "" || ref.IsRoot() || ref.HasFragmentOnly { + return ref + } + // strip relativeBase from URI + relativeBaseURL, _ := url.Parse(relativeBase) + relativeBaseURL.Fragment = "" + + if relativeBaseURL.IsAbs() && strings.HasPrefix(ref.String(), relativeBase) { + // this should work for absolute URI (e.g. http://...): we have an exact match, just trim prefix + r, _ := NewRef(strings.TrimPrefix(ref.String(), relativeBase)) + return &r + } + + if relativeBaseURL.IsAbs() { + // other absolute URL get unchanged (i.e. with a non-empty scheme) + return ref + } + + // for relative file URIs: + originalRelativeBaseURL, _ := url.Parse(originalRelativeBase) + originalRelativeBaseURL.Fragment = "" + if strings.HasPrefix(ref.String(), originalRelativeBaseURL.String()) { + // the resulting ref is in the expanded spec: return a local ref + r, _ := NewRef(strings.TrimPrefix(ref.String(), originalRelativeBaseURL.String())) + return &r + } + + // check if we may set a relative path, considering the original base path for this spec. + // Example: + // spec is located at /mypath/spec.json + // my normalized ref points to: /mypath/item.json#/target + // expected result: item.json#/target + parts := strings.Split(ref.String(), "#") + relativePath, err := filepath.Rel(path.Dir(originalRelativeBaseURL.String()), parts[0]) + if err != nil { + // there is no common ancestor (e.g. different drives on windows) + // leaves the ref unchanged + return ref + } + if len(parts) == 2 { + relativePath += "#" + parts[1] + } + r, _ := NewRef(relativePath) + return &r +} + +// relativeBase could be an ABSOLUTE file path or an ABSOLUTE URL +func normalizeFileRef(ref *Ref, relativeBase string) *Ref { + // This is important for when the reference is pointing to the root schema + if ref.String() == "" { + r, _ := NewRef(relativeBase) + return &r + } + + debugLog("normalizing %s against %s", ref.String(), relativeBase) + + s := normalizePaths(ref.String(), relativeBase) + r, _ := NewRef(s) + return &r +} + +// absPath returns the absolute path of a file +func absPath(fname string) (string, error) { + if strings.HasPrefix(fname, "http") { + return fname, nil + } + if filepath.IsAbs(fname) { + return fname, nil + } + wd, err := os.Getwd() + return filepath.Join(wd, fname), err +} diff --git a/vendor/github.com/go-openapi/spec/operation.go b/vendor/github.com/go-openapi/spec/operation.go new file mode 100644 index 00000000000..b1ebd59945b --- /dev/null +++ b/vendor/github.com/go-openapi/spec/operation.go @@ -0,0 +1,398 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "bytes" + "encoding/gob" + "encoding/json" + "sort" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +func init() { + //gob.Register(map[string][]interface{}{}) + gob.Register(map[string]interface{}{}) + gob.Register([]interface{}{}) +} + +// OperationProps describes an operation +// +// NOTES: +// - schemes, when present must be from [http, https, ws, wss]: see validate +// - Security is handled as a special case: see MarshalJSON function +type OperationProps struct { + Description string `json:"description,omitempty"` + Consumes []string `json:"consumes,omitempty"` + Produces []string `json:"produces,omitempty"` + Schemes []string `json:"schemes,omitempty"` + Tags []string `json:"tags,omitempty"` + Summary string `json:"summary,omitempty"` + ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` + ID string `json:"operationId,omitempty"` + Deprecated bool `json:"deprecated,omitempty"` + Security []map[string][]string `json:"security,omitempty"` + Parameters []Parameter `json:"parameters,omitempty"` + Responses *Responses `json:"responses,omitempty"` +} + +// MarshalJSON takes care of serializing operation properties to JSON +// +// We use a custom marhaller here to handle a special cases related to +// the Security field. We need to preserve zero length slice +// while omitting the field when the value is nil/unset. +func (op OperationProps) MarshalJSON() ([]byte, error) { + type Alias OperationProps + if op.Security == nil { + return json.Marshal(&struct { + Security []map[string][]string `json:"security,omitempty"` + *Alias + }{ + Security: op.Security, + Alias: (*Alias)(&op), + }) + } + return json.Marshal(&struct { + Security []map[string][]string `json:"security"` + *Alias + }{ + Security: op.Security, + Alias: (*Alias)(&op), + }) +} + +// Operation describes a single API operation on a path. +// +// For more information: http://goo.gl/8us55a#operationObject +type Operation struct { + VendorExtensible + OperationProps +} + +// SuccessResponse gets a success response model +func (o *Operation) SuccessResponse() (*Response, int, bool) { + if o.Responses == nil { + return nil, 0, false + } + + responseCodes := make([]int, 0, len(o.Responses.StatusCodeResponses)) + for k := range o.Responses.StatusCodeResponses { + if k >= 200 && k < 300 { + responseCodes = append(responseCodes, k) + } + } + if len(responseCodes) > 0 { + sort.Ints(responseCodes) + v := o.Responses.StatusCodeResponses[responseCodes[0]] + return &v, responseCodes[0], true + } + + return o.Responses.Default, 0, false +} + +// JSONLookup look up a value by the json property name +func (o Operation) JSONLookup(token string) (interface{}, error) { + if ex, ok := o.Extensions[token]; ok { + return &ex, nil + } + r, _, err := jsonpointer.GetForToken(o.OperationProps, token) + return r, err +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (o *Operation) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &o.OperationProps); err != nil { + return err + } + return json.Unmarshal(data, &o.VendorExtensible) +} + +// MarshalJSON converts this items object to JSON +func (o Operation) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(o.OperationProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(o.VendorExtensible) + if err != nil { + return nil, err + } + concated := swag.ConcatJSON(b1, b2) + return concated, nil +} + +// NewOperation creates a new operation instance. +// It expects an ID as parameter but not passing an ID is also valid. +func NewOperation(id string) *Operation { + op := new(Operation) + op.ID = id + return op +} + +// WithID sets the ID property on this operation, allows for chaining. +func (o *Operation) WithID(id string) *Operation { + o.ID = id + return o +} + +// WithDescription sets the description on this operation, allows for chaining +func (o *Operation) WithDescription(description string) *Operation { + o.Description = description + return o +} + +// WithSummary sets the summary on this operation, allows for chaining +func (o *Operation) WithSummary(summary string) *Operation { + o.Summary = summary + return o +} + +// WithExternalDocs sets/removes the external docs for/from this operation. +// When you pass empty strings as params the external documents will be removed. +// When you pass non-empty string as one value then those values will be used on the external docs object. +// So when you pass a non-empty description, you should also pass the url and vice versa. +func (o *Operation) WithExternalDocs(description, url string) *Operation { + if description == "" && url == "" { + o.ExternalDocs = nil + return o + } + + if o.ExternalDocs == nil { + o.ExternalDocs = &ExternalDocumentation{} + } + o.ExternalDocs.Description = description + o.ExternalDocs.URL = url + return o +} + +// Deprecate marks the operation as deprecated +func (o *Operation) Deprecate() *Operation { + o.Deprecated = true + return o +} + +// Undeprecate marks the operation as not deprected +func (o *Operation) Undeprecate() *Operation { + o.Deprecated = false + return o +} + +// WithConsumes adds media types for incoming body values +func (o *Operation) WithConsumes(mediaTypes ...string) *Operation { + o.Consumes = append(o.Consumes, mediaTypes...) + return o +} + +// WithProduces adds media types for outgoing body values +func (o *Operation) WithProduces(mediaTypes ...string) *Operation { + o.Produces = append(o.Produces, mediaTypes...) + return o +} + +// WithTags adds tags for this operation +func (o *Operation) WithTags(tags ...string) *Operation { + o.Tags = append(o.Tags, tags...) + return o +} + +// AddParam adds a parameter to this operation, when a parameter for that location +// and with that name already exists it will be replaced +func (o *Operation) AddParam(param *Parameter) *Operation { + if param == nil { + return o + } + + for i, p := range o.Parameters { + if p.Name == param.Name && p.In == param.In { + params := append(o.Parameters[:i], *param) + params = append(params, o.Parameters[i+1:]...) + o.Parameters = params + return o + } + } + + o.Parameters = append(o.Parameters, *param) + return o +} + +// RemoveParam removes a parameter from the operation +func (o *Operation) RemoveParam(name, in string) *Operation { + for i, p := range o.Parameters { + if p.Name == name && p.In == in { + o.Parameters = append(o.Parameters[:i], o.Parameters[i+1:]...) + return o + } + } + return o +} + +// SecuredWith adds a security scope to this operation. +func (o *Operation) SecuredWith(name string, scopes ...string) *Operation { + o.Security = append(o.Security, map[string][]string{name: scopes}) + return o +} + +// WithDefaultResponse adds a default response to the operation. +// Passing a nil value will remove the response +func (o *Operation) WithDefaultResponse(response *Response) *Operation { + return o.RespondsWith(0, response) +} + +// RespondsWith adds a status code response to the operation. +// When the code is 0 the value of the response will be used as default response value. +// When the value of the response is nil it will be removed from the operation +func (o *Operation) RespondsWith(code int, response *Response) *Operation { + if o.Responses == nil { + o.Responses = new(Responses) + } + if code == 0 { + o.Responses.Default = response + return o + } + if response == nil { + delete(o.Responses.StatusCodeResponses, code) + return o + } + if o.Responses.StatusCodeResponses == nil { + o.Responses.StatusCodeResponses = make(map[int]Response) + } + o.Responses.StatusCodeResponses[code] = *response + return o +} + +type opsAlias OperationProps + +type gobAlias struct { + Security []map[string]struct { + List []string + Pad bool + } + Alias *opsAlias + SecurityIsEmpty bool +} + +// GobEncode provides a safe gob encoder for Operation, including empty security requirements +func (o Operation) GobEncode() ([]byte, error) { + raw := struct { + Ext VendorExtensible + Props OperationProps + }{ + Ext: o.VendorExtensible, + Props: o.OperationProps, + } + var b bytes.Buffer + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err +} + +// GobDecode provides a safe gob decoder for Operation, including empty security requirements +func (o *Operation) GobDecode(b []byte) error { + var raw struct { + Ext VendorExtensible + Props OperationProps + } + + buf := bytes.NewBuffer(b) + err := gob.NewDecoder(buf).Decode(&raw) + if err != nil { + return err + } + o.VendorExtensible = raw.Ext + o.OperationProps = raw.Props + return nil +} + +// GobEncode provides a safe gob encoder for Operation, including empty security requirements +func (op OperationProps) GobEncode() ([]byte, error) { + raw := gobAlias{ + Alias: (*opsAlias)(&op), + } + + var b bytes.Buffer + if op.Security == nil { + // nil security requirement + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err + } + + if len(op.Security) == 0 { + // empty, but non-nil security requirement + raw.SecurityIsEmpty = true + raw.Alias.Security = nil + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err + } + + raw.Security = make([]map[string]struct { + List []string + Pad bool + }, 0, len(op.Security)) + for _, req := range op.Security { + v := make(map[string]struct { + List []string + Pad bool + }, len(req)) + for k, val := range req { + v[k] = struct { + List []string + Pad bool + }{ + List: val, + } + } + raw.Security = append(raw.Security, v) + } + + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err +} + +// GobDecode provides a safe gob decoder for Operation, including empty security requirements +func (op *OperationProps) GobDecode(b []byte) error { + var raw gobAlias + + buf := bytes.NewBuffer(b) + err := gob.NewDecoder(buf).Decode(&raw) + if err != nil { + return err + } + if raw.Alias == nil { + return nil + } + + switch { + case raw.SecurityIsEmpty: + // empty, but non-nil security requirement + raw.Alias.Security = []map[string][]string{} + case len(raw.Alias.Security) == 0: + // nil security requirement + raw.Alias.Security = nil + default: + raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security)) + for _, req := range raw.Security { + v := make(map[string][]string, len(req)) + for k, val := range req { + v[k] = make([]string, 0, len(val.List)) + v[k] = append(v[k], val.List...) + } + raw.Alias.Security = append(raw.Alias.Security, v) + } + } + + *op = *(*OperationProps)(raw.Alias) + return nil +} diff --git a/vendor/github.com/go-openapi/spec/parameter.go b/vendor/github.com/go-openapi/spec/parameter.go new file mode 100644 index 00000000000..cecdff54568 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/parameter.go @@ -0,0 +1,321 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// QueryParam creates a query parameter +func QueryParam(name string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "query"}} +} + +// HeaderParam creates a header parameter, this is always required by default +func HeaderParam(name string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "header", Required: true}} +} + +// PathParam creates a path parameter, this is always required +func PathParam(name string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "path", Required: true}} +} + +// BodyParam creates a body parameter +func BodyParam(name string, schema *Schema) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "body", Schema: schema}, + SimpleSchema: SimpleSchema{Type: "object"}} +} + +// FormDataParam creates a body parameter +func FormDataParam(name string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}} +} + +// FileParam creates a body parameter +func FileParam(name string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name, In: "formData"}, + SimpleSchema: SimpleSchema{Type: "file"}} +} + +// SimpleArrayParam creates a param for a simple array (string, int, date etc) +func SimpleArrayParam(name, tpe, fmt string) *Parameter { + return &Parameter{ParamProps: ParamProps{Name: name}, + SimpleSchema: SimpleSchema{Type: jsonArray, CollectionFormat: "csv", + Items: &Items{SimpleSchema: SimpleSchema{Type: "string", Format: fmt}}}} +} + +// ParamRef creates a parameter that's a json reference +func ParamRef(uri string) *Parameter { + p := new(Parameter) + p.Ref = MustCreateRef(uri) + return p +} + +// ParamProps describes the specific attributes of an operation parameter +// +// NOTE: +// - Schema is defined when "in" == "body": see validate +// - AllowEmptyValue is allowed where "in" == "query" || "formData" +type ParamProps struct { + Description string `json:"description,omitempty"` + Name string `json:"name,omitempty"` + In string `json:"in,omitempty"` + Required bool `json:"required,omitempty"` + Schema *Schema `json:"schema,omitempty"` + AllowEmptyValue bool `json:"allowEmptyValue,omitempty"` +} + +// Parameter a unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). +// +// There are five possible parameter types. +// * Path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part +// of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, +// the path parameter is `itemId`. +// * Query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`. +// * Header - Custom headers that are expected as part of the request. +// * Body - The payload that's appended to the HTTP request. Since there can only be one payload, there can only be +// _one_ body parameter. The name of the body parameter has no effect on the parameter itself and is used for +// documentation purposes only. Since Form parameters are also in the payload, body and form parameters cannot exist +// together for the same operation. +// * Form - Used to describe the payload of an HTTP request when either `application/x-www-form-urlencoded` or +// `multipart/form-data` are used as the content type of the request (in Swagger's definition, +// the [`consumes`](#operationConsumes) property of an operation). This is the only parameter type that can be used +// to send files, thus supporting the `file` type. Since form parameters are sent in the payload, they cannot be +// declared together with a body parameter for the same operation. Form parameters have a different format based on +// the content-type used (for further details, consult http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4). +// * `application/x-www-form-urlencoded` - Similar to the format of Query parameters but as a payload. +// For example, `foo=1&bar=swagger` - both `foo` and `bar` are form parameters. This is normally used for simple +// parameters that are being transferred. +// * `multipart/form-data` - each parameter takes a section in the payload with an internal header. +// For example, for the header `Content-Disposition: form-data; name="submit-name"` the name of the parameter is +// `submit-name`. This type of form parameters is more commonly used for file transfers. +// +// For more information: http://goo.gl/8us55a#parameterObject +type Parameter struct { + Refable + CommonValidations + SimpleSchema + VendorExtensible + ParamProps +} + +// JSONLookup look up a value by the json property name +func (p Parameter) JSONLookup(token string) (interface{}, error) { + if ex, ok := p.Extensions[token]; ok { + return &ex, nil + } + if token == jsonRef { + return &p.Ref, nil + } + + r, _, err := jsonpointer.GetForToken(p.CommonValidations, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(p.SimpleSchema, token) + if err != nil && !strings.HasPrefix(err.Error(), "object has no field") { + return nil, err + } + if r != nil { + return r, nil + } + r, _, err = jsonpointer.GetForToken(p.ParamProps, token) + return r, err +} + +// WithDescription a fluent builder method for the description of the parameter +func (p *Parameter) WithDescription(description string) *Parameter { + p.Description = description + return p +} + +// Named a fluent builder method to override the name of the parameter +func (p *Parameter) Named(name string) *Parameter { + p.Name = name + return p +} + +// WithLocation a fluent builder method to override the location of the parameter +func (p *Parameter) WithLocation(in string) *Parameter { + p.In = in + return p +} + +// Typed a fluent builder method for the type of the parameter value +func (p *Parameter) Typed(tpe, format string) *Parameter { + p.Type = tpe + p.Format = format + return p +} + +// CollectionOf a fluent builder method for an array parameter +func (p *Parameter) CollectionOf(items *Items, format string) *Parameter { + p.Type = jsonArray + p.Items = items + p.CollectionFormat = format + return p +} + +// WithDefault sets the default value on this parameter +func (p *Parameter) WithDefault(defaultValue interface{}) *Parameter { + p.AsOptional() // with default implies optional + p.Default = defaultValue + return p +} + +// AllowsEmptyValues flags this parameter as being ok with empty values +func (p *Parameter) AllowsEmptyValues() *Parameter { + p.AllowEmptyValue = true + return p +} + +// NoEmptyValues flags this parameter as not liking empty values +func (p *Parameter) NoEmptyValues() *Parameter { + p.AllowEmptyValue = false + return p +} + +// AsOptional flags this parameter as optional +func (p *Parameter) AsOptional() *Parameter { + p.Required = false + return p +} + +// AsRequired flags this parameter as required +func (p *Parameter) AsRequired() *Parameter { + if p.Default != nil { // with a default required makes no sense + return p + } + p.Required = true + return p +} + +// WithMaxLength sets a max length value +func (p *Parameter) WithMaxLength(max int64) *Parameter { + p.MaxLength = &max + return p +} + +// WithMinLength sets a min length value +func (p *Parameter) WithMinLength(min int64) *Parameter { + p.MinLength = &min + return p +} + +// WithPattern sets a pattern value +func (p *Parameter) WithPattern(pattern string) *Parameter { + p.Pattern = pattern + return p +} + +// WithMultipleOf sets a multiple of value +func (p *Parameter) WithMultipleOf(number float64) *Parameter { + p.MultipleOf = &number + return p +} + +// WithMaximum sets a maximum number value +func (p *Parameter) WithMaximum(max float64, exclusive bool) *Parameter { + p.Maximum = &max + p.ExclusiveMaximum = exclusive + return p +} + +// WithMinimum sets a minimum number value +func (p *Parameter) WithMinimum(min float64, exclusive bool) *Parameter { + p.Minimum = &min + p.ExclusiveMinimum = exclusive + return p +} + +// WithEnum sets a the enum values (replace) +func (p *Parameter) WithEnum(values ...interface{}) *Parameter { + p.Enum = append([]interface{}{}, values...) + return p +} + +// WithMaxItems sets the max items +func (p *Parameter) WithMaxItems(size int64) *Parameter { + p.MaxItems = &size + return p +} + +// WithMinItems sets the min items +func (p *Parameter) WithMinItems(size int64) *Parameter { + p.MinItems = &size + return p +} + +// UniqueValues dictates that this array can only have unique items +func (p *Parameter) UniqueValues() *Parameter { + p.UniqueItems = true + return p +} + +// AllowDuplicates this array can have duplicates +func (p *Parameter) AllowDuplicates() *Parameter { + p.UniqueItems = false + return p +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (p *Parameter) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &p.CommonValidations); err != nil { + return err + } + if err := json.Unmarshal(data, &p.Refable); err != nil { + return err + } + if err := json.Unmarshal(data, &p.SimpleSchema); err != nil { + return err + } + if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { + return err + } + return json.Unmarshal(data, &p.ParamProps) +} + +// MarshalJSON converts this items object to JSON +func (p Parameter) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(p.CommonValidations) + if err != nil { + return nil, err + } + b2, err := json.Marshal(p.SimpleSchema) + if err != nil { + return nil, err + } + b3, err := json.Marshal(p.Refable) + if err != nil { + return nil, err + } + b4, err := json.Marshal(p.VendorExtensible) + if err != nil { + return nil, err + } + b5, err := json.Marshal(p.ParamProps) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b3, b1, b2, b4, b5), nil +} diff --git a/vendor/github.com/go-openapi/spec/path_item.go b/vendor/github.com/go-openapi/spec/path_item.go new file mode 100644 index 00000000000..68fc8e90144 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/path_item.go @@ -0,0 +1,87 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// PathItemProps the path item specific properties +type PathItemProps struct { + Get *Operation `json:"get,omitempty"` + Put *Operation `json:"put,omitempty"` + Post *Operation `json:"post,omitempty"` + Delete *Operation `json:"delete,omitempty"` + Options *Operation `json:"options,omitempty"` + Head *Operation `json:"head,omitempty"` + Patch *Operation `json:"patch,omitempty"` + Parameters []Parameter `json:"parameters,omitempty"` +} + +// PathItem describes the operations available on a single path. +// A Path Item may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering). +// The path itself is still exposed to the documentation viewer but they will +// not know which operations and parameters are available. +// +// For more information: http://goo.gl/8us55a#pathItemObject +type PathItem struct { + Refable + VendorExtensible + PathItemProps +} + +// JSONLookup look up a value by the json property name +func (p PathItem) JSONLookup(token string) (interface{}, error) { + if ex, ok := p.Extensions[token]; ok { + return &ex, nil + } + if token == jsonRef { + return &p.Ref, nil + } + r, _, err := jsonpointer.GetForToken(p.PathItemProps, token) + return r, err +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (p *PathItem) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &p.Refable); err != nil { + return err + } + if err := json.Unmarshal(data, &p.VendorExtensible); err != nil { + return err + } + return json.Unmarshal(data, &p.PathItemProps) +} + +// MarshalJSON converts this items object to JSON +func (p PathItem) MarshalJSON() ([]byte, error) { + b3, err := json.Marshal(p.Refable) + if err != nil { + return nil, err + } + b4, err := json.Marshal(p.VendorExtensible) + if err != nil { + return nil, err + } + b5, err := json.Marshal(p.PathItemProps) + if err != nil { + return nil, err + } + concated := swag.ConcatJSON(b3, b4, b5) + return concated, nil +} diff --git a/vendor/github.com/go-openapi/spec/paths.go b/vendor/github.com/go-openapi/spec/paths.go new file mode 100644 index 00000000000..9dc82a2901d --- /dev/null +++ b/vendor/github.com/go-openapi/spec/paths.go @@ -0,0 +1,97 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/go-openapi/swag" +) + +// Paths holds the relative paths to the individual endpoints. +// The path is appended to the [`basePath`](http://goo.gl/8us55a#swaggerBasePath) in order +// to construct the full URL. +// The Paths may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering). +// +// For more information: http://goo.gl/8us55a#pathsObject +type Paths struct { + VendorExtensible + Paths map[string]PathItem `json:"-"` // custom serializer to flatten this, each entry must start with "/" +} + +// JSONLookup look up a value by the json property name +func (p Paths) JSONLookup(token string) (interface{}, error) { + if pi, ok := p.Paths[token]; ok { + return &pi, nil + } + if ex, ok := p.Extensions[token]; ok { + return &ex, nil + } + return nil, fmt.Errorf("object has no field %q", token) +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (p *Paths) UnmarshalJSON(data []byte) error { + var res map[string]json.RawMessage + if err := json.Unmarshal(data, &res); err != nil { + return err + } + for k, v := range res { + if strings.HasPrefix(strings.ToLower(k), "x-") { + if p.Extensions == nil { + p.Extensions = make(map[string]interface{}) + } + var d interface{} + if err := json.Unmarshal(v, &d); err != nil { + return err + } + p.Extensions[k] = d + } + if strings.HasPrefix(k, "/") { + if p.Paths == nil { + p.Paths = make(map[string]PathItem) + } + var pi PathItem + if err := json.Unmarshal(v, &pi); err != nil { + return err + } + p.Paths[k] = pi + } + } + return nil +} + +// MarshalJSON converts this items object to JSON +func (p Paths) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(p.VendorExtensible) + if err != nil { + return nil, err + } + + pths := make(map[string]PathItem) + for k, v := range p.Paths { + if strings.HasPrefix(k, "/") { + pths[k] = v + } + } + b2, err := json.Marshal(pths) + if err != nil { + return nil, err + } + concated := swag.ConcatJSON(b1, b2) + return concated, nil +} diff --git a/vendor/github.com/go-openapi/spec/ref.go b/vendor/github.com/go-openapi/spec/ref.go new file mode 100644 index 00000000000..1f31a9ead01 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/ref.go @@ -0,0 +1,193 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "bytes" + "encoding/gob" + "encoding/json" + "net/http" + "os" + "path/filepath" + + "github.com/go-openapi/jsonreference" +) + +// Refable is a struct for things that accept a $ref property +type Refable struct { + Ref Ref +} + +// MarshalJSON marshals the ref to json +func (r Refable) MarshalJSON() ([]byte, error) { + return r.Ref.MarshalJSON() +} + +// UnmarshalJSON unmarshalss the ref from json +func (r *Refable) UnmarshalJSON(d []byte) error { + return json.Unmarshal(d, &r.Ref) +} + +// Ref represents a json reference that is potentially resolved +type Ref struct { + jsonreference.Ref +} + +// RemoteURI gets the remote uri part of the ref +func (r *Ref) RemoteURI() string { + if r.String() == "" { + return r.String() + } + + u := *r.GetURL() + u.Fragment = "" + return u.String() +} + +// IsValidURI returns true when the url the ref points to can be found +func (r *Ref) IsValidURI(basepaths ...string) bool { + if r.String() == "" { + return true + } + + v := r.RemoteURI() + if v == "" { + return true + } + + if r.HasFullURL { + //#nosec + rr, err := http.Get(v) + if err != nil { + return false + } + defer rr.Body.Close() + + return rr.StatusCode/100 == 2 + } + + if !(r.HasFileScheme || r.HasFullFilePath || r.HasURLPathOnly) { + return false + } + + // check for local file + pth := v + if r.HasURLPathOnly { + base := "." + if len(basepaths) > 0 { + base = filepath.Dir(filepath.Join(basepaths...)) + } + p, e := filepath.Abs(filepath.ToSlash(filepath.Join(base, pth))) + if e != nil { + return false + } + pth = p + } + + fi, err := os.Stat(filepath.ToSlash(pth)) + if err != nil { + return false + } + + return !fi.IsDir() +} + +// Inherits creates a new reference from a parent and a child +// If the child cannot inherit from the parent, an error is returned +func (r *Ref) Inherits(child Ref) (*Ref, error) { + ref, err := r.Ref.Inherits(child.Ref) + if err != nil { + return nil, err + } + return &Ref{Ref: *ref}, nil +} + +// NewRef creates a new instance of a ref object +// returns an error when the reference uri is an invalid uri +func NewRef(refURI string) (Ref, error) { + ref, err := jsonreference.New(refURI) + if err != nil { + return Ref{}, err + } + return Ref{Ref: ref}, nil +} + +// MustCreateRef creates a ref object but panics when refURI is invalid. +// Use the NewRef method for a version that returns an error. +func MustCreateRef(refURI string) Ref { + return Ref{Ref: jsonreference.MustCreateRef(refURI)} +} + +// MarshalJSON marshals this ref into a JSON object +func (r Ref) MarshalJSON() ([]byte, error) { + str := r.String() + if str == "" { + if r.IsRoot() { + return []byte(`{"$ref":""}`), nil + } + return []byte("{}"), nil + } + v := map[string]interface{}{"$ref": str} + return json.Marshal(v) +} + +// UnmarshalJSON unmarshals this ref from a JSON object +func (r *Ref) UnmarshalJSON(d []byte) error { + var v map[string]interface{} + if err := json.Unmarshal(d, &v); err != nil { + return err + } + return r.fromMap(v) +} + +// GobEncode provides a safe gob encoder for Ref +func (r Ref) GobEncode() ([]byte, error) { + var b bytes.Buffer + raw, err := r.MarshalJSON() + if err != nil { + return nil, err + } + err = gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err +} + +// GobDecode provides a safe gob decoder for Ref +func (r *Ref) GobDecode(b []byte) error { + var raw []byte + buf := bytes.NewBuffer(b) + err := gob.NewDecoder(buf).Decode(&raw) + if err != nil { + return err + } + return json.Unmarshal(raw, r) +} + +func (r *Ref) fromMap(v map[string]interface{}) error { + if v == nil { + return nil + } + + if vv, ok := v["$ref"]; ok { + if str, ok := vv.(string); ok { + ref, err := jsonreference.New(str) + if err != nil { + return err + } + *r = Ref{Ref: ref} + } + } + + return nil +} diff --git a/vendor/github.com/go-openapi/spec/response.go b/vendor/github.com/go-openapi/spec/response.go new file mode 100644 index 00000000000..27729c1d93b --- /dev/null +++ b/vendor/github.com/go-openapi/spec/response.go @@ -0,0 +1,131 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// ResponseProps properties specific to a response +type ResponseProps struct { + Description string `json:"description,omitempty"` + Schema *Schema `json:"schema,omitempty"` + Headers map[string]Header `json:"headers,omitempty"` + Examples map[string]interface{} `json:"examples,omitempty"` +} + +// Response describes a single response from an API Operation. +// +// For more information: http://goo.gl/8us55a#responseObject +type Response struct { + Refable + ResponseProps + VendorExtensible +} + +// JSONLookup look up a value by the json property name +func (r Response) JSONLookup(token string) (interface{}, error) { + if ex, ok := r.Extensions[token]; ok { + return &ex, nil + } + if token == "$ref" { + return &r.Ref, nil + } + ptr, _, err := jsonpointer.GetForToken(r.ResponseProps, token) + return ptr, err +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (r *Response) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &r.ResponseProps); err != nil { + return err + } + if err := json.Unmarshal(data, &r.Refable); err != nil { + return err + } + return json.Unmarshal(data, &r.VendorExtensible) +} + +// MarshalJSON converts this items object to JSON +func (r Response) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(r.ResponseProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(r.Refable) + if err != nil { + return nil, err + } + b3, err := json.Marshal(r.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2, b3), nil +} + +// NewResponse creates a new response instance +func NewResponse() *Response { + return new(Response) +} + +// ResponseRef creates a response as a json reference +func ResponseRef(url string) *Response { + resp := NewResponse() + resp.Ref = MustCreateRef(url) + return resp +} + +// WithDescription sets the description on this response, allows for chaining +func (r *Response) WithDescription(description string) *Response { + r.Description = description + return r +} + +// WithSchema sets the schema on this response, allows for chaining. +// Passing a nil argument removes the schema from this response +func (r *Response) WithSchema(schema *Schema) *Response { + r.Schema = schema + return r +} + +// AddHeader adds a header to this response +func (r *Response) AddHeader(name string, header *Header) *Response { + if header == nil { + return r.RemoveHeader(name) + } + if r.Headers == nil { + r.Headers = make(map[string]Header) + } + r.Headers[name] = *header + return r +} + +// RemoveHeader removes a header from this response +func (r *Response) RemoveHeader(name string) *Response { + delete(r.Headers, name) + return r +} + +// AddExample adds an example to this response +func (r *Response) AddExample(mediaType string, example interface{}) *Response { + if r.Examples == nil { + r.Examples = make(map[string]interface{}) + } + r.Examples[mediaType] = example + return r +} diff --git a/vendor/github.com/go-openapi/spec/responses.go b/vendor/github.com/go-openapi/spec/responses.go new file mode 100644 index 00000000000..4efb6f868bd --- /dev/null +++ b/vendor/github.com/go-openapi/spec/responses.go @@ -0,0 +1,127 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "reflect" + "strconv" + + "github.com/go-openapi/swag" +) + +// Responses is a container for the expected responses of an operation. +// The container maps a HTTP response code to the expected response. +// It is not expected from the documentation to necessarily cover all possible HTTP response codes, +// since they may not be known in advance. However, it is expected from the documentation to cover +// a successful operation response and any known errors. +// +// The `default` can be used a default response object for all HTTP codes that are not covered +// individually by the specification. +// +// The `Responses Object` MUST contain at least one response code, and it SHOULD be the response +// for a successful operation call. +// +// For more information: http://goo.gl/8us55a#responsesObject +type Responses struct { + VendorExtensible + ResponsesProps +} + +// JSONLookup implements an interface to customize json pointer lookup +func (r Responses) JSONLookup(token string) (interface{}, error) { + if token == "default" { + return r.Default, nil + } + if ex, ok := r.Extensions[token]; ok { + return &ex, nil + } + if i, err := strconv.Atoi(token); err == nil { + if scr, ok := r.StatusCodeResponses[i]; ok { + return scr, nil + } + } + return nil, fmt.Errorf("object has no field %q", token) +} + +// UnmarshalJSON hydrates this items instance with the data from JSON +func (r *Responses) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &r.ResponsesProps); err != nil { + return err + } + if err := json.Unmarshal(data, &r.VendorExtensible); err != nil { + return err + } + if reflect.DeepEqual(ResponsesProps{}, r.ResponsesProps) { + r.ResponsesProps = ResponsesProps{} + } + return nil +} + +// MarshalJSON converts this items object to JSON +func (r Responses) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(r.ResponsesProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(r.VendorExtensible) + if err != nil { + return nil, err + } + concated := swag.ConcatJSON(b1, b2) + return concated, nil +} + +// ResponsesProps describes all responses for an operation. +// It tells what is the default response and maps all responses with a +// HTTP status code. +type ResponsesProps struct { + Default *Response + StatusCodeResponses map[int]Response +} + +// MarshalJSON marshals responses as JSON +func (r ResponsesProps) MarshalJSON() ([]byte, error) { + toser := map[string]Response{} + if r.Default != nil { + toser["default"] = *r.Default + } + for k, v := range r.StatusCodeResponses { + toser[strconv.Itoa(k)] = v + } + return json.Marshal(toser) +} + +// UnmarshalJSON unmarshals responses from JSON +func (r *ResponsesProps) UnmarshalJSON(data []byte) error { + var res map[string]Response + if err := json.Unmarshal(data, &res); err != nil { + return nil + } + if v, ok := res["default"]; ok { + r.Default = &v + delete(res, "default") + } + for k, v := range res { + if nk, err := strconv.Atoi(k); err == nil { + if r.StatusCodeResponses == nil { + r.StatusCodeResponses = map[int]Response{} + } + r.StatusCodeResponses[nk] = v + } + } + return nil +} diff --git a/vendor/github.com/go-openapi/spec/schema.go b/vendor/github.com/go-openapi/spec/schema.go new file mode 100644 index 00000000000..37858ece909 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/schema.go @@ -0,0 +1,596 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "net/url" + "strings" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// BooleanProperty creates a boolean property +func BooleanProperty() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"boolean"}}} +} + +// BoolProperty creates a boolean property +func BoolProperty() *Schema { return BooleanProperty() } + +// StringProperty creates a string property +func StringProperty() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}} +} + +// CharProperty creates a string property +func CharProperty() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}}} +} + +// Float64Property creates a float64/double property +func Float64Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"number"}, Format: "double"}} +} + +// Float32Property creates a float32/float property +func Float32Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"number"}, Format: "float"}} +} + +// Int8Property creates an int8 property +func Int8Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int8"}} +} + +// Int16Property creates an int16 property +func Int16Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int16"}} +} + +// Int32Property creates an int32 property +func Int32Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int32"}} +} + +// Int64Property creates an int64 property +func Int64Property() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"integer"}, Format: "int64"}} +} + +// StrFmtProperty creates a property for the named string format +func StrFmtProperty(format string) *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: format}} +} + +// DateProperty creates a date property +func DateProperty() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: "date"}} +} + +// DateTimeProperty creates a date time property +func DateTimeProperty() *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"string"}, Format: "date-time"}} +} + +// MapProperty creates a map property +func MapProperty(property *Schema) *Schema { + return &Schema{SchemaProps: SchemaProps{Type: []string{"object"}, + AdditionalProperties: &SchemaOrBool{Allows: true, Schema: property}}} +} + +// RefProperty creates a ref property +func RefProperty(name string) *Schema { + return &Schema{SchemaProps: SchemaProps{Ref: MustCreateRef(name)}} +} + +// RefSchema creates a ref property +func RefSchema(name string) *Schema { + return &Schema{SchemaProps: SchemaProps{Ref: MustCreateRef(name)}} +} + +// ArrayProperty creates an array property +func ArrayProperty(items *Schema) *Schema { + if items == nil { + return &Schema{SchemaProps: SchemaProps{Type: []string{"array"}}} + } + return &Schema{SchemaProps: SchemaProps{Items: &SchemaOrArray{Schema: items}, Type: []string{"array"}}} +} + +// ComposedSchema creates a schema with allOf +func ComposedSchema(schemas ...Schema) *Schema { + s := new(Schema) + s.AllOf = schemas + return s +} + +// SchemaURL represents a schema url +type SchemaURL string + +// MarshalJSON marshal this to JSON +func (r SchemaURL) MarshalJSON() ([]byte, error) { + if r == "" { + return []byte("{}"), nil + } + v := map[string]interface{}{"$schema": string(r)} + return json.Marshal(v) +} + +// UnmarshalJSON unmarshal this from JSON +func (r *SchemaURL) UnmarshalJSON(data []byte) error { + var v map[string]interface{} + if err := json.Unmarshal(data, &v); err != nil { + return err + } + return r.fromMap(v) +} + +func (r *SchemaURL) fromMap(v map[string]interface{}) error { + if v == nil { + return nil + } + if vv, ok := v["$schema"]; ok { + if str, ok := vv.(string); ok { + u, err := url.Parse(str) + if err != nil { + return err + } + + *r = SchemaURL(u.String()) + } + } + return nil +} + +// SchemaProps describes a JSON schema (draft 4) +type SchemaProps struct { + ID string `json:"id,omitempty"` + Ref Ref `json:"-"` + Schema SchemaURL `json:"-"` + Description string `json:"description,omitempty"` + Type StringOrArray `json:"type,omitempty"` + Nullable bool `json:"nullable,omitempty"` + Format string `json:"format,omitempty"` + Title string `json:"title,omitempty"` + Default interface{} `json:"default,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []interface{} `json:"enum,omitempty"` + MaxProperties *int64 `json:"maxProperties,omitempty"` + MinProperties *int64 `json:"minProperties,omitempty"` + Required []string `json:"required,omitempty"` + Items *SchemaOrArray `json:"items,omitempty"` + AllOf []Schema `json:"allOf,omitempty"` + OneOf []Schema `json:"oneOf,omitempty"` + AnyOf []Schema `json:"anyOf,omitempty"` + Not *Schema `json:"not,omitempty"` + Properties map[string]Schema `json:"properties,omitempty"` + AdditionalProperties *SchemaOrBool `json:"additionalProperties,omitempty"` + PatternProperties map[string]Schema `json:"patternProperties,omitempty"` + Dependencies Dependencies `json:"dependencies,omitempty"` + AdditionalItems *SchemaOrBool `json:"additionalItems,omitempty"` + Definitions Definitions `json:"definitions,omitempty"` +} + +// SwaggerSchemaProps are additional properties supported by swagger schemas, but not JSON-schema (draft 4) +type SwaggerSchemaProps struct { + Discriminator string `json:"discriminator,omitempty"` + ReadOnly bool `json:"readOnly,omitempty"` + XML *XMLObject `json:"xml,omitempty"` + ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` + Example interface{} `json:"example,omitempty"` +} + +// Schema the schema object allows the definition of input and output data types. +// These types can be objects, but also primitives and arrays. +// This object is based on the [JSON Schema Specification Draft 4](http://json-schema.org/) +// and uses a predefined subset of it. +// On top of this subset, there are extensions provided by this specification to allow for more complete documentation. +// +// For more information: http://goo.gl/8us55a#schemaObject +type Schema struct { + VendorExtensible + SchemaProps + SwaggerSchemaProps + ExtraProps map[string]interface{} `json:"-"` +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s Schema) JSONLookup(token string) (interface{}, error) { + if ex, ok := s.Extensions[token]; ok { + return &ex, nil + } + + if ex, ok := s.ExtraProps[token]; ok { + return &ex, nil + } + + r, _, err := jsonpointer.GetForToken(s.SchemaProps, token) + if r != nil || (err != nil && !strings.HasPrefix(err.Error(), "object has no field")) { + return r, err + } + r, _, err = jsonpointer.GetForToken(s.SwaggerSchemaProps, token) + return r, err +} + +// WithID sets the id for this schema, allows for chaining +func (s *Schema) WithID(id string) *Schema { + s.ID = id + return s +} + +// WithTitle sets the title for this schema, allows for chaining +func (s *Schema) WithTitle(title string) *Schema { + s.Title = title + return s +} + +// WithDescription sets the description for this schema, allows for chaining +func (s *Schema) WithDescription(description string) *Schema { + s.Description = description + return s +} + +// WithProperties sets the properties for this schema +func (s *Schema) WithProperties(schemas map[string]Schema) *Schema { + s.Properties = schemas + return s +} + +// SetProperty sets a property on this schema +func (s *Schema) SetProperty(name string, schema Schema) *Schema { + if s.Properties == nil { + s.Properties = make(map[string]Schema) + } + s.Properties[name] = schema + return s +} + +// WithAllOf sets the all of property +func (s *Schema) WithAllOf(schemas ...Schema) *Schema { + s.AllOf = schemas + return s +} + +// WithMaxProperties sets the max number of properties an object can have +func (s *Schema) WithMaxProperties(max int64) *Schema { + s.MaxProperties = &max + return s +} + +// WithMinProperties sets the min number of properties an object must have +func (s *Schema) WithMinProperties(min int64) *Schema { + s.MinProperties = &min + return s +} + +// Typed sets the type of this schema for a single value item +func (s *Schema) Typed(tpe, format string) *Schema { + s.Type = []string{tpe} + s.Format = format + return s +} + +// AddType adds a type with potential format to the types for this schema +func (s *Schema) AddType(tpe, format string) *Schema { + s.Type = append(s.Type, tpe) + if format != "" { + s.Format = format + } + return s +} + +// AsNullable flags this schema as nullable. +func (s *Schema) AsNullable() *Schema { + s.Nullable = true + return s +} + +// CollectionOf a fluent builder method for an array parameter +func (s *Schema) CollectionOf(items Schema) *Schema { + s.Type = []string{jsonArray} + s.Items = &SchemaOrArray{Schema: &items} + return s +} + +// WithDefault sets the default value on this parameter +func (s *Schema) WithDefault(defaultValue interface{}) *Schema { + s.Default = defaultValue + return s +} + +// WithRequired flags this parameter as required +func (s *Schema) WithRequired(items ...string) *Schema { + s.Required = items + return s +} + +// AddRequired adds field names to the required properties array +func (s *Schema) AddRequired(items ...string) *Schema { + s.Required = append(s.Required, items...) + return s +} + +// WithMaxLength sets a max length value +func (s *Schema) WithMaxLength(max int64) *Schema { + s.MaxLength = &max + return s +} + +// WithMinLength sets a min length value +func (s *Schema) WithMinLength(min int64) *Schema { + s.MinLength = &min + return s +} + +// WithPattern sets a pattern value +func (s *Schema) WithPattern(pattern string) *Schema { + s.Pattern = pattern + return s +} + +// WithMultipleOf sets a multiple of value +func (s *Schema) WithMultipleOf(number float64) *Schema { + s.MultipleOf = &number + return s +} + +// WithMaximum sets a maximum number value +func (s *Schema) WithMaximum(max float64, exclusive bool) *Schema { + s.Maximum = &max + s.ExclusiveMaximum = exclusive + return s +} + +// WithMinimum sets a minimum number value +func (s *Schema) WithMinimum(min float64, exclusive bool) *Schema { + s.Minimum = &min + s.ExclusiveMinimum = exclusive + return s +} + +// WithEnum sets a the enum values (replace) +func (s *Schema) WithEnum(values ...interface{}) *Schema { + s.Enum = append([]interface{}{}, values...) + return s +} + +// WithMaxItems sets the max items +func (s *Schema) WithMaxItems(size int64) *Schema { + s.MaxItems = &size + return s +} + +// WithMinItems sets the min items +func (s *Schema) WithMinItems(size int64) *Schema { + s.MinItems = &size + return s +} + +// UniqueValues dictates that this array can only have unique items +func (s *Schema) UniqueValues() *Schema { + s.UniqueItems = true + return s +} + +// AllowDuplicates this array can have duplicates +func (s *Schema) AllowDuplicates() *Schema { + s.UniqueItems = false + return s +} + +// AddToAllOf adds a schema to the allOf property +func (s *Schema) AddToAllOf(schemas ...Schema) *Schema { + s.AllOf = append(s.AllOf, schemas...) + return s +} + +// WithDiscriminator sets the name of the discriminator field +func (s *Schema) WithDiscriminator(discriminator string) *Schema { + s.Discriminator = discriminator + return s +} + +// AsReadOnly flags this schema as readonly +func (s *Schema) AsReadOnly() *Schema { + s.ReadOnly = true + return s +} + +// AsWritable flags this schema as writeable (not read-only) +func (s *Schema) AsWritable() *Schema { + s.ReadOnly = false + return s +} + +// WithExample sets the example for this schema +func (s *Schema) WithExample(example interface{}) *Schema { + s.Example = example + return s +} + +// WithExternalDocs sets/removes the external docs for/from this schema. +// When you pass empty strings as params the external documents will be removed. +// When you pass non-empty string as one value then those values will be used on the external docs object. +// So when you pass a non-empty description, you should also pass the url and vice versa. +func (s *Schema) WithExternalDocs(description, url string) *Schema { + if description == "" && url == "" { + s.ExternalDocs = nil + return s + } + + if s.ExternalDocs == nil { + s.ExternalDocs = &ExternalDocumentation{} + } + s.ExternalDocs.Description = description + s.ExternalDocs.URL = url + return s +} + +// WithXMLName sets the xml name for the object +func (s *Schema) WithXMLName(name string) *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Name = name + return s +} + +// WithXMLNamespace sets the xml namespace for the object +func (s *Schema) WithXMLNamespace(namespace string) *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Namespace = namespace + return s +} + +// WithXMLPrefix sets the xml prefix for the object +func (s *Schema) WithXMLPrefix(prefix string) *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Prefix = prefix + return s +} + +// AsXMLAttribute flags this object as xml attribute +func (s *Schema) AsXMLAttribute() *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Attribute = true + return s +} + +// AsXMLElement flags this object as an xml node +func (s *Schema) AsXMLElement() *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Attribute = false + return s +} + +// AsWrappedXML flags this object as wrapped, this is mostly useful for array types +func (s *Schema) AsWrappedXML() *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Wrapped = true + return s +} + +// AsUnwrappedXML flags this object as an xml node +func (s *Schema) AsUnwrappedXML() *Schema { + if s.XML == nil { + s.XML = new(XMLObject) + } + s.XML.Wrapped = false + return s +} + +// MarshalJSON marshal this to JSON +func (s Schema) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(s.SchemaProps) + if err != nil { + return nil, fmt.Errorf("schema props %v", err) + } + b2, err := json.Marshal(s.VendorExtensible) + if err != nil { + return nil, fmt.Errorf("vendor props %v", err) + } + b3, err := s.Ref.MarshalJSON() + if err != nil { + return nil, fmt.Errorf("ref prop %v", err) + } + b4, err := s.Schema.MarshalJSON() + if err != nil { + return nil, fmt.Errorf("schema prop %v", err) + } + b5, err := json.Marshal(s.SwaggerSchemaProps) + if err != nil { + return nil, fmt.Errorf("common validations %v", err) + } + var b6 []byte + if s.ExtraProps != nil { + jj, err := json.Marshal(s.ExtraProps) + if err != nil { + return nil, fmt.Errorf("extra props %v", err) + } + b6 = jj + } + return swag.ConcatJSON(b1, b2, b3, b4, b5, b6), nil +} + +// UnmarshalJSON marshal this from JSON +func (s *Schema) UnmarshalJSON(data []byte) error { + props := struct { + SchemaProps + SwaggerSchemaProps + }{} + if err := json.Unmarshal(data, &props); err != nil { + return err + } + + sch := Schema{ + SchemaProps: props.SchemaProps, + SwaggerSchemaProps: props.SwaggerSchemaProps, + } + + var d map[string]interface{} + if err := json.Unmarshal(data, &d); err != nil { + return err + } + + _ = sch.Ref.fromMap(d) + _ = sch.Schema.fromMap(d) + + delete(d, "$ref") + delete(d, "$schema") + for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) { + delete(d, pn) + } + + for k, vv := range d { + lk := strings.ToLower(k) + if strings.HasPrefix(lk, "x-") { + if sch.Extensions == nil { + sch.Extensions = map[string]interface{}{} + } + sch.Extensions[k] = vv + continue + } + if sch.ExtraProps == nil { + sch.ExtraProps = map[string]interface{}{} + } + sch.ExtraProps[k] = vv + } + + *s = sch + + return nil +} diff --git a/vendor/github.com/go-openapi/spec/schema_loader.go b/vendor/github.com/go-openapi/spec/schema_loader.go new file mode 100644 index 00000000000..961d477571a --- /dev/null +++ b/vendor/github.com/go-openapi/spec/schema_loader.go @@ -0,0 +1,271 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + "fmt" + "log" + "net/url" + "reflect" + "strings" + + "github.com/go-openapi/swag" +) + +// PathLoader function to use when loading remote refs +var PathLoader func(string) (json.RawMessage, error) + +func init() { + PathLoader = func(path string) (json.RawMessage, error) { + data, err := swag.LoadFromFileOrHTTP(path) + if err != nil { + return nil, err + } + return json.RawMessage(data), nil + } +} + +// resolverContext allows to share a context during spec processing. +// At the moment, it just holds the index of circular references found. +type resolverContext struct { + // circulars holds all visited circular references, which allows shortcuts. + // NOTE: this is not just a performance improvement: it is required to figure out + // circular references which participate several cycles. + // This structure is privately instantiated and needs not be locked against + // concurrent access, unless we chose to implement a parallel spec walking. + circulars map[string]bool + basePath string +} + +func newResolverContext(originalBasePath string) *resolverContext { + return &resolverContext{ + circulars: make(map[string]bool), + basePath: originalBasePath, // keep the root base path in context + } +} + +type schemaLoader struct { + root interface{} + options *ExpandOptions + cache ResolutionCache + context *resolverContext + loadDoc func(string) (json.RawMessage, error) +} + +func (r *schemaLoader) transitiveResolver(basePath string, ref Ref) (*schemaLoader, error) { + if ref.IsRoot() || ref.HasFragmentOnly { + return r, nil + } + + baseRef, _ := NewRef(basePath) + currentRef := normalizeFileRef(&ref, basePath) + if strings.HasPrefix(currentRef.String(), baseRef.String()) { + return r, nil + } + + // Set a new root to resolve against + rootURL := currentRef.GetURL() + rootURL.Fragment = "" + root, _ := r.cache.Get(rootURL.String()) + + // shallow copy of resolver options to set a new RelativeBase when + // traversing multiple documents + newOptions := r.options + newOptions.RelativeBase = rootURL.String() + debugLog("setting new root: %s", newOptions.RelativeBase) + return defaultSchemaLoader(root, newOptions, r.cache, r.context) +} + +func (r *schemaLoader) updateBasePath(transitive *schemaLoader, basePath string) string { + if transitive != r { + debugLog("got a new resolver") + if transitive.options != nil && transitive.options.RelativeBase != "" { + basePath, _ = absPath(transitive.options.RelativeBase) + debugLog("new basePath = %s", basePath) + } + } + return basePath +} + +func (r *schemaLoader) resolveRef(ref *Ref, target interface{}, basePath string) error { + tgt := reflect.ValueOf(target) + if tgt.Kind() != reflect.Ptr { + return fmt.Errorf("resolve ref: target needs to be a pointer") + } + + refURL := ref.GetURL() + if refURL == nil { + return nil + } + + var res interface{} + var data interface{} + var err error + // Resolve against the root if it isn't nil, and if ref is pointing at the root, or has a fragment only which means + // it is pointing somewhere in the root. + root := r.root + if (ref.IsRoot() || ref.HasFragmentOnly) && root == nil && basePath != "" { + if baseRef, erb := NewRef(basePath); erb == nil { + root, _, _, _ = r.load(baseRef.GetURL()) + } + } + if (ref.IsRoot() || ref.HasFragmentOnly) && root != nil { + data = root + } else { + baseRef := normalizeFileRef(ref, basePath) + debugLog("current ref is: %s", ref.String()) + debugLog("current ref normalized file: %s", baseRef.String()) + data, _, _, err = r.load(baseRef.GetURL()) + if err != nil { + return err + } + } + + res = data + if ref.String() != "" { + res, _, err = ref.GetPointer().Get(data) + if err != nil { + return err + } + } + return swag.DynamicJSONToStruct(res, target) +} + +func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) { + debugLog("loading schema from url: %s", refURL) + toFetch := *refURL + toFetch.Fragment = "" + + normalized := normalizeAbsPath(toFetch.String()) + + data, fromCache := r.cache.Get(normalized) + if !fromCache { + b, err := r.loadDoc(normalized) + if err != nil { + debugLog("unable to load the document: %v", err) + return nil, url.URL{}, false, err + } + + if err := json.Unmarshal(b, &data); err != nil { + return nil, url.URL{}, false, err + } + r.cache.Set(normalized, data) + } + + return data, toFetch, fromCache, nil +} + +// isCircular detects cycles in sequences of $ref. +// It relies on a private context (which needs not be locked). +func (r *schemaLoader) isCircular(ref *Ref, basePath string, parentRefs ...string) (foundCycle bool) { + normalizedRef := normalizePaths(ref.String(), basePath) + if _, ok := r.context.circulars[normalizedRef]; ok { + // circular $ref has been already detected in another explored cycle + foundCycle = true + return + } + foundCycle = swag.ContainsStringsCI(parentRefs, normalizedRef) + if foundCycle { + r.context.circulars[normalizedRef] = true + } + return +} + +// Resolve resolves a reference against basePath and stores the result in target +// Resolve is not in charge of following references, it only resolves ref by following its URL +// if the schema that ref is referring to has more refs in it. Resolve doesn't resolve them +// if basePath is an empty string, ref is resolved against the root schema stored in the schemaLoader struct +func (r *schemaLoader) Resolve(ref *Ref, target interface{}, basePath string) error { + return r.resolveRef(ref, target, basePath) +} + +func (r *schemaLoader) deref(input interface{}, parentRefs []string, basePath string) error { + var ref *Ref + switch refable := input.(type) { + case *Schema: + ref = &refable.Ref + case *Parameter: + ref = &refable.Ref + case *Response: + ref = &refable.Ref + case *PathItem: + ref = &refable.Ref + default: + return fmt.Errorf("deref: unsupported type %T", input) + } + + curRef := ref.String() + if curRef != "" { + normalizedRef := normalizeFileRef(ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() + + if r.isCircular(normalizedRef, basePath, parentRefs...) { + return nil + } + + if err := r.resolveRef(ref, input, basePath); r.shouldStopOnError(err) { + return err + } + + // NOTE(fredbi): removed basePath check => needs more testing + if ref.String() != "" && ref.String() != curRef { + parentRefs = append(parentRefs, normalizedRef.String()) + return r.deref(input, parentRefs, normalizedBasePath) + } + } + + return nil +} + +func (r *schemaLoader) shouldStopOnError(err error) bool { + if err != nil && !r.options.ContinueOnError { + return true + } + + if err != nil { + log.Println(err) + } + + return false +} + +func defaultSchemaLoader( + root interface{}, + expandOptions *ExpandOptions, + cache ResolutionCache, + context *resolverContext) (*schemaLoader, error) { + + if cache == nil { + cache = resCache + } + if expandOptions == nil { + expandOptions = &ExpandOptions{} + } + absBase, _ := absPath(expandOptions.RelativeBase) + if context == nil { + context = newResolverContext(absBase) + } + return &schemaLoader{ + root: root, + options: expandOptions, + cache: cache, + context: context, + loadDoc: func(path string) (json.RawMessage, error) { + debugLog("fetching document at %q", path) + return PathLoader(path) + }, + }, nil +} diff --git a/vendor/github.com/go-openapi/spec/security_scheme.go b/vendor/github.com/go-openapi/spec/security_scheme.go new file mode 100644 index 00000000000..fe353842a6f --- /dev/null +++ b/vendor/github.com/go-openapi/spec/security_scheme.go @@ -0,0 +1,140 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +const ( + basic = "basic" + apiKey = "apiKey" + oauth2 = "oauth2" + implicit = "implicit" + password = "password" + application = "application" + accessCode = "accessCode" +) + +// BasicAuth creates a basic auth security scheme +func BasicAuth() *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{Type: basic}} +} + +// APIKeyAuth creates an api key auth security scheme +func APIKeyAuth(fieldName, valueSource string) *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{Type: apiKey, Name: fieldName, In: valueSource}} +} + +// OAuth2Implicit creates an implicit flow oauth2 security scheme +func OAuth2Implicit(authorizationURL string) *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{ + Type: oauth2, + Flow: implicit, + AuthorizationURL: authorizationURL, + }} +} + +// OAuth2Password creates a password flow oauth2 security scheme +func OAuth2Password(tokenURL string) *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{ + Type: oauth2, + Flow: password, + TokenURL: tokenURL, + }} +} + +// OAuth2Application creates an application flow oauth2 security scheme +func OAuth2Application(tokenURL string) *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{ + Type: oauth2, + Flow: application, + TokenURL: tokenURL, + }} +} + +// OAuth2AccessToken creates an access token flow oauth2 security scheme +func OAuth2AccessToken(authorizationURL, tokenURL string) *SecurityScheme { + return &SecurityScheme{SecuritySchemeProps: SecuritySchemeProps{ + Type: oauth2, + Flow: accessCode, + AuthorizationURL: authorizationURL, + TokenURL: tokenURL, + }} +} + +// SecuritySchemeProps describes a swagger security scheme in the securityDefinitions section +type SecuritySchemeProps struct { + Description string `json:"description,omitempty"` + Type string `json:"type"` + Name string `json:"name,omitempty"` // api key + In string `json:"in,omitempty"` // api key + Flow string `json:"flow,omitempty"` // oauth2 + AuthorizationURL string `json:"authorizationUrl,omitempty"` // oauth2 + TokenURL string `json:"tokenUrl,omitempty"` // oauth2 + Scopes map[string]string `json:"scopes,omitempty"` // oauth2 +} + +// AddScope adds a scope to this security scheme +func (s *SecuritySchemeProps) AddScope(scope, description string) { + if s.Scopes == nil { + s.Scopes = make(map[string]string) + } + s.Scopes[scope] = description +} + +// SecurityScheme allows the definition of a security scheme that can be used by the operations. +// Supported schemes are basic authentication, an API key (either as a header or as a query parameter) +// and OAuth2's common flows (implicit, password, application and access code). +// +// For more information: http://goo.gl/8us55a#securitySchemeObject +type SecurityScheme struct { + VendorExtensible + SecuritySchemeProps +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s SecurityScheme) JSONLookup(token string) (interface{}, error) { + if ex, ok := s.Extensions[token]; ok { + return &ex, nil + } + + r, _, err := jsonpointer.GetForToken(s.SecuritySchemeProps, token) + return r, err +} + +// MarshalJSON marshal this to JSON +func (s SecurityScheme) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(s.SecuritySchemeProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(s.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} + +// UnmarshalJSON marshal this from JSON +func (s *SecurityScheme) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &s.SecuritySchemeProps); err != nil { + return err + } + return json.Unmarshal(data, &s.VendorExtensible) +} diff --git a/vendor/github.com/go-openapi/spec/spec.go b/vendor/github.com/go-openapi/spec/spec.go new file mode 100644 index 00000000000..0bb045bc06a --- /dev/null +++ b/vendor/github.com/go-openapi/spec/spec.go @@ -0,0 +1,86 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import "encoding/json" + +//go:generate curl -L --progress -o ./schemas/v2/schema.json http://swagger.io/v2/schema.json +//go:generate curl -L --progress -o ./schemas/jsonschema-draft-04.json http://json-schema.org/draft-04/schema +//go:generate go-bindata -pkg=spec -prefix=./schemas -ignore=.*\.md ./schemas/... +//go:generate perl -pi -e s,Json,JSON,g bindata.go + +const ( + // SwaggerSchemaURL the url for the swagger 2.0 schema to validate specs + SwaggerSchemaURL = "http://swagger.io/v2/schema.json#" + // JSONSchemaURL the url for the json schema schema + JSONSchemaURL = "http://json-schema.org/draft-04/schema#" +) + +var ( + jsonSchema *Schema + swaggerSchema *Schema +) + +func init() { + jsonSchema = MustLoadJSONSchemaDraft04() + swaggerSchema = MustLoadSwagger20Schema() +} + +// MustLoadJSONSchemaDraft04 panics when Swagger20Schema returns an error +func MustLoadJSONSchemaDraft04() *Schema { + d, e := JSONSchemaDraft04() + if e != nil { + panic(e) + } + return d +} + +// JSONSchemaDraft04 loads the json schema document for json shema draft04 +func JSONSchemaDraft04() (*Schema, error) { + b, err := Asset("jsonschema-draft-04.json") + if err != nil { + return nil, err + } + + schema := new(Schema) + if err := json.Unmarshal(b, schema); err != nil { + return nil, err + } + return schema, nil +} + +// MustLoadSwagger20Schema panics when Swagger20Schema returns an error +func MustLoadSwagger20Schema() *Schema { + d, e := Swagger20Schema() + if e != nil { + panic(e) + } + return d +} + +// Swagger20Schema loads the swagger 2.0 schema from the embedded assets +func Swagger20Schema() (*Schema, error) { + + b, err := Asset("v2/schema.json") + if err != nil { + return nil, err + } + + schema := new(Schema) + if err := json.Unmarshal(b, schema); err != nil { + return nil, err + } + return schema, nil +} diff --git a/vendor/github.com/go-openapi/spec/swagger.go b/vendor/github.com/go-openapi/spec/swagger.go new file mode 100644 index 00000000000..44722ffd5ad --- /dev/null +++ b/vendor/github.com/go-openapi/spec/swagger.go @@ -0,0 +1,448 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "bytes" + "encoding/gob" + "encoding/json" + "fmt" + "strconv" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// Swagger this is the root document object for the API specification. +// It combines what previously was the Resource Listing and API Declaration (version 1.2 and earlier) +// together into one document. +// +// For more information: http://goo.gl/8us55a#swagger-object- +type Swagger struct { + VendorExtensible + SwaggerProps +} + +// JSONLookup look up a value by the json property name +func (s Swagger) JSONLookup(token string) (interface{}, error) { + if ex, ok := s.Extensions[token]; ok { + return &ex, nil + } + r, _, err := jsonpointer.GetForToken(s.SwaggerProps, token) + return r, err +} + +// MarshalJSON marshals this swagger structure to json +func (s Swagger) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(s.SwaggerProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(s.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} + +// UnmarshalJSON unmarshals a swagger spec from json +func (s *Swagger) UnmarshalJSON(data []byte) error { + var sw Swagger + if err := json.Unmarshal(data, &sw.SwaggerProps); err != nil { + return err + } + if err := json.Unmarshal(data, &sw.VendorExtensible); err != nil { + return err + } + *s = sw + return nil +} + +// GobEncode provides a safe gob encoder for Swagger, including extensions +func (s Swagger) GobEncode() ([]byte, error) { + var b bytes.Buffer + raw := struct { + Props SwaggerProps + Ext VendorExtensible + }{ + Props: s.SwaggerProps, + Ext: s.VendorExtensible, + } + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err +} + +// GobDecode provides a safe gob decoder for Swagger, including extensions +func (s *Swagger) GobDecode(b []byte) error { + var raw struct { + Props SwaggerProps + Ext VendorExtensible + } + buf := bytes.NewBuffer(b) + err := gob.NewDecoder(buf).Decode(&raw) + if err != nil { + return err + } + s.SwaggerProps = raw.Props + s.VendorExtensible = raw.Ext + return nil +} + +// SwaggerProps captures the top-level properties of an Api specification +// +// NOTE: validation rules +// - the scheme, when present must be from [http, https, ws, wss] +// - BasePath must start with a leading "/" +// - Paths is required +type SwaggerProps struct { + ID string `json:"id,omitempty"` + Consumes []string `json:"consumes,omitempty"` + Produces []string `json:"produces,omitempty"` + Schemes []string `json:"schemes,omitempty"` + Swagger string `json:"swagger,omitempty"` + Info *Info `json:"info,omitempty"` + Host string `json:"host,omitempty"` + BasePath string `json:"basePath,omitempty"` + Paths *Paths `json:"paths"` + Definitions Definitions `json:"definitions,omitempty"` + Parameters map[string]Parameter `json:"parameters,omitempty"` + Responses map[string]Response `json:"responses,omitempty"` + SecurityDefinitions SecurityDefinitions `json:"securityDefinitions,omitempty"` + Security []map[string][]string `json:"security,omitempty"` + Tags []Tag `json:"tags,omitempty"` + ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` +} + +type swaggerPropsAlias SwaggerProps + +type gobSwaggerPropsAlias struct { + Security []map[string]struct { + List []string + Pad bool + } + Alias *swaggerPropsAlias + SecurityIsEmpty bool +} + +// GobEncode provides a safe gob encoder for SwaggerProps, including empty security requirements +func (o SwaggerProps) GobEncode() ([]byte, error) { + raw := gobSwaggerPropsAlias{ + Alias: (*swaggerPropsAlias)(&o), + } + + var b bytes.Buffer + if o.Security == nil { + // nil security requirement + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err + } + + if len(o.Security) == 0 { + // empty, but non-nil security requirement + raw.SecurityIsEmpty = true + raw.Alias.Security = nil + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err + } + + raw.Security = make([]map[string]struct { + List []string + Pad bool + }, 0, len(o.Security)) + for _, req := range o.Security { + v := make(map[string]struct { + List []string + Pad bool + }, len(req)) + for k, val := range req { + v[k] = struct { + List []string + Pad bool + }{ + List: val, + } + } + raw.Security = append(raw.Security, v) + } + + err := gob.NewEncoder(&b).Encode(raw) + return b.Bytes(), err +} + +// GobDecode provides a safe gob decoder for SwaggerProps, including empty security requirements +func (o *SwaggerProps) GobDecode(b []byte) error { + var raw gobSwaggerPropsAlias + + buf := bytes.NewBuffer(b) + err := gob.NewDecoder(buf).Decode(&raw) + if err != nil { + return err + } + if raw.Alias == nil { + return nil + } + + switch { + case raw.SecurityIsEmpty: + // empty, but non-nil security requirement + raw.Alias.Security = []map[string][]string{} + case len(raw.Alias.Security) == 0: + // nil security requirement + raw.Alias.Security = nil + default: + raw.Alias.Security = make([]map[string][]string, 0, len(raw.Security)) + for _, req := range raw.Security { + v := make(map[string][]string, len(req)) + for k, val := range req { + v[k] = make([]string, 0, len(val.List)) + v[k] = append(v[k], val.List...) + } + raw.Alias.Security = append(raw.Alias.Security, v) + } + } + + *o = *(*SwaggerProps)(raw.Alias) + return nil +} + +// Dependencies represent a dependencies property +type Dependencies map[string]SchemaOrStringArray + +// SchemaOrBool represents a schema or boolean value, is biased towards true for the boolean property +type SchemaOrBool struct { + Allows bool + Schema *Schema +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s SchemaOrBool) JSONLookup(token string) (interface{}, error) { + if token == "allows" { + return s.Allows, nil + } + r, _, err := jsonpointer.GetForToken(s.Schema, token) + return r, err +} + +var jsTrue = []byte("true") +var jsFalse = []byte("false") + +// MarshalJSON convert this object to JSON +func (s SchemaOrBool) MarshalJSON() ([]byte, error) { + if s.Schema != nil { + return json.Marshal(s.Schema) + } + + if s.Schema == nil && !s.Allows { + return jsFalse, nil + } + return jsTrue, nil +} + +// UnmarshalJSON converts this bool or schema object from a JSON structure +func (s *SchemaOrBool) UnmarshalJSON(data []byte) error { + var nw SchemaOrBool + if len(data) >= 4 { + if data[0] == '{' { + var sch Schema + if err := json.Unmarshal(data, &sch); err != nil { + return err + } + nw.Schema = &sch + } + nw.Allows = !(data[0] == 'f' && data[1] == 'a' && data[2] == 'l' && data[3] == 's' && data[4] == 'e') + } + *s = nw + return nil +} + +// SchemaOrStringArray represents a schema or a string array +type SchemaOrStringArray struct { + Schema *Schema + Property []string +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s SchemaOrStringArray) JSONLookup(token string) (interface{}, error) { + r, _, err := jsonpointer.GetForToken(s.Schema, token) + return r, err +} + +// MarshalJSON converts this schema object or array into JSON structure +func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) { + if len(s.Property) > 0 { + return json.Marshal(s.Property) + } + if s.Schema != nil { + return json.Marshal(s.Schema) + } + return []byte("null"), nil +} + +// UnmarshalJSON converts this schema object or array from a JSON structure +func (s *SchemaOrStringArray) UnmarshalJSON(data []byte) error { + var first byte + if len(data) > 1 { + first = data[0] + } + var nw SchemaOrStringArray + if first == '{' { + var sch Schema + if err := json.Unmarshal(data, &sch); err != nil { + return err + } + nw.Schema = &sch + } + if first == '[' { + if err := json.Unmarshal(data, &nw.Property); err != nil { + return err + } + } + *s = nw + return nil +} + +// Definitions contains the models explicitly defined in this spec +// An object to hold data types that can be consumed and produced by operations. +// These data types can be primitives, arrays or models. +// +// For more information: http://goo.gl/8us55a#definitionsObject +type Definitions map[string]Schema + +// SecurityDefinitions a declaration of the security schemes available to be used in the specification. +// This does not enforce the security schemes on the operations and only serves to provide +// the relevant details for each scheme. +// +// For more information: http://goo.gl/8us55a#securityDefinitionsObject +type SecurityDefinitions map[string]*SecurityScheme + +// StringOrArray represents a value that can either be a string +// or an array of strings. Mainly here for serialization purposes +type StringOrArray []string + +// Contains returns true when the value is contained in the slice +func (s StringOrArray) Contains(value string) bool { + for _, str := range s { + if str == value { + return true + } + } + return false +} + +// JSONLookup implements an interface to customize json pointer lookup +func (s SchemaOrArray) JSONLookup(token string) (interface{}, error) { + if _, err := strconv.Atoi(token); err == nil { + r, _, err := jsonpointer.GetForToken(s.Schemas, token) + return r, err + } + r, _, err := jsonpointer.GetForToken(s.Schema, token) + return r, err +} + +// UnmarshalJSON unmarshals this string or array object from a JSON array or JSON string +func (s *StringOrArray) UnmarshalJSON(data []byte) error { + var first byte + if len(data) > 1 { + first = data[0] + } + + if first == '[' { + var parsed []string + if err := json.Unmarshal(data, &parsed); err != nil { + return err + } + *s = StringOrArray(parsed) + return nil + } + + var single interface{} + if err := json.Unmarshal(data, &single); err != nil { + return err + } + if single == nil { + return nil + } + switch v := single.(type) { + case string: + *s = StringOrArray([]string{v}) + return nil + default: + return fmt.Errorf("only string or array is allowed, not %T", single) + } +} + +// MarshalJSON converts this string or array to a JSON array or JSON string +func (s StringOrArray) MarshalJSON() ([]byte, error) { + if len(s) == 1 { + return json.Marshal([]string(s)[0]) + } + return json.Marshal([]string(s)) +} + +// SchemaOrArray represents a value that can either be a Schema +// or an array of Schema. Mainly here for serialization purposes +type SchemaOrArray struct { + Schema *Schema + Schemas []Schema +} + +// Len returns the number of schemas in this property +func (s SchemaOrArray) Len() int { + if s.Schema != nil { + return 1 + } + return len(s.Schemas) +} + +// ContainsType returns true when one of the schemas is of the specified type +func (s *SchemaOrArray) ContainsType(name string) bool { + if s.Schema != nil { + return s.Schema.Type != nil && s.Schema.Type.Contains(name) + } + return false +} + +// MarshalJSON converts this schema object or array into JSON structure +func (s SchemaOrArray) MarshalJSON() ([]byte, error) { + if len(s.Schemas) > 0 { + return json.Marshal(s.Schemas) + } + return json.Marshal(s.Schema) +} + +// UnmarshalJSON converts this schema object or array from a JSON structure +func (s *SchemaOrArray) UnmarshalJSON(data []byte) error { + var nw SchemaOrArray + var first byte + if len(data) > 1 { + first = data[0] + } + if first == '{' { + var sch Schema + if err := json.Unmarshal(data, &sch); err != nil { + return err + } + nw.Schema = &sch + } + if first == '[' { + if err := json.Unmarshal(data, &nw.Schemas); err != nil { + return err + } + } + *s = nw + return nil +} + +// vim:set ft=go noet sts=2 sw=2 ts=2: diff --git a/vendor/github.com/go-openapi/spec/tag.go b/vendor/github.com/go-openapi/spec/tag.go new file mode 100644 index 00000000000..faa3d3de1eb --- /dev/null +++ b/vendor/github.com/go-openapi/spec/tag.go @@ -0,0 +1,75 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +import ( + "encoding/json" + + "github.com/go-openapi/jsonpointer" + "github.com/go-openapi/swag" +) + +// TagProps describe a tag entry in the top level tags section of a swagger spec +type TagProps struct { + Description string `json:"description,omitempty"` + Name string `json:"name,omitempty"` + ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` +} + +// NewTag creates a new tag +func NewTag(name, description string, externalDocs *ExternalDocumentation) Tag { + return Tag{TagProps: TagProps{Description: description, Name: name, ExternalDocs: externalDocs}} +} + +// Tag allows adding meta data to a single tag that is used by the +// [Operation Object](http://goo.gl/8us55a#operationObject). +// It is not mandatory to have a Tag Object per tag used there. +// +// For more information: http://goo.gl/8us55a#tagObject +type Tag struct { + VendorExtensible + TagProps +} + +// JSONLookup implements an interface to customize json pointer lookup +func (t Tag) JSONLookup(token string) (interface{}, error) { + if ex, ok := t.Extensions[token]; ok { + return &ex, nil + } + + r, _, err := jsonpointer.GetForToken(t.TagProps, token) + return r, err +} + +// MarshalJSON marshal this to JSON +func (t Tag) MarshalJSON() ([]byte, error) { + b1, err := json.Marshal(t.TagProps) + if err != nil { + return nil, err + } + b2, err := json.Marshal(t.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b1, b2), nil +} + +// UnmarshalJSON marshal this from JSON +func (t *Tag) UnmarshalJSON(data []byte) error { + if err := json.Unmarshal(data, &t.TagProps); err != nil { + return err + } + return json.Unmarshal(data, &t.VendorExtensible) +} diff --git a/vendor/github.com/go-openapi/spec/unused.go b/vendor/github.com/go-openapi/spec/unused.go new file mode 100644 index 00000000000..aa12b56f6e4 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/unused.go @@ -0,0 +1,174 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +/* + +import ( + "net/url" + "os" + "path" + "path/filepath" + + "github.com/go-openapi/jsonpointer" +) + + // Some currently unused functions and definitions that + // used to be part of the expander. + + // Moved here for the record and possible future reuse + +var ( + idPtr, _ = jsonpointer.New("/id") + refPtr, _ = jsonpointer.New("/$ref") +) + +func idFromNode(node interface{}) (*Ref, error) { + if idValue, _, err := idPtr.Get(node); err == nil { + if refStr, ok := idValue.(string); ok && refStr != "" { + idRef, err := NewRef(refStr) + if err != nil { + return nil, err + } + return &idRef, nil + } + } + return nil, nil +} + +func nextRef(startingNode interface{}, startingRef *Ref, ptr *jsonpointer.Pointer) *Ref { + if startingRef == nil { + return nil + } + + if ptr == nil { + return startingRef + } + + ret := startingRef + var idRef *Ref + node := startingNode + + for _, tok := range ptr.DecodedTokens() { + node, _, _ = jsonpointer.GetForToken(node, tok) + if node == nil { + break + } + + idRef, _ = idFromNode(node) + if idRef != nil { + nw, err := ret.Inherits(*idRef) + if err != nil { + break + } + ret = nw + } + + refRef, _, _ := refPtr.Get(node) + if refRef != nil { + var rf Ref + switch value := refRef.(type) { + case string: + rf, _ = NewRef(value) + } + nw, err := ret.Inherits(rf) + if err != nil { + break + } + nwURL := nw.GetURL() + if nwURL.Scheme == "file" || (nwURL.Scheme == "" && nwURL.Host == "") { + nwpt := filepath.ToSlash(nwURL.Path) + if filepath.IsAbs(nwpt) { + _, err := os.Stat(nwpt) + if err != nil { + nwURL.Path = filepath.Join(".", nwpt) + } + } + } + + ret = nw + } + + } + + return ret +} + +// basePathFromSchemaID returns a new basePath based on an existing basePath and a schema ID +func basePathFromSchemaID(oldBasePath, id string) string { + u, err := url.Parse(oldBasePath) + if err != nil { + panic(err) + } + uid, err := url.Parse(id) + if err != nil { + panic(err) + } + + if path.IsAbs(uid.Path) { + return id + } + u.Path = path.Join(path.Dir(u.Path), uid.Path) + return u.String() +} +*/ + +// type ExtraSchemaProps map[string]interface{} + +// // JSONSchema represents a structure that is a json schema draft 04 +// type JSONSchema struct { +// SchemaProps +// ExtraSchemaProps +// } + +// // MarshalJSON marshal this to JSON +// func (s JSONSchema) MarshalJSON() ([]byte, error) { +// b1, err := json.Marshal(s.SchemaProps) +// if err != nil { +// return nil, err +// } +// b2, err := s.Ref.MarshalJSON() +// if err != nil { +// return nil, err +// } +// b3, err := s.Schema.MarshalJSON() +// if err != nil { +// return nil, err +// } +// b4, err := json.Marshal(s.ExtraSchemaProps) +// if err != nil { +// return nil, err +// } +// return swag.ConcatJSON(b1, b2, b3, b4), nil +// } + +// // UnmarshalJSON marshal this from JSON +// func (s *JSONSchema) UnmarshalJSON(data []byte) error { +// var sch JSONSchema +// if err := json.Unmarshal(data, &sch.SchemaProps); err != nil { +// return err +// } +// if err := json.Unmarshal(data, &sch.Ref); err != nil { +// return err +// } +// if err := json.Unmarshal(data, &sch.Schema); err != nil { +// return err +// } +// if err := json.Unmarshal(data, &sch.ExtraSchemaProps); err != nil { +// return err +// } +// *s = sch +// return nil +// } diff --git a/vendor/github.com/go-openapi/spec/xml_object.go b/vendor/github.com/go-openapi/spec/xml_object.go new file mode 100644 index 00000000000..945a46703d5 --- /dev/null +++ b/vendor/github.com/go-openapi/spec/xml_object.go @@ -0,0 +1,68 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package spec + +// XMLObject a metadata object that allows for more fine-tuned XML model definitions. +// +// For more information: http://goo.gl/8us55a#xmlObject +type XMLObject struct { + Name string `json:"name,omitempty"` + Namespace string `json:"namespace,omitempty"` + Prefix string `json:"prefix,omitempty"` + Attribute bool `json:"attribute,omitempty"` + Wrapped bool `json:"wrapped,omitempty"` +} + +// WithName sets the xml name for the object +func (x *XMLObject) WithName(name string) *XMLObject { + x.Name = name + return x +} + +// WithNamespace sets the xml namespace for the object +func (x *XMLObject) WithNamespace(namespace string) *XMLObject { + x.Namespace = namespace + return x +} + +// WithPrefix sets the xml prefix for the object +func (x *XMLObject) WithPrefix(prefix string) *XMLObject { + x.Prefix = prefix + return x +} + +// AsAttribute flags this object as xml attribute +func (x *XMLObject) AsAttribute() *XMLObject { + x.Attribute = true + return x +} + +// AsElement flags this object as an xml node +func (x *XMLObject) AsElement() *XMLObject { + x.Attribute = false + return x +} + +// AsWrapped flags this object as wrapped, this is mostly useful for array types +func (x *XMLObject) AsWrapped() *XMLObject { + x.Wrapped = true + return x +} + +// AsUnwrapped flags this object as an xml node +func (x *XMLObject) AsUnwrapped() *XMLObject { + x.Wrapped = false + return x +} diff --git a/vendor/github.com/go-openapi/strfmt/.editorconfig b/vendor/github.com/go-openapi/strfmt/.editorconfig new file mode 100644 index 00000000000..3152da69a5d --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/.editorconfig @@ -0,0 +1,26 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +# Set default charset +[*.{js,py,go,scala,rb,java,html,css,less,sass,md}] +charset = utf-8 + +# Tab indentation (no size specified) +[*.go] +indent_style = tab + +[*.md] +trim_trailing_whitespace = false + +# Matches the exact files either package.json or .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 diff --git a/vendor/github.com/go-openapi/strfmt/.gitignore b/vendor/github.com/go-openapi/strfmt/.gitignore new file mode 100644 index 00000000000..dd91ed6a04e --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/.gitignore @@ -0,0 +1,2 @@ +secrets.yml +coverage.out diff --git a/vendor/github.com/go-openapi/strfmt/.golangci.yml b/vendor/github.com/go-openapi/strfmt/.golangci.yml new file mode 100644 index 00000000000..03ffa31a4ee --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/.golangci.yml @@ -0,0 +1,36 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 31 + maligned: + suggest-new: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 4 + +linters: + enable-all: true + disable: + - maligned + - lll + - gochecknoinits + - gochecknoglobals + - godox + - gocognit + - whitespace + - wsl + - funlen + +issues: + exclude-rules: + - path: bson.go + text: "should be .*ObjectID" + linters: + - golint + - stylecheck + diff --git a/vendor/github.com/go-openapi/strfmt/.travis.yml b/vendor/github.com/go-openapi/strfmt/.travis.yml new file mode 100644 index 00000000000..eb962aebcda --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/.travis.yml @@ -0,0 +1,15 @@ +after_success: +- bash <(curl -s https://codecov.io/bash) +go: +- 1.11.x +- 1.12.x +install: +- GO111MODULE=off go get -u gotest.tools/gotestsum +language: go +env: +- GO111MODULE=on +notifications: + slack: + secure: zE5AtIYTpYfQPnTzP+EaQPN7JKtfFAGv6PrJqoIZLOXa8B6zGb6+J1JRNNxWi7faWbyJOxa4FSSsuPsKZMycUK6wlLFIdhDxwqeo7Ew8r6rdZKdfUHQggfNS9wO79ARoNYUDHtmnaBUS+eWSM1YqSc4i99QxyyfuURLOeAaA/q14YbdlTlaw3lrZ0qT92ot1FnVGNOx064zuHtFeUf+jAVRMZ6Q3rvqllwIlPszE6rmHGXBt2VoJxRaBetdwd7FgkcYw9FPXKHhadwC7/75ZAdmxIukhxNMw4Tr5NuPcqNcnbYLenDP7B3lssGVIrP4BRSqekS1d/tqvdvnnFWHMwrNCkSnSc065G5+qWTlXKAemIclgiXXqE2furBNLm05MDdG8fn5epS0UNarkjD+zX336RiqwBlOX4KbF+vPyqcO98CsN0lnd+H6loc9reiTHs37orFFpQ+309av9be2GGsHUsRB9ssIyrewmhAccOmkRtr2dVTZJNFQwa5Kph5TNJuTjnZEwG/xUkEX2YSfwShOsb062JWiflV6PJdnl80pc9Tn7D5sO5Bf9DbijGRJwwP+YiiJtwtr+vsvS+n4sM0b5eqm4UoRo+JJO8ffoJtHS7ItuyRbVQCwEPJ4221WLcf5PquEEDdAPwR+K4Gj8qTXqTDdxOiES1xFUKVgmzhI= +script: +- gotestsum -f short-verbose -- -race -coverprofile=coverage.txt -covermode=atomic ./... diff --git a/vendor/github.com/go-openapi/strfmt/CODE_OF_CONDUCT.md b/vendor/github.com/go-openapi/strfmt/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..9322b065e37 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at ivan+abuse@flanders.co.nz. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/go-openapi/strfmt/LICENSE b/vendor/github.com/go-openapi/strfmt/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-openapi/strfmt/README.md b/vendor/github.com/go-openapi/strfmt/README.md new file mode 100644 index 00000000000..b2645ce18a3 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/README.md @@ -0,0 +1,86 @@ +# Strfmt [![Build Status](https://travis-ci.org/go-openapi/strfmt.svg?branch=master)](https://travis-ci.org/go-openapi/strfmt) [![codecov](https://codecov.io/gh/go-openapi/strfmt/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/strfmt) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) + +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/strfmt/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/go-openapi/strfmt?status.svg)](http://godoc.org/github.com/go-openapi/strfmt) +[![GolangCI](https://golangci.com/badges/github.com/go-openapi/strfmt.svg)](https://golangci.com) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/strfmt)](https://goreportcard.com/report/github.com/go-openapi/strfmt) + +This package exposes a registry of data types to support string formats in the go-openapi toolkit. + +strfmt represents a well known string format such as credit card or email. The go toolkit for OpenAPI specifications knows how to deal with those. + +## Supported data formats +go-openapi/strfmt follows the swagger 2.0 specification with the following formats +defined [here](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types). + +It also provides convenient extensions to go-openapi users. + +- [x] JSON-schema draft 4 formats + - date-time + - email + - hostname + - ipv4 + - ipv6 + - uri +- [x] swagger 2.0 format extensions + - binary + - byte (e.g. base64 encoded string) + - date (e.g. "1970-01-01") + - password +- [x] go-openapi custom format extensions + - bsonobjectid (BSON objectID) + - creditcard + - duration (e.g. "3 weeks", "1ms") + - hexcolor (e.g. "#FFFFFF") + - isbn, isbn10, isbn13 + - mac (e.g "01:02:03:04:05:06") + - rgbcolor (e.g. "rgb(100,100,100)") + - ssn + - uuid, uuid3, uuid4, uuid5 + - cidr (e.g. "192.0.2.1/24", "2001:db8:a0b:12f0::1/32") + +> NOTE: as the name stands for, this package is intended to support string formatting only. +> It does not provide validation for numerical values with swagger format extension for JSON types "number" or +> "integer" (e.g. float, double, int32...). + +## Type conversion + +All types defined here are stringers and may be converted to strings with `.String()`. +Note that most types defined by this package may be converted directly to string like `string(Email{})`. + +`Date` and `DateTime` may be converted directly to `time.Time` like `time.Time(Time{})`. +Similarly, you can convert `Duration` to `time.Duration` as in `time.Duration(Duration{})` + +## Using pointers + +The `conv` subpackage provides helpers to convert the types to and from pointers, just like `go-openapi/swag` does +with primitive types. + +## Format types +Types defined in strfmt expose marshaling and validation capabilities. + +List of defined types: +- Base64 +- CreditCard +- Date +- DateTime +- Duration +- Email +- HexColor +- Hostname +- IPv4 +- IPv6 +- CIDR +- ISBN +- ISBN10 +- ISBN13 +- MAC +- ObjectId +- Password +- RGBColor +- SSN +- URI +- UUID +- UUID3 +- UUID4 +- UUID5 diff --git a/vendor/github.com/go-openapi/strfmt/bson.go b/vendor/github.com/go-openapi/strfmt/bson.go new file mode 100644 index 00000000000..c1496122182 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/bson.go @@ -0,0 +1,165 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package strfmt + +import ( + "database/sql/driver" + "fmt" + + "go.mongodb.org/mongo-driver/bson" + + "go.mongodb.org/mongo-driver/bson/bsontype" + bsonprim "go.mongodb.org/mongo-driver/bson/primitive" +) + +func init() { + var id ObjectId + // register this format in the default registry + Default.Add("bsonobjectid", &id, IsBSONObjectID) +} + +// IsBSONObjectID returns true when the string is a valid BSON.ObjectId +func IsBSONObjectID(str string) bool { + _, err := bsonprim.ObjectIDFromHex(str) + return err == nil +} + +// ObjectId represents a BSON object ID (alias to go.mongodb.org/mongo-driver/bson/primitive.ObjectID) +// +// swagger:strfmt bsonobjectid +type ObjectId bsonprim.ObjectID + +// NewObjectId creates a ObjectId from a Hex String +func NewObjectId(hex string) ObjectId { + oid, err := bsonprim.ObjectIDFromHex(hex) + if err != nil { + panic(err) + } + return ObjectId(oid) +} + +// MarshalText turns this instance into text +func (id ObjectId) MarshalText() ([]byte, error) { + oid := bsonprim.ObjectID(id) + if oid == bsonprim.NilObjectID { + return nil, nil + } + return []byte(oid.Hex()), nil +} + +// UnmarshalText hydrates this instance from text +func (id *ObjectId) UnmarshalText(data []byte) error { // validation is performed later on + if len(data) == 0 { + *id = ObjectId(bsonprim.NilObjectID) + return nil + } + oidstr := string(data) + oid, err := bsonprim.ObjectIDFromHex(oidstr) + if err != nil { + return err + } + *id = ObjectId(oid) + return nil +} + +// Scan read a value from a database driver +func (id *ObjectId) Scan(raw interface{}) error { + var data []byte + switch v := raw.(type) { + case []byte: + data = v + case string: + data = []byte(v) + default: + return fmt.Errorf("cannot sql.Scan() strfmt.URI from: %#v", v) + } + + return id.UnmarshalText(data) +} + +// Value converts a value to a database driver value +func (id ObjectId) Value() (driver.Value, error) { + return driver.Value(bsonprim.ObjectID(id).Hex()), nil +} + +func (id ObjectId) String() string { + return bsonprim.ObjectID(id).String() +} + +// MarshalJSON returns the ObjectId as JSON +func (id ObjectId) MarshalJSON() ([]byte, error) { + return bsonprim.ObjectID(id).MarshalJSON() +} + +// UnmarshalJSON sets the ObjectId from JSON +func (id *ObjectId) UnmarshalJSON(data []byte) error { + var obj bsonprim.ObjectID + if err := obj.UnmarshalJSON(data); err != nil { + return err + } + *id = ObjectId(obj) + return nil +} + +// MarshalBSON renders the object id as a BSON document +func (id ObjectId) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": bsonprim.ObjectID(id)}) +} + +// UnmarshalBSON reads the objectId from a BSON document +func (id *ObjectId) UnmarshalBSON(data []byte) error { + var obj struct { + Data bsonprim.ObjectID + } + if err := bson.Unmarshal(data, &obj); err != nil { + return err + } + *id = ObjectId(obj.Data) + return nil +} + +// MarshalBSONValue is an interface implemented by types that can marshal themselves +// into a BSON document represented as bytes. The bytes returned must be a valid +// BSON document if the error is nil. +func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) { + oid := bsonprim.ObjectID(id) + return bsontype.ObjectID, oid[:], nil +} + +// UnmarshalBSONValue is an interface implemented by types that can unmarshal a +// BSON value representation of themselves. The BSON bytes and type can be +// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it +// wishes to retain the data after returning. +func (id *ObjectId) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error { + var oid bsonprim.ObjectID + copy(oid[:], data) + *id = ObjectId(oid) + return nil +} + +// DeepCopyInto copies the receiver and writes its value into out. +func (id *ObjectId) DeepCopyInto(out *ObjectId) { + *out = *id +} + +// DeepCopy copies the receiver into a new ObjectId. +func (id *ObjectId) DeepCopy() *ObjectId { + if id == nil { + return nil + } + out := new(ObjectId) + id.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/go-openapi/strfmt/date.go b/vendor/github.com/go-openapi/strfmt/date.go new file mode 100644 index 00000000000..15029ffa2fe --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/date.go @@ -0,0 +1,182 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package strfmt + +import ( + "database/sql/driver" + "encoding/json" + "errors" + "fmt" + "time" + + "go.mongodb.org/mongo-driver/bson" +) + +func init() { + d := Date{} + // register this format in the default registry + Default.Add("date", &d, IsDate) +} + +// IsDate returns true when the string is a valid date +func IsDate(str string) bool { + _, err := time.Parse(RFC3339FullDate, str) + return err == nil +} + +const ( + // RFC3339FullDate represents a full-date as specified by RFC3339 + // See: http://goo.gl/xXOvVd + RFC3339FullDate = "2006-01-02" +) + +// Date represents a date from the API +// +// swagger:strfmt date +type Date time.Time + +// String converts this date into a string +func (d Date) String() string { + return time.Time(d).Format(RFC3339FullDate) +} + +// UnmarshalText parses a text representation into a date type +func (d *Date) UnmarshalText(text []byte) error { + if len(text) == 0 { + return nil + } + dd, err := time.Parse(RFC3339FullDate, string(text)) + if err != nil { + return err + } + *d = Date(dd) + return nil +} + +// MarshalText serializes this date type to string +func (d Date) MarshalText() ([]byte, error) { + return []byte(d.String()), nil +} + +// Scan scans a Date value from database driver type. +func (d *Date) Scan(raw interface{}) error { + switch v := raw.(type) { + case []byte: + return d.UnmarshalText(v) + case string: + return d.UnmarshalText([]byte(v)) + case time.Time: + *d = Date(v) + return nil + case nil: + *d = Date{} + return nil + default: + return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v", v) + } +} + +// Value converts Date to a primitive value ready to written to a database. +func (d Date) Value() (driver.Value, error) { + return driver.Value(d.String()), nil +} + +// MarshalJSON returns the Date as JSON +func (d Date) MarshalJSON() ([]byte, error) { + return json.Marshal(time.Time(d).Format(RFC3339FullDate)) +} + +// UnmarshalJSON sets the Date from JSON +func (d *Date) UnmarshalJSON(data []byte) error { + if string(data) == jsonNull { + return nil + } + var strdate string + if err := json.Unmarshal(data, &strdate); err != nil { + return err + } + tt, err := time.Parse(RFC3339FullDate, strdate) + if err != nil { + return err + } + *d = Date(tt) + return nil +} + +func (d Date) MarshalBSON() ([]byte, error) { + return bson.Marshal(bson.M{"data": d.String()}) +} + +func (d *Date) UnmarshalBSON(data []byte) error { + var m bson.M + if err := bson.Unmarshal(data, &m); err != nil { + return err + } + + if data, ok := m["data"].(string); ok { + rd, err := time.Parse(RFC3339FullDate, data) + if err != nil { + return err + } + *d = Date(rd) + return nil + } + + return errors.New("couldn't unmarshal bson bytes value as Date") +} + +// DeepCopyInto copies the receiver and writes its value into out. +func (d *Date) DeepCopyInto(out *Date) { + *out = *d +} + +// DeepCopy copies the receiver into a new Date. +func (d *Date) DeepCopy() *Date { + if d == nil { + return nil + } + out := new(Date) + d.DeepCopyInto(out) + return out +} + +// GobEncode implements the gob.GobEncoder interface. +func (d Date) GobEncode() ([]byte, error) { + return d.MarshalBinary() +} + +// GobDecode implements the gob.GobDecoder interface. +func (d *Date) GobDecode(data []byte) error { + return d.UnmarshalBinary(data) +} + +// MarshalBinary implements the encoding.BinaryMarshaler interface. +func (d Date) MarshalBinary() ([]byte, error) { + return time.Time(d).MarshalBinary() +} + +// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. +func (d *Date) UnmarshalBinary(data []byte) error { + var original time.Time + + err := original.UnmarshalBinary(data) + if err != nil { + return err + } + + *d = Date(original) + + return nil +} diff --git a/vendor/github.com/go-openapi/strfmt/default.go b/vendor/github.com/go-openapi/strfmt/default.go new file mode 100644 index 00000000000..a89a4de3f38 --- /dev/null +++ b/vendor/github.com/go-openapi/strfmt/default.go @@ -0,0 +1,2035 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package strfmt + +import ( + "database/sql/driver" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "net/mail" + "regexp" + "strings" + + "github.com/asaskevich/govalidator" + "go.mongodb.org/mongo-driver/bson" +) + +const ( + // HostnamePattern http://json-schema.org/latest/json-schema-validation.html#anchor114 + // A string instance is valid against this attribute if it is a valid + // representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. + // http://tools.ietf.org/html/rfc1034#section-3.5 + // ::= any one of the ten digits 0 through 9 + // var digit = /[0-9]/; + // ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case + // var letter = /[a-zA-Z]/; + // ::= | + // var letDig = /[0-9a-zA-Z]/; + // ::= | "-" + // var letDigHyp = /[-0-9a-zA-Z]/; + // ::= | + // var ldhStr = /[-0-9a-zA-Z]+/; + //